gmp w/ mpfr for gcc's f95

Hugh Sasse hgs at dmu.ac.uk
Tue Nov 29 19:19:04 CET 2005


On Tue, 29 Nov 2005, Patrick Pelissier wrote:

> The problem is :
> 
> configure:23118: gcc -o conftest -Wall -Wmissing-prototypes -g -O2  
> conftest.c -lgmp   >&5
> /usr/local/bin/ld: skipping incompatible
> /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/../../../libgmp.so when
> searching for -lgmp
> /usr/local/bin/ld: skipping incompatible
> /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.3/../../../libgmp.a when
> searching for -lgmp
> /usr/local/bin/ld: skipping incompatible /usr/local/lib/libgmp.so when
> searching for -lgmp
> /usr/local/bin/ld: skipping incompatible /usr/local/lib/libgmp.a when
> searching for -lgmp
> /usr/local/bin/ld: cannot find -lgmp

I seem to have attempted a build of gmp in the past.
> 
> Try with the '--with-gmp-build' trick I told you. It should work.

It seems much happier:

checking whether to build static libraries... yes
configure: creating libtool
checking for gmp.h... yes
checking for recent GMP... yes
checking for gmp internal files... yes
checking for valid BITS_PER_MP_LIMB and BYTES_PER_MP_LIMB... yes
checking for __gmpz_init in -lgmp... yes
checking for __gmpn_sub_nc... no
checking if gmp.h version and libgmp version are the same...
(4.1.4/4.1.4) yes
configure: creating ./config.status
config.status: creating Makefile


Ah, I didn't see that --with-gmp-build in the ./configure --help,
somehow.  OK, I'll try doing the make and make check now.

Thank you very much.
        Hugh
