From: SourceForge.net <no...@so...> - 2003-10-01 01:09:40
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2216956 By: kwizatz Sorry, for some reason I am not being able to post to mingw-users, dont know why, so I am posting here. Hello, I am one of the administrators at the sourceforge Project aedGUI (http://sourceforge.net/projects/aedgui/) and I have stumbled across a really annoying bug, I am running MSys 1.0.9 and GCC 3.2.3 (stable branch) I have already posted the symptoms in our list, so I am going to just cut and paste the post here. You cann follow the thread in our list here: http://sourceforge.net/mailarchive/message.php?msg_id=6136848 Thanks in advance :^) --------------------Pasted Email------------------- in Mingw+MSYS compilation breaks at link time with the error: Info: resolving _atexit by linking to __imp__atexit (auto-import) fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm__atexit' What I know: 1) neigher _atexit or atexit are used ever in the code, exit is used tho. 2) doing a search for files containing the string "atexit", the test cpp files come up, thats normal and spected, however aedWindow.lo and aedWindow.o also come up, so I asume those are the files that cause the error, remember, not aedWindow.cpp or aedWindow.h contain a call to _atexit or atexit, exit is there, but comenting out the calls does nothing at all. 3) libtool is calling gcc instead of g++ when linking breaks, its assigning CFLAGS and CPPFLAGS even tho it is linking, not compiling, and LDFLAGS are repeated before and after the list of object files. 4) althogh the problem seems to be the compiler or its tools, I am able to compile other stuff, even compiled SDL_rtf with the same configuration and no problems showed up at all, it compiled and installed as a dll as expected. 5) this happens exactly the same way at my computer at home and at work. My GCC Version dump: Reading specs from c:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c++,f77,objc --disable-win32-registry --disable-shared --enable-sjlj-exceptions Thread model: win32 gcc version 3.2.3 (mingw special 20030504-1) Compilation Problem dump: /bin/sh ../libtool --mode=link g++ `/MinGW/bin/sdl-config --cflags` -I../include/ -g -O2 -L/MinGW/lib -lmingw32 -lSDLmain -lSDL -mwindows -lSDL_ttf -lSDL_rtf -no-undefined -o libaedGUI.la -rpath /MinGW/lib -version-info 1:0:0 -release 0.1.7 tinystr.lo tinyxmlerror.lo tinyxmlparser.lo tinyxml.lo aedXmlFile.lo drawlibs.lo aedMenu.lo aedMenuBar.lo aedApp.lo aedTheme.lo aedObject.lo aedWindow.lo aedStaticText.lo aedStaticRTF.lo aedButton.lo aedTextBox.lo aedDialogBox.lo aedProgressBar.lo aedFont.lo aedFrame.lo aedCheckBox.lo aedUpdateManager.lo aedSignal.lo aedImage.lo aedImageBank.lo aedSlider.lo aedScrollBar.lo aedStaticImage.lo aedAnimatedImage.lo aedRadioButtonGroup.lo aedTimer.lo aedListBox.lo aedSpinner.lo aedLog.lo -lstdc++ -L/MinGW/lib -lmingw32 -lSDLmain -lSDL -mwindows rm -fr .libs/libaedGUI.la .libs/libaedGUI.* .libs/libaedGUI-0.1.7.* generating symbol list for `libaedGUI.la' test -f .libs/aedGUI.dll-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < ../libtool > .libs/aedGUI.dll-ltdll.c test -f .libs/aedGUI.dll-ltdll.o || (cd .libs && gcc -c aedGUI.dll-ltdll.c) dlltool --exclude-symbols _DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def .libs/aedGUI.dll-def .libs/aedGUI.dll-ltdll.o tinystr.o tinyxmlerror.o tinyxmlparser.o tinyxml.o aedXmlFile.o drawlibs.o aedMenu.o aedMenuBar.o aedApp.o aedTheme.o aedObject.o aedWindow.o aedStaticText.o aedStaticRTF.o aedButton.o aedTextBox.o aedDialogBox.o aedProgressBar.o aedFont.o aedFrame.o aedCheckBox.o aedUpdateManager.o aedSignal.o aedImage.o aedImageBank.o aedSlider.o aedScrollBar.o aedStaticImage.o aedAnimatedImage.o aedRadioButtonGroup.o aedTimer.o aedListBox.o aedSpinner.o aedLog.o sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < .libs/aedGUI.dll-def > .libs/libaedGUI.exp echo EXPORTS > .libs/aedGUI.dll-def _lt_hint=1; cat .libs/libaedGUI.exp | while read symbol; do set dummy $symbol; case $# in 2) echo " $2 @ $_lt_hint ; " >> .libs/aedGUI.dll-def;; *) echo " $2 @ $_lt_hint $3 ; " >> .libs/aedGUI.dll-def;; esac; _lt_hint=`expr 1 + $_lt_hint`; done test -f .libs/aedGUI.dll-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < ../libtool > .libs/aedGUI.dll-ltdll.c test -f .libs/aedGUI.dll-ltdll.o || (cd .libs && gcc -c aedGUI.dll-ltdll.c) gcc -Wl,--base-file,.libs/aedGUI.dll-base -Wl,--dll -nostartfiles -Wl,-e,_DllMain@12 -o .libs/aedGUI.dll .libs/aedGUI.dll-ltdll.o tinystr.o tinyxmlerror.o tinyxmlparser.o tinyxml.o aedXmlFile.o drawlibs.o aedMenu.o aedMenuBar.o aedApp.o aedTheme.o aedObject.o aedWindow.o aedStaticText.o aedStaticRTF.o aedButton.o aedTextBox.o aedDialogBox.o aedProgressBar.o aedFont.o aedFrame.o aedCheckBox.o aedUpdateManager.o aedSignal.o aedImage.o aedImageBank.o aedSlider.o aedScrollBar.o aedStaticImage.o aedAnimatedImage.o aedRadioButtonGroup.o aedTimer.o aedListBox.o aedSpinner.o aedLog.o -L/MinGW/lib -lmingw32 -lSDLmain -lSDL -lSDL_ttf -lSDL_rtf -lstdc++ -lmingw32 -lSDLmain -lSDL Info: resolving _atexit by linking to __imp__atexit (auto-import) fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm__atexit' make[2]: *** [libaedGUI.la] Error 1 make[2]: Leaving directory `/c/code/aedGUI/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/code/aedGUI/src' make: *** [all-recursive] Error 1 --------------------Pasted Email------------------- I got some help from Sam Lantinga (he is helping us with project and in fact ltmain.sh and some other autofiles came from him), he checked and here is his reply: Okay, here's what I did: 1. Installed MinGW-3.1.0-1, MSYS-1.0.9, mingw32-make-3.80.0-3, msysDTK-1.0.1 from the MSys website. 2. Installed directx-devel.tar.gz, nasm.exe (in /mingw/bin) from libsdl.org 3. Configured and built SDL 1.2 from CVS 4. Configured and built freetype 2.1.5 from freetype.org 5. Configured and built SDL_ttf2 from CVS 6. Configured and built SDL_rtf from CVS By this point I hadn't encountered any errors or warnings, except for needing to copy SDL.dll to the directories where I was running configure for SDL_ttf2 and SDL_rtf. 7. Configured and built aedGUI from CVS There were no warnings all the way up to: Info: resolving _atexit by linking to __imp__atexit (auto-import) fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm__atexit' I'll follow up with more info if I figure it out. :) Well, I figured out how to make the new libtool generate DLLs (by default it doesn't), but the resulting binaries wouldn't run, they simply gave the message: Windows cannot run this program because it is in an invalid format. Oddly enough, things that are linked with just SDL work fine, it's only when another DLL is added that it breaks down. I suspect that the new tools have bugs in them. :) I can think of two choices at the moment. Either we go with the new tools and not generate shared libraries, or we revert back to the old tools. I have MSYS-1.0.8 which works just fine... :) Thanks for any help, you might provide :) ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=286529 |