[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
configure can't find libgmp
From: |
Christer Jansson |
Subject: |
configure can't find libgmp |
Date: |
Sat, 8 Dec 2007 22:04:38 +0100 |
Hi,
I'm trying to build Guile, but it fails already at the configure script.
This is the printout:
checking for __gmpz_init in -lgmp... no
configure: error: GNU MP not found, see README
Ok so I look in the config.log file and I find:
configure:35538: checking for __gmpz_init in -lgmp
configure:35573: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib co
nftest.c -lgmp -lm -lltdl >&5
/usr/bin/ld: Undefined symbols:
___gmpz_init
collect2: ld returned 1 exit status
configure:35579: $? = 1
configure: failed program was:
| /* confdefs.h. */
----- skipped header file contents ------
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char __gmpz_init ();
| int
| main ()
| {
| return __gmpz_init ();
| ;
| return 0;
| }
configure:35597: result: no
configure:35607: error: GNU MP not found, see README
So I tried to compile an identical program with the same command and
got the same result.
Funny thing is, I've got GNU MP installed under /usr/local and when I
trace the execution of the compilation, it seems like the linker finds
it. And when I run nm on the libs, it says the symbol is defined.
Passing this information to configure via
CPPFLAGS=-I/usr/local/include and LDFLAGS=-L/usr/local/lib didn't make
any difference.
So the mystery is this; the GNU MP libs apparently are accessible,
they apparently define the symbol (___gmpz_init) and still gcc
complains about that symbol missing:
$ gcc -o conftest -g -O2 ~/conftest.c -lgmp -lm -lltdl
/usr/bin/ld: Undefined symbols:
___gmpz_init
collect2: ld returned 1 exit status
$
One other thing I find slightly mysterious is the fact that the source
does not define any macro adding an extra underscore, and it only
refers to __gmpz_init, but the symbol defined in the libs and reported
as missing is ___gmpz_init.
I'm using Mac OS 10.4 on a G5 processor.
Anyone got a clue?
--
Christer
- configure can't find libgmp,
Christer Jansson <=