This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mingw-runtime: problem with -mno-cygwin and profiling (libgmon.a)


hi! i have been working on porting the build process in allegro (a
game/multimedia library. see http://alleg.sourceforge.net for more info) to
mingw32 and cygwin. and i have got almost everything finished now.

when building the mingw32 profiling version of the allegro library with
cygwin using the following command line:

dllwrap -mno-cygwin --target i386-mingw32 --def lib/mingw32/allegro.def -o
lib/m
ingw32/allp40.dll obj/mingw32/allp/allegro.o
< --- snip (lots of object files) --- >
ingw32/allp/wwnd.o obj/mingw32/allp/colconv.o obj/mingw32/allp/icolconv.o
obj/mi
ngw32/allp/pckeys.o -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput 
-ldd
raw -ldxguid -lwinmm -ldsound -lgmon -L/lib/mingw -lmoldname -lmsvcrt --outp
ut-l
ib lib/mingw32/liballp.a

i get the following error:

/usr/lib/libgmon.a(profil.o)(.text+0x127): undefined reference to `__errno'
/usr/lib/libgmon.a(profil.o)(.text+0x171): undefined reference to `__errno'
/usr/lib/libgmon.a(profil.o)(.text+0x1a1): undefined reference to `__errno'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make.exe: *** [lib/mingw32/allp40.dll] Error 1

i have made sure to link only with the mingw32 runtime using -mno-cygwin. i
have the latest cygwin packages installed including the mingw-runtime. i
have also objdump'ed profil.o to see if it contained __errno, it contained
___errno... i guess it's the same.

as a quick solution i have copied the file libgmon.a from the lib/ directory
in the official mingw32 distribution and pasted it into /lib/mingw/ in my
cygwin installation and it seemed to work. i'm not sure if the problem is
the /lib/libgmon.a is dependant on parts of the cygwin runtime, but if
that's the case whoever is the maintainer (christopher faylor i guess?) of
the mingw-runtime package should include the mingw gmon library here.

NOTE: as i am not subscribed to this mailinglist please CC all replies to my
private email. thanks in advance!

Sincerely Henrik Stokseth.
-----------------------------------------------------------------------
E-mail: hstokset@tiscali.no  Homepage: http://hstokset.n3.net




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]