From: SF/projects/mingw n. l. <min...@li...> - 2011-01-23 11:10:44
|
Bugs item #3164221, was opened at 2011-01-23 12:10 Message generated for change (Tracker Item Submitted) made by mmiklavec You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3164221&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: binutils Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mojca Miklavec (mmiklavec) Assigned to: Nobody/Anonymous (nobody) Summary: ld segfaults when cross-compiling with dll-s Initial Comment: I'm experiencing a nasty problem with cross-compiler. I'm using 64-bit Mac OS X 10.6.6 with latest version of macports and > i386-mingw32-g++ --version i386-mingw32-g++ (GCC) 3.4.5 (mingw-vista special r2) > i386-mingw32-ld --version GNU ld (GNU Binutils) 2.19.1 > uname -a Darwin smrketa.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:11:58 PST 2010; root:xnu-1504.9.26~3/RELEASE_X86_64 x86_64 but I'm experiencing similar problems on another linux machine that I have tried: > i586-mingw32msvc-c++ --version i586-mingw32msvc-c++ (GCC) 4.2.1-sjlj (mingw32-2) > i586-mingw32msvc-ld --version GNU ld (GNU Binutils) 2.18.50.20080109 > uname -a Linux m54s03 2.6.19-4-generic-amd64 #2 SMP Thu Apr 5 05:57:13 UTC 2007 x86_64 GNU/Linux When I try to run i386-mingw32-g++ picoscope.cpp main.cpp -o main.exe -lps4000 -L. it crashes with collect2: ld terminated with signal 11 [Segmentation fault] The whole example with source code is attached in zip file. However it works with MiwGW when compiling natively under Windows 7: g++ picoscope.cpp main.cpp -o main -lps4000 -L. I know that the version of linker on my computer might be old, but: - I don't know how to compile & install the latest one - I am curious to know whether the same problem happens on other machines with the latest versions of linker I have reported the problem on bug-binutils (see http://lists.gnu.org/archive/html/bug-binutils/2011-01/msg00120.html), but they suggested to rather contact MinGW team. The other suggestion was to include a complete testcase for the linker which I will also attach. The verbose output of gcc is the following: $ i586-mingw32msvc-c++ -v picoscope.cpp main.cpp -o main.exe -lps4000 -L. Using built-in specs. Target: i586-mingw32msvc Configured with: /build/buildd/mingw32-4.2.1.dfsg/build_dir/src/gcc-4.2.1-2-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs Thread model: win32 gcc version 4.2.1-sjlj (mingw32-2) /usr/libexec/gcc/i586-mingw32msvc/4.2.1-sjlj/cc1plus -quiet -v picoscope.cpp -quiet -dumpbase picoscope.cpp -mtune=pentium -auxbase picoscope -version -o /tmp/ccp4RiKp.s ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/sys-include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++ /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++/i586-mingw32msvc /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++/backward /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include End of search list. GNU C++ version 4.2.1-sjlj (mingw32-2) (i586-mingw32msvc) compiled by GNU C version 4.2.3 20071210 (prerelease) (Ubuntu 4.2.2-4ubuntu1). GGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80480 Compiler executable checksum: 154b8a53992189755305fccd99087270 /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/as -o /tmp/ccDm0qY9.o /tmp/ccp4RiKp.s /usr/libexec/gcc/i586-mingw32msvc/4.2.1-sjlj/cc1plus -quiet -v main.cpp -quiet -dumpbase main.cpp -mtune=pentium -auxbase main -version -o /tmp/ccp4RiKp.s ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/sys-include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++ /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++/i586-mingw32msvc /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include/c++/backward /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/include /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include End of search list. GNU C++ version 4.2.1-sjlj (mingw32-2) (i586-mingw32msvc) compiled by GNU C version 4.2.3 20071210 (prerelease) (Ubuntu 4.2.2-4ubuntu1). GGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80480 Compiler executable checksum: 154b8a53992189755305fccd99087270 /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/as -o /tmp/cc0NneNj.o /tmp/ccp4RiKp.s /usr/libexec/gcc/i586-mingw32msvc/4.2.1-sjlj/collect2 -Bdynamic -o main.exe /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/crt2.o /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/crtbegin.o -L. -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib /tmp/ccDm0qY9.o /tmp/cc0NneNj.o -lps4000 -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/crtend.o collect2: ld terminated with signal 11 [Segmentation fault] Since I wasn't abble to attach files due to size - here they are: - http://ol.ijs.si/~mojca/osciloskop/linker.zip - http://ol.ijs.si/~mojca/osciloskop/linker-with-libs.tar.gz ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3164221&group_id=2435 |