From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1823 invoked by alias); 17 Aug 2012 19:06:58 -0000 Received: (qmail 1811 invoked by uid 22791); 17 Aug 2012 19:06:57 -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; Fri, 17 Aug 2012 19:06:44 +0000 From: "tobi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/54304] New: linking stage picks up system mpfr instead of in-tree version Date: Fri, 17 Aug 2012 19:06: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: tobi at gcc dot gnu.org 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-08/txt/msg01174.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54304 Bug #: 54304 Summary: linking stage picks up system mpfr instead of in-tree version Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned@gcc.gnu.org ReportedBy: tobi@gcc.gnu.org This is an old bug, I found mention of it all over the internet, and also on the gcc mailing list . What happens is that with an in-tree gmp, mpfr, mpc (I used contrib/download_prerequisites) the linking stage picks up the system libraries instead of the in-tree versions. This causes a problem when the system libmpfr < 3.0.0 and the in-tree version is >= 3.0.0 and vice versa, because mpfr_get_z_exp was renamed to mpfr_get_z_2exp between the two (hidden behind a macro). The error I'm seeing with today's tree is: /Users/tobi/src/gcc/build/./prev-gcc/g++ -B/Users/tobi/src/gcc/build/./prev-gcc/ -B/usr/local/x86_64-apple-darwin11.4.0/bin/ -nostdinc++ -B/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/src/.libs -B/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/libsupc++/.libs -I/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/include/x86_64-apple-darwin11.4.0 -I/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/include -I/Users/tobi/src/gcc/libstdc++-v3/libsupc++ -L/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/src/.libs -L/Users/tobi/src/gcc/build/prev-x86_64-apple-darwin11.4.0/libstdc++-v3/libsupc++/.libs -g -O2 -mdynamic-no-pic -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 -Werror -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Wl,-no_pie -o f951 \ fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o fortran/class.o fortran/constructor.o fortran/cpp.o fortran/data.o fortran/decl.o fortran/dump-parse-tree.o fortran/error.o fortran/expr.o fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o fortran/match.o fortran/matchexp.o fortran/misc.o fortran/module.o fortran/openmp.o fortran/options.o fortran/parse.o fortran/primary.o fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o fortran/symbol.o fortran/target-memory.o darwin-f.o fortran/convert.o fortran/dependency.o fortran/f95-lang.o fortran/trans.o fortran/trans-array.o fortran/trans-common.o fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o fortran/trans-stmt.o fortran/trans-types.o fortran/frontend-passes.o libbackend.a main.o tree-browser.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl -L/opt/local/lib -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a attribs.o -L/Users/tobi/src/gcc/build/./gmp/.libs -L/Users/tobi/src/gcc/build/./mpfr/.libs -L/Users/tobi/src/gcc/build/./mpc/src/.libs -lmpc -lmpfr -lgmp -L../zlib -lz Undefined symbols for architecture x86_64: "_mpfr_get_z_exp", referenced from: gfc_mpfr_to_mpz(__mpz_struct*, __mpfr_struct*, locus*) in arith.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[3]: *** [f951] Error 1 make[2]: *** [all-stage2-gcc] Error 2 make[1]: *** [stage2-bubble] Error 2 make: *** [all] Error 2 (I mentioned this in the aftermath to PR54292) Cheers