This is the mail archive of the gcc-bugs@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]

[Bug target/29292] configure produces strange gmp, mpfr lib directories.



------- Comment #3 from danp57 at optonline dot net  2006-10-02 21:02 -------
Subject: Re:  configure produces strange gmp, mpfr lib directories.

There are multiple logs --

1)  I switched to static libraries, but tried both static and shared 
(the static libs are more standard, and less likely to choke libtool -- 
if its having problems).
2)  I built gmp and mpfr separately (I've had successful builds on both 
Cygwin and OS X in that config), and I've used the mpfr that comes with 
the gmp distribution.  When I hack the Makefile to correct the complaint 
I'm writing about below, I still have problems resolving symbols.  
HOWEVER: the issue I'm looking at here is something I have been able to 
isolate, and it looks like a good place to start.

watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $ 
../gcc-4.1.1/configure --without-nls 
--enable-languages=c,c++,fortran,objc,obj-c++ --with-gmp=/usr/local/ 
--with-mpfr=/usr/local/
loading cache ./config.cache
checking host system type... powerpc-ibm-aix5.3.0.0
checking target system type... powerpc-ibm-aix5.3.0.0
checking build system type... powerpc-ibm-aix5.3.0.0
checking for a BSD compatible install... ../gcc-4.1.1/install-sh -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for MPFR... no
configure: error: GMP with MPFR support is required to build fortran
watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $

When I switch the -with-gmp... to /usr/local/lib, the script builds, but 
the Makefile contains

# Where to find GMP
HOST_GMPLIBS = -L/usr/local/lib/lib -L/usr/local/lib/lib -lmpfr -lgmp
HOST_GMPINC = -I/usr/local/lib/include -I/usr/local/lib/include

It should say /usr/local/include, and /usr/local/lib.  The libs are there:

ls -CF /usr/local/lib/*gmp*
/usr/local/lib/libgmp.a    /usr/local/lib/libgmp.la*
watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $

 ls -CF /usr/local/lib/*mpfr*
/usr/local/lib/libmpfr.a    /usr/local/lib/libmpfr.la*
watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $

Without correcting the /usr/local/lib/lib reference in the make file, I get:

gcc   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros 
-Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H  -o 
f951 \
        fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.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 fort
ran/match.o fortran/matchexp.o fortran/misc.o fortran/module.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/convert.o fortran/depende
ncy.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-stmt.o fortran/trans-typ
es.o main.o  libbackend.a ../libcpp/libcpp.a -L/usr/local/lib/lib 
-L/usr/local/lib/lib -lmpfr -lgmp ../libcpp/libcpp.a -lintl -liconv 
../libiberty/libiberty.a
ld: 0711-317 ERROR: Undefined symbol: .__gmpfr_out_str
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
collect2: ld returned 8 exit status
make[2]: *** [f951] Error 1
make[2]: Leaving directory `/geno4/watplatt/gcc/gcc-4.1.1.build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/geno4/watplatt/gcc/gcc-4.1.1.build'
make: *** [all] Error 2
watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $


If I try to fix the /usr/local/lib/lib reference, there are yet more 
undefined symbols:

ld: 0711-317 ERROR: Undefined symbol: .mpfr_add
ld: 0711-317 ERROR: Undefined symbol: .mpfr_sqrt
ld: 0711-317 ERROR: Undefined symbol: .mpfr_log10
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_tdiv_r
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_r
ld: 0711-317 ERROR: Undefined symbol: .mpfr_nextabove
ld: 0711-317 ERROR: Undefined symbol: .mpfr_nextbelow
ld: 0711-317 ERROR: Undefined symbol: .mpfr_ui_div
ld: 0711-317 ERROR: Undefined symbol: .mpfr_mul_2ui
ld: 0711-317 ERROR: Undefined symbol: .mpfr_set_ui
ld: 0711-317 ERROR: Undefined symbol: .mpfr_pow_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_get_d
ld: 0711-317 ERROR: Undefined symbol: .mpfr_get_d
ld: 0711-317 ERROR: Undefined symbol: .mpfr_mul_2si
ld: 0711-317 ERROR: Undefined symbol: .mpfr_div_ui
ld: 0711-317 ERROR: Undefined symbol: .mpfr_mul_ui
ld: 0711-317 ERROR: Undefined symbol: .mpfr_tan
ld: 0711-317 ERROR: Undefined symbol: .mpfr_tanh
ld: 0711-317 ERROR: Undefined symbol: .mpfr_hypot
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_init
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mul_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mul_2exp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_sub_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_com
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_set_str
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_get_str
ld: 0711-317 ERROR: Undefined symbol: .mpfr_set_str
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_out_str
ld: 0711-317 ERROR: Undefined symbol: .__gmpfr_out_str
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_tdiv_q
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_cdiv_q
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mul
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_add
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_q
ld: 0711-317 ERROR: Undefined symbol: .mpfr_set_default_prec
ld: 0711-317 ERROR: Undefined symbol: .mpfr_const_pi
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_pow_ui
ld: 0711-317 ERROR: Undefined symbol: .mpfr_get_z_exp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_tdiv_q_2exp
ld: 0711-317 ERROR: Undefined symbol: .mpfr_pow_si
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_init_set_si
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
collect2: ld returned 8 exit status
make[2]: *** [f951] Error 1
make[2]: Leaving directory `/geno4/watplatt/gcc/gcc-4.1.1.build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/geno4/watplatt/gcc/gcc-4.1.1.build'
make: *** [all] Error 2
watplatt@haplo.watson.ibm.com:/geno4/watplatt/gcc/gcc-4.1.1.build $

Explicit declarations of the libraries I want to load 
(/usr/local/lib/libgmp.a, for example) does not improve things.

But then, there's things in this configuration about which I am not sure 
what's going on -- where some environment vars are getting set, which 
ones which makefiles are seeing, etc.

WHICH logs do you want to see? which runs are most interesting to you?


Dan

pinskia at gcc dot gnu dot org wrote:

>------- Comment #2 from pinskia at gcc dot gnu dot org  2006-09-30 23:28 -------
>Can you attach the full log because I know people that actually build gfortran
>on AIX all the time in fact with --with-gmp, etc:
>--with-gmp=/farm/dje --with-mpfr=/farm/dje 
>http://gcc.gnu.org/ml/gcc-testresults/2006-09/msg01648.html
>
>
>  
>


-- 


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


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