> 
> --
>  Patrick Pelissier
> 
> 
> On 11/29/05, Hugh Sasse <hgs at dmu.ac.uk> wrote:
> > On Tue, 29 Nov 2005, Patrick Pelissier wrote:
> >
> > > > > > Configure for mpfr has '--with-gmp=/opt/csw', which is the prefix for
> > > > >
> > > > > so the defualt prefix for gmp being /usr/local if I put
> > > > > --with-gmp=/usr/local  that should work?    I was expecting the
> > > > > gnu-ish defaults of /usr/local to be picked up and handled correctly
> > > > > automatically, so I wondered if I had to point CFLAGS or something
> > > > > at the actual source directories..
> > > >
> > > > configure --with-gmp=/usr/local gave:
> > > >
> > > > checking for gmp.h... yes
> > > > checking for recent GMP... yes
> > > > checking for gmp internal files... no
> > > > checking for working alloca.h... yes
> > > > checking for alloca... yes
> > > > checking for __gmpz_init in -lgmp... no
> > > > configure: error: libgmp not found
> > > > neelix hgs 88 %>
> > > >
> > > > No, I'm still confused then.
> > >
> > >  ./configure should work if GMP is installed in /usr/local.
> > >  Could you send to mpfr at loria.fr your config.log and the complete
> > > output of the configure script?
> >
> > neelix hgs 109 %> ./configure --with-gmp-dir=/usr/local
> > checking for a BSD-compatible install... /usr/local/bin/install -c
> > checking whether build environment is sane... yes
> > checking for gawk... gawk
> > checking whether make sets $(MAKE)... yes
> > checking build system type... sparc-sun-solaris2.9
> > checking host system type... sparc-sun-solaris2.9
> > checking for gcc... gcc
> > checking for C compiler default output file name... a.out
> > checking whether the C compiler works... yes
> > checking whether we are cross compiling... no
> > checking for suffix of executables...
> > checking for suffix of object files... o
> > checking whether we are using the GNU C compiler... yes
> > checking whether gcc accepts -g... yes
> > checking for gcc option to accept ANSI C... none needed
> > checking for style of include used by make... GNU
> > checking dependency style of gcc... gcc3
> > checking for ICC... no
> > checking for function prototypes... yes
> > checking how to run the C preprocessor... gcc -E
> > checking for egrep... egrep
> > checking for ANSI C header files... yes
> > checking for sys/types.h... yes
> > checking for sys/stat.h... yes
> > checking for stdlib.h... yes
> > checking for string.h... yes
> > checking for memory.h... yes
> > checking for strings.h... yes
> > checking for inttypes.h... yes
> > checking for stdint.h... no
> > checking for unistd.h... yes
> > checking for string.h... (cached) yes
> > checking for an ANSI C-conforming const... yes
> > checking for working volatile... yes
> > checking for main in -lm9x... no
> > checking for main in -lm... yes
> > checking whether time.h and sys/time.h may both be included... yes
> > checking limits.h usability... yes
> > checking limits.h presence... yes
> > checking for limits.h... yes
> > checking float.h usability... yes
> > checking float.h presence... yes
> > checking for float.h... yes
> > checking stdarg.h usability... yes
> > checking stdarg.h presence... yes
> > checking for stdarg.h... yes
> > checking sys/time.h usability... yes
> > checking sys/time.h presence... yes
> > checking for sys/time.h... yes
> > checking sys/fpu.h usability... no
> > checking sys/fpu.h presence... no
> > checking for sys/fpu.h... no
> > checking for memset... yes
> > checking for setlocale... yes
> > checking for strtol... yes
> > checking for gettimeofday... yes
> > checking for union fpc_csr... no
> > checking for fesetround... no
> > checking for gcc float-conversion bug... no
> > checking for denormalized numbers... yes
> > checking if NAN == NAN... no
> > checking if charset has consecutive values... yes
> > checking for math/round... no
> > checking for math/trunc... no
> > checking for math/floor... yes
> > checking for math/ceil... yes
> > checking for math/rint... no
> > checking for long double... yes
> > checking format of `long double' floating point... IEEE quad, big endian
> > checking for a sed that does not truncate output... /usr/local/bin/sed
> > checking for ld used by gcc... /usr/local/bin/ld
> > checking if the linker (/usr/local/bin/ld) is GNU ld... yes
> > checking for /usr/local/bin/ld option to reload object files... -r
> > checking for BSD-compatible nm... /usr/ccs/bin/nm -p
> > checking whether ln -s works... yes
> > checking how to recognise dependent libraries... pass_all
> > checking dlfcn.h usability... yes
> > checking dlfcn.h presence... yes
> > checking for dlfcn.h... yes
> > checking the maximum length of command line arguments... 262144
> > checking command to parse /usr/ccs/bin/nm -p output from gcc object... ok
> > checking for objdir... .libs
> > checking for ar... ar
> > checking for ranlib... ranlib
> > checking for strip... strip
> > checking if gcc static flag  works... yes
> > checking if gcc supports -fno-rtti -fno-exceptions... no
> > checking for gcc option to produce PIC... -fPIC
> > checking if gcc PIC flag -fPIC works... yes
> > checking if gcc supports -c -o file.o... yes
> > checking whether the gcc linker (/usr/local/bin/ld) supports shared libraries... yes
> > checking dynamic linker characteristics... solaris2.9 ld.so
> > checking how to hardcode library paths into programs... immediate
> > checking whether stripping libraries is possible... no
> > checking if libtool supports shared libraries... yes
> > checking whether to build shared libraries... no
> > checking whether to build static libraries... yes
> > configure: creating libtool
> > checking for gmp.h... yes
> > checking for recent GMP... yes
> > checking for gmp internal files... no
> > checking for working alloca.h... yes
> > checking for alloca... yes
> > checking for __gmpz_init in -lgmp... no
> > configure: error: libgmp not found
> > neelix hgs 110 %>
> >
> > Hope that helps.  Thank you,
> >         Hugh
> >
> > >
> > > --
> > >  Patrick Pelissier
> > >
> >
> >
> >
> 



More information about the gmp-discuss mailing list