public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/54304] New: linking stage picks up system mpfr instead of in-tree version
@ 2012-08-17 19:06 tobi at gcc dot gnu.org
  2012-08-17 19:14 ` [Bug bootstrap/54304] " pinskia at gmail dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: tobi at gcc dot gnu.org @ 2012-08-17 19:06 UTC (permalink / raw)
  To: gcc-bugs

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 <http://gcc.gnu.org/ml/gcc-help/2011-04/msg00126.html>.

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


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

end of thread, other threads:[~2015-06-04 17:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 19:06 [Bug bootstrap/54304] New: linking stage picks up system mpfr instead of in-tree version tobi at gcc dot gnu.org
2012-08-17 19:14 ` [Bug bootstrap/54304] " pinskia at gmail dot com
2012-08-17 19:24 ` tobi at gcc dot gnu.org
2012-08-17 19:27 ` glisse at gcc dot gnu.org
2012-08-17 19:30 ` tobi at gcc dot gnu.org
2012-08-17 19:31 ` tobi at gcc dot gnu.org
2012-08-17 19:33 ` tobi at gcc dot gnu.org
2012-08-17 19:36 ` tobi at gcc dot gnu.org
2012-08-17 19:39 ` tobi at gcc dot gnu.org
2012-08-17 19:40 ` glisse at gcc dot gnu.org
2012-08-17 20:56 ` tobi at gcc dot gnu.org
2012-08-17 21:22 ` glisse at gcc dot gnu.org
2012-08-17 21:36 ` tobi at gcc dot gnu.org
2012-08-17 22:06 ` glisse at gcc dot gnu.org
2012-08-17 22:25 ` tobi at gcc dot gnu.org
2015-06-04 16:18 ` egall at gwmail dot gwu.edu
2015-06-04 17:01 ` pinskia at gcc dot gnu.org

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).