From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21138 invoked by alias); 28 Jun 2012 14:12:37 -0000 Received: (qmail 21122 invoked by uid 22791); 28 Jun 2012 14:12:35 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jun 2012 14:12:21 +0000 From: "windward at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/53798] New: [4.7] Bootstrap fails on Linux x86_64 with pre-built libmpc/mpfr/gmp due to multilib path problem Date: Thu, 28 Jun 2012 14:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: windward at gmx dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg01890.txt.bz2 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'