Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03669 Compiling Minor Have not tried Jan 17, 2010, 12:32 Sep 21, 2012, 07:17
Tester tititou View Status Public Platform MAME (Self-compiled)
Assigned To Resolution No change required OS
Status [?] Closed Driver
Version 0.136u1 Fixed in Version Build Other
Fixed in Git Commit Github Pull Request #
Summary 03669: Can't build mame with PROFILE = 1
Description When I build the latest version of mame wih flag PROFILE = 1in the makefile I get :

d:/gnu/mingw64-w32/bin/../lib/gcc/i686-w64-mingw32/4.4.3/../../../../i686-w64-mingw32/lib/libgmon.a(lib32_libgmon_a-mcountFunc.o):/W64_155431-src/build-crt/mountFunc.S:29: undefined reference to `_mcount'

So, mame, with the new toolchain, seems to not accept build with profiling information activated.

As I'm the one who introduced this profiling think, I'll try to have a look at it.
Steps To Reproduce Build mame with line
PROFILE = 1
uncommentd in the makefile
Additional Information
Github Commit
Flags
Regression Version 0.136u1
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
7
User avatar
No.05556
tititou
Tester
Jan 22, 2010, 21:46
This is not related to mame itself nor to the c++ migration because :
      g++ -pg test.c
or gcc -pg test.c
(where test.c is a valid source code)

result in the same error.

Must be related to the way the building toolchain has been made.
User avatar
No.05562
tititou
Tester
Jan 24, 2010, 12:02
I've tried with a newer version of mingw (mingw-w32-bin_i686-mingw_20100118_sezero.zip) and I managed to link 'mame.exe'.

I'll make some more testing (complete compilation). I'll give more details later on.

It definitelly seems to be an issue with the toolchain.
User avatar
No.05804
tititou
Tester
Feb 28, 2010, 21:13
I did manage to build completely mame from scratch with PROFILE = 1

1) To manage to do that, I first replaced the gmonlib.a from the official toolchain. I took the one from mingw-w32-bin_i686-mingw_20100223_sezero.zip

2) Then I still had a execution error from png2bcd.exe. As spoted on http://www.usamimi.info/~mnn/d/?p=11216, I had to remove the auto detection of my precessor (march=native) when i build zlib.

With these 2 modifications, every thing seems to be good for me now.


I think that at least the toolchain should be updated to a more recent version of mingw that has a good gmonlib.a library.

For the 2nd issue, I think it is a bug in gcc or in zlib.

Hope this helps
User avatar
No.05813
couriersud
Developer
Mar 1, 2010, 21:40
march and friends are not officially supported. Please, only post bugs here using builds from a unmodified makefile and just "make".
User avatar
No.05816
tititou
Tester
Mar 2, 2010, 12:20
I do agree, my only request is against the first of the 2 step described. The 2nd one is specific to my built.

However, IFAIK, the built regression with PROFILE = 1 has already been confirmed by Tafoid.
This is the only issue I'm caring about.
User avatar
No.05817
Tafoid
Administrator
Mar 2, 2010, 15:24
32-bit build attempt still fails with "make PROFILE=1" with current SVN
User avatar
No.08932
Firewave
Senior Tester
Sep 21, 2012, 07:17
Links fine with 0.147 and the latest toolchain.