This is the mail archive of the
cygwin
mailing list for the Cygwin project.
mingw-runtime 4.01: empty libgmon.a
- From: Teun Burgers <a dot rburgers at quicknet dot nl>
- To: cygwin at cygwin dot com
- Date: Tue, 24 Feb 2015 22:33:43 +0100
- Subject: mingw-runtime 4.01: empty libgmon.a
- Authentication-results: sourceware.org; auth=none
the libgmon.a is an empty archive. These are the contents of
/usr/i686-pc-mingw32/sys-root/mingw/lib/libgmon.a
$ od -c libgmon.a
0000000 ! < a r c h > \n
0000010
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
result:
/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:
https://github.com/jonasstrandstedt/MinGW/blob/master/MinGW/lib/libgmon.a
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