public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/53798] New: [4.7] Bootstrap fails on Linux x86_64 with pre-built libmpc/mpfr/gmp due to multilib path problem
@ 2012-06-28 14:12 windward at gmx dot com
  2012-06-28 14:31 ` [Bug bootstrap/53798] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: windward at gmx dot com @ 2012-06-28 14:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53798

             Bug #: 53798
           Summary: [4.7] Bootstrap fails on Linux x86_64 with pre-built
                    libmpc/mpfr/gmp due to multilib path problem
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: windward@gmx.com


GCC 4.7.1 fails to bootstrap on Linux x86_64 due to a multilib problem if
pre-built libraries for MPC, MPFR and GMP are used and their installation
directory is set using --with-[mpc|mpfr|gmp] (see output at the end).

Obviously these libraries reside in different paths for 32 bit and 64 bit.
The main configure script (line 5108 and following) evaluates the
--with-[mpc|mpfr|gmp]=PATH parameters and extends $gmplibs with "-LPATH/lib".
The resulting GMPLIBS is used in ./Makefile.in and ./gcc/Makefile.in, and
causes the bootstrapping to fail in either 32 or 64 bit multilib stage
(depending on the parameters). 
Besides the redundancy if all libraries reside in the same path, $gmplibs can
only be correct for either 32 or 64 bit.

Workaround:

Assumption: 32 bit libraries reside in PATH/lib, the 64 bit versions in
PATH/lib64

Use --with-[mpc|mpfr|gmp]=PATH and add --with-gmp-lib=PATH/lib64.

The configure script will generate GMPLIBS with (at least) -LPATH/lib64 and
-LPATH/lib. GNU ld will ignore the incompatible version while searching for
lib[mpc|mpfr|gmp].


/opt/SP/build/gcc/gcc-4.7.1-build/./prev-gcc/g++
-B/opt/SP/build/gcc/gcc-4.7.1-build/./prev-gcc/
-B/opt/SP/gcc/gcc-4.7.1/x86_64-unknown-linux-gnu/bin/ -nostdinc++
-B/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-I/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include
-I/opt/SP/build/gcc/gcc-4.7.1/libstdc++-v3/libsupc++
-L/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/opt/SP/build/gcc/gcc-4.7.1-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
  -g -O2 -gtoggle -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc  -o jc1 \
        java/class.o java/decl.o java/expr.o java/constants.o java/lang.o
java/typeck.o java/except.o java/verify-glue.o java/verify-impl.o
java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o
java/mangle_name.o java/builtins.o java/resource.o java/jcf-depend.o
java/jcf-path.o java/boehm.o java/java-gimplify.o main.o  libbackend.a
libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a -L../zlib -lz  libcommon.a ../libcpp/libcpp.a  
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  attribs.o  
-L/opt/SP/gcc/gcc-4.7.1/lib -L/opt/SP/gcc/gcc-4.7.1/lib
-L/opt/SP/gcc/gcc-4.7.1/lib -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz

/opt/SP/gcc/gcc-4.7.1/bin/ld: __gmpfr_emin: TLS definition in
/opt/SP/gcc/gcc-4.7.1/lib64/libmpfr.so.4 section .tdata mismatches non-TLS
definition in /usr/lib/../lib64/libmpfr.a(exceptions.o) section .data
/opt/SP/gcc/gcc-4.7.1/lib64/libmpfr.so.4: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
gmake[3]: *** [jc1] Error 1
gmake[3]: Leaving directory `/opt/SP/build/gcc/gcc-4.7.1-build/gcc'


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-26 14:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 14:12 [Bug bootstrap/53798] New: [4.7] Bootstrap fails on Linux x86_64 with pre-built libmpc/mpfr/gmp due to multilib path problem windward at gmx dot com
2012-06-28 14:31 ` [Bug bootstrap/53798] " redi at gcc dot gnu.org
2012-07-17 10:10 ` windward at gmx dot com
2012-07-17 10:11 ` windward at gmx dot com
2012-07-17 10:46 ` redi at gcc dot gnu.org
2012-07-17 12:16 ` windward at gmx dot com
2012-07-17 12:18 ` windward at gmx dot com
2012-07-17 12:35 ` redi at gcc dot gnu.org
2012-07-17 13:41 ` windward at gmx dot com
2013-02-26 14:22 ` windward at gmx dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).