niXman / mingw-builds

Scripts for building the 32 and 64-bit MinGW-W64 compilers for Windows
Other
275 stars 106 forks source link

Linker Error when compiling GCC #330

Closed wsmoses closed 10 years ago

wsmoses commented 10 years ago

../../xg++ -B../../ -B../../../x86_64-w64-mingw32/libstdc++-v3/src/.libs -B../../../x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L../../../x86_64-w64-mingw32/libstdc++-v3/src/.libs -L../../../x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -static-libstdc++ -static-libgcc -I- -I../rts -I. -I/home/wmoses/src/gcc-trunk/gcc/ada -DIN_GCC -O2 -pipe -I/home/wmoses/x86_64-trunk-posix-seh-rt_v4/mingw64/opt/include -I/home/wmoses/prerequisites/x86_64-zlib-static/include -I/home/wmoses/prerequisites/x86_64-w64-mingw32-static/include -D__USE_MINGW_ACCESS -W -Wall -static-libstdc++ -static-libgcc -pipe -L/home/wmoses/x86_64-trunk-posix-seh-rt_v4/mingw64/opt/lib -L/home/wmoses/prerequisites/x86_64-zlib-static/lib -L/home/wmoses/prerequisites/x86_64-w64-mingw32-static/lib -Wl,--stack,12582912 -o ../../gnatmake.exe b_gnatm.o a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-conf.o prj-pp.o prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o restrict.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o uintp.o uname.o urealp.o usage.o widechar.o mdll.o mdll-utl.o mdll-fil.o \ ../link.o ../targext.o ../../ggc-none.o ../../libcommon-target.a ../../libcommon.a ../../../libcpp/libcpp.a ../rts/libgnat.a -liconv ../../../libbacktrace/.libs/libbacktrace.a ../../../libiberty/libiberty.a C:\posix\home\wmoses\mingw-builds-develop\toolchains\mingw64\x86_64-w64-mingw32\bin\ld.exe: cannot find -lstdc++ collect2.exe: error: ld returned 1 exit status ../gcc-interface/Makefile:2540: recipe for target '../../gnatmake.exe' failed make[3]: * [../../gnatmake.exe] Error 1 make[3]: Leaving directory '/home/wmoses/x86_64-trunk-posix-seh-rt_v4/build/gcc-trunk/gcc/ada/tools' Makefile:171: recipe for target 'gnattools-native' failed make[2]: * [gnattools-native] Error 2 make[2]: Leaving directory '/home/wmoses/x86_64-trunk-posix-seh-rt_v4/build/gcc-trunk/gnattools' Makefile:8707: recipe for target 'all-gnattools' failed make[1]: * [all-gnattools] Error 2 make[1]: Leaving directory '/home/wmoses/x86_64-trunk-posix-seh-rt_v4/build/gcc-trunk' Makefile:865: recipe for target 'all' failed make: * [all] Error 2

niXman commented 10 years ago

By default, MinGW is built with 'ada,c,c++,fortran,objc,obj-c++' PL support. This error occurs when Ada is linking. If you no need Ada support, use '--enable-languages=c,c++'

Of course, patches are welcome =)

wsmoses commented 10 years ago

Well, that's always an option. However, the strange thing is that the toolchain that I am using does have ada support.

$ ./gcc -v Using built-in specs. COLLECT_GCC=C:\POSIX\home\wmoses\mingw-builds-develop\toolchains\mingw64\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/posix/home/wmoses/mingw-builds-develop/toolchains/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.1/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-4.8.1/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/tmp/x64-481-posix-seh-r5/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/tmp/mingw-prereq/x86_64-w64-mingw32-static --with-mpfr=/tmp/mingw-prereq/x86_64-w64-mingw32-static --with-mpc=/tmp/mingw-prereq/x86_64-w64-mingw32-static --with-isl=/tmp/mingw-prereq/x86_64-w64-mingw32-static --with-cloog=/tmp/mingw-prereq/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev5, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/tmp/x64-481-posix-seh-r5/libs/include -I/tmp/mingw-prereq/x64-zlib/include -I/tmp/mingw-prereq/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/tmp/x64-481-posix-seh-r5/libs/include -I/tmp/mingw-prereq/x64-zlib/include -I/tmp/mingw-prereq/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/tmp/x64-481-posix-seh-r5/libs/lib -L/tmp/mingw-prereq/x64-zlib/lib -L/tmp/mingw-prereq/x86_64-w64-mingw32-static/lib -L/tmp/x64-481-posix-seh-r5/mingw64/opt/lib ' Thread model: posix gcc version 4.8.1 (rev5, Built by MinGW-W64 project)

niXman commented 10 years ago

gcc version 4.8.1 (rev5, Built by MinGW-W64 project)

4.8.2 is also successfully built with Ada support. The problem maybe in that you are building trunk...

niXman commented 10 years ago

Just now I successfully built gcc-trunk with Ada support.