mingw-runtime 4.01: empty libgmon.a

Teun Burgers a.rburgers@quicknet.nl
Tue Feb 24 23:38:00 GMT 2015

the libgmon.a is an empty archive. These are the contents of

$ od -c libgmon.a
0000000   !   <   a   r   c   h   >  \n

This becomes a problem when attempting to prepare an executable for profiling with gprof

/bin/i686-pc-mingw32-gcc.exe -pg -o hello hello.c


/usr/i686-pc-mingw32/sys-root/mingw/lib/gcrt2.o: In function `monstartup':
/usr/src/debug/mingw-runtime-4.0-1/misc/gpl/profile/gcrt0.c:46: undefined reference to `monstartup'
/usr/src/debug/mingw-runtime-4.0-1/misc/gpl/profile/gcrt0.c:47: undefined reference to `_mcleanup'
/tmp/ccPFHeDJ.o:hello.c:(.text+0xa): undefined reference to `mcount'
collect2: error: ld returned 1 exit status

I replaced libgmon.a with this one:


and then the profiling for i686-pc-mingw32 works fine.

Maybe a next release of mingw-runtime can include a functional libgmon.a ?

Kind regards,

Teun Burgers

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list