This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: Minimum GMP/MPFR version bumps for GCC-4.5


On Sun, 2009-03-29 at 14:37 +0000, Joseph S. Myers wrote:
> On Sun, 29 Mar 2009, Laurent GUERBY wrote:
> 
> > /home/guerby/build-ppl/./prev-gcc/xgcc -B/home/guerby/build-ppl/./prev-gcc/ -B/n/17/guerby/install-trunk-ppl/x86_64-unknown-linux-gnu/bin/  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
> > 	  main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/home/guerby/root/cloog-ppl-1.5/lib -lcloog -L/home/guerby/root/ppl-0.10/lib -lppl_c -lppl -lgmpxx -lstdc++ -L/home/guerby/root/gmp-4.2.4/lib -L/home/guerby/root/mpfr-2.3.1/lib -lmpfr -lgmp
> > /usr/bin/ld: cannot find -lstdc++
> > collect2: ld returned 1 exit status
> > make[3]: *** [cc1-dummy] Error 1
> > make[3]: Leaving directory `/home/guerby/build-ppl/gcc'
> > make[2]: *** [all-stage2-gcc] Error 2
> > make[2]: Leaving directory `/home/guerby/build-ppl'
> > make[1]: *** [stage2-bubble] Error 2
> > make[1]: Leaving directory `/home/guerby/build-ppl'
> > make: *** [bootstrap] Error 2
> > 
> > What am I missing?
> 
> If you are doing a bootstrap rather than building a cross compiler, and 
> the host libstdc++ is not in a path searched by the compiler being built, 
> you'll need --with-host-libstdcxx="-L/some/where -lstdc++" so the newly 
> built compiler can find the host libstdc++.

--with-host-libstdcxx="-L/usr/lib -lstdc++" fails earlier:

make[3]: Entering directory `/home/guerby/build-ppl/gcc'
...
gcc  -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -fno-common  -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
	  main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/home/guerby/root/cloog-ppl-1.5/lib -lcloog -L/home/guerby/root/ppl-0.10/lib -lppl_c -lppl -lgmpxx -L/usr/lib -lstdc++ -L/home/guerby/root/gmp-4.2.4/lib -L/home/guerby/root/mpfr-2.3.1/lib -lmpfr -lgmp
libbackend.a(builtins.o): In function `fold_builtin_1':
../../trunk/gcc/builtins.c:10319: undefined reference to `mpfr_j0'
../../trunk/gcc/builtins.c:10325: undefined reference to `mpfr_j1'
../../trunk/gcc/builtins.c:10331: undefined reference to `mpfr_y0'
../../trunk/gcc/builtins.c:10337: undefined reference to `mpfr_y1'
libbackend.a(builtins.o): In function `fold_builtin_2':
../../trunk/gcc/builtins.c:10458: undefined reference to `mpfr_jn'
../../trunk/gcc/builtins.c:10464: undefined reference to `mpfr_yn'
../../trunk/gcc/builtins.c:10472: undefined reference to `mpfr_remainder'
libbackend.a(builtins.o): In function `do_mpfr_remquo':
../../trunk/gcc/builtins.c:13372: undefined reference to `mpfr_remquo'
libbackend.a(builtins.o): In function `do_mpfr_lgamma_r':
../../trunk/gcc/builtins.c:13450: undefined reference to `mpfr_lgamma'
collect2: ld returned 1 exit status
make[3]: *** [cc1-dummy] Error 1
make[3]: Leaving directory `/home/guerby/build-ppl/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/guerby/build-ppl'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/guerby/build-ppl'
make: *** [bootstrap] Error 2

guerby@gcc17:~/build-ppl$ ls -l /usr/lib/libstdc++*
lrwxrwxrwx 1 root root     18 2008-05-09 14:37 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7
-rw-r--r-- 1 root root 829896 2007-01-03 20:58 /usr/lib/libstdc++.so.5.0.7
lrwxrwxrwx 1 root root     18 2008-05-09 10:08 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.8
-rw-r--r-- 1 root root 965344 2006-12-11 00:11 /usr/lib/libstdc++.so.6.0.8

If I rerun the failing gcc command removing manually the "-L/usr/lib"  and keeping the "-lstdc++"
it works and the resulting cc1-dummy is as follows:

guerby@gcc17:~/build-ppl/gcc$ ldd ./cc1-dummy 
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002aaaaabc3000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002aaaaadc1000)
	libc.so.6 => /lib/libc.so.6 (0x00002aaaaaecf000)
	libm.so.6 => /lib/libm.so.6 (0x00002aaaab10c000)
	/lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

May be we need something for stage1 and a different thing later on?

Thanks in advance for your help,

Laurent




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