public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc-4.3.0 fails to find mpfr.h on centos-4.5 (using gcc3 and gcc4)
@ 2008-03-15  2:18 Bill Broadley
  2008-03-15  2:52 ` gcc-4.3.0 fails to find mpfr.h on (centos and osx) Bill Broadley
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Broadley @ 2008-03-15  2:18 UTC (permalink / raw)
  To: gcc-help


Identical experience to my previous attempt on osx-10.5.2:

[root@amala gcc-4.3.0]# gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)
[root@amala gcc-4.3.0]#

Built gmp-4.2.2 from scratch, ./configure --prefix=/opt/pkg/gmp-4.2.2; make; 
make install

Built mpfr-2.3.1 from scratch, ./configure --prefix=/opt/pkg/mpfr-2.3.1 
--with-gmp=/opt/pkg/gmp-4.2.2/ --with-gmp-build=/opt/src/gmp-4.2.2/

Tried to configure 4.3.0:
[root@amala gcc-4.3.0]# ./configure --prefix=/opt/pkg/gcc-4.3.0 
--with-gmp=/opt/pkg/gmp-4.2.2 --with-mpft=/opt/pkg/mpfr-2.3.1
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... 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 correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
gcc-4.3.0]# ls -al /opt/pkg/mpfr-2.3.1 /opt/pkg/mpfr-2.3.1/include
/opt/pkg/mpfr-2.3.1:
total 20
drwxr-xr-x  5 root root 4096 Mar 14 18:54 .
drwxr-xr-x  4 root root 4096 Mar 14 18:54 ..
drwxr-xr-x  2 root root 4096 Mar 14 18:54 include
drwxr-xr-x  2 root root 4096 Mar 14 18:54 lib
drwxr-xr-x  3 root root 4096 Mar 14 18:54 share

/opt/pkg/mpfr-2.3.1/include:
total 56
drwxr-xr-x  2 root root  4096 Mar 14 18:54 .
drwxr-xr-x  5 root root  4096 Mar 14 18:54 ..
-rw-r--r--  1 root root  6119 Mar 14 18:54 mpf2mpfr.h
-rw-r--r--  1 root root 37381 Mar 14 18:54 mpfr.h
[root@amala gcc-4.3.0]#

gcc-4.3.0]# cat /opt/pkg/mpfr-2.3.1/include/mpfr.h  | grep -i version
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
/* Define MPFR version number */
#define MPFR_VERSION_MAJOR 2
#define MPFR_VERSION_MINOR 3
#define MPFR_VERSION_PATCHLEVEL 1
#define MPFR_VERSION_STRING "2.3.1"
/* Macros dealing with MPFR VERSION */
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
#define MPFR_VERSION \
MPFR_VERSION_NUM(MPFR_VERSION_MAJOR,MPFR_VERSION_MINOR,MPFR_VERSION_PATCHLEVEL)
__MPFR_DECLSPEC __gmp_const char * mpfr_get_version _MPFR_PROTO ((void));
/* Macro version of mpfr_stack interface for fast access */
#define mpfr_version (mpfr_get_version())
[root@amala gcc-4.3.0]#

BTW, I tried gcc4:
gcc version 4.1.1 20070105 (Red Hat 4.1.1-53)

To compile gmp and mpfr with gcc4 and then try again, same thing.




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

* Re: gcc-4.3.0 fails to find mpfr.h on (centos and osx)
  2008-03-15  2:18 gcc-4.3.0 fails to find mpfr.h on centos-4.5 (using gcc3 and gcc4) Bill Broadley
@ 2008-03-15  2:52 ` Bill Broadley
  0 siblings, 0 replies; 2+ messages in thread
From: Bill Broadley @ 2008-03-15  2:52 UTC (permalink / raw)
  To: gcc-help


Sorry, false alarm on the centos, I had a typo, using -with-mpft instead of
-with-mpfr.

On OSX I found the config.log which has additional information:

configure:4542: checking for correct version of mpfr.h
configure:4573: gcc -o conftest -g -O2 -I/opt/pkg/gmp-4.2.2//include -I/opt/pkg/
mpfr-2.3.1//include   conftest.c  -L/opt/pkg/gmp-4.2.2//lib -L/opt/pkg/mpfr-2.3.
1//lib -lmpfr -lgmp >&5
ld: warning in /opt/pkg/mpfr-2.3.1//lib/libmpfr.dylib, file is not of required a
rchitecture
ld: warning in /opt/pkg/gmp-4.2.2//lib/libgmp.dylib, file is not of required arc
hitecture
Undefined symbols:
   "_mpfr_erfc", referenced from:
       _main in cc4HUaNn.o
   "_mpfr_atan2", referenced from:
       _main in cc4HUaNn.o
   "_mpfr_init", referenced from:
       _main in cc4HUaNn.o
       _main in cc4HUaNn.o
   "_mpfr_subnormalize", referenced from:
       _main in cc4HUaNn.o

So somehow the default architecture of gmp and mpfr aren't the same as what
gcc uses?

gcc-4.3.0 root# file /opt/pkg/mpfr-2.3.1//lib/libmpfr.dylib
/opt/pkg/mpfr-2.3.1//lib/libmpfr.dylib: Mach-O 64-bit dynamically linked 
shared library ppc64
gcc-4.3.0 root# file /opt/pkg/gmp-4.2.2//lib/libgmp.dylib
/opt/pkg/gmp-4.2.2//lib/libgmp.dylib: Mach-O 64-bit dynamically linked shared 
library ppc64

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

end of thread, other threads:[~2008-03-15  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-15  2:18 gcc-4.3.0 fails to find mpfr.h on centos-4.5 (using gcc3 and gcc4) Bill Broadley
2008-03-15  2:52 ` gcc-4.3.0 fails to find mpfr.h on (centos and osx) Bill Broadley

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