LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Intel i5 ABI problems in MPFR configure (http://www.linuxquestions.org/questions/linux-from-scratch-13/intel-i5-abi-problems-in-mpfr-configure-886996/)

d3xtrom3thorpha 06-18-2011 01:11 AM

Intel i5 ABI problems in MPFR configure
 
MPFR seems to hate the ABI selected by my GMP installation. However, when specifically using ABI=32 in the GMP configuration and following it with the MPFR config, I continue to get "libgmp not found or uses different ABI"

I tried configuring on a different processor, the Intel Atom. I get the same error.

I didn't have this error when configuring on an old Pentium 3 processor but, no longer have access to the P3 so I'm stuck with either the Atom or the i5.

Is this a common issue or does anyone know how to get around it?

Processor:
i5-2400 CPU @ 3.10GHz

Command entered:
configure –prefix=/tools –build=$LFS_TGT –with-gmp-include=/tools/include –with-mpfr-lib=/tools/lib

Variables:
$LFS_TGT (just the target OS)

MPFR Error:
libgmp not found or uses a different ABI.
"Please read the INSTALL file -- see "In case of problem".


http://www.mpfr.org/faq.html#no_libgmp

Code:

This test (checking for __gmpz_init in -lgmp) comes after the gmp.h detection. The failure occurs either because the GMP library could not be found (as it is not in the provided library search paths) or because the GMP library that was found does not have the expected ABI (e.g. 32-bit vs 64-bit). The latter problem can have several causes:

A wrong libgmp library has been picked up. This can occur if you have several GMP versions installed on the machine and something is wrong with the provided library search paths.

Wrong compiler options (CFLAGS) were given. In general, the presence or absence of the -m64 compiler option must match the library ABI.

A wrong gmp.h file has been picked up (if you have several GMP versions installed). Indeed, by default, MPFR gets the compiler options from the gmp.h file (with GMP 4.2.3 or later); this is needed because GMP does not necessarily use the default ABI. The consequence is that if the gmp.h file is associated with a library using a different ABI, the ABI-related options will be incorrect. Hence the failure.

Note: The config.log output gives more information than the error message. In particular, see the output of the test: checking for CC and CFLAGS in gmp.h; it should give you the default compiler options (from gmp.h).

Output from config.log concerning CC and CFLAGS:

Code:

Configure:3770: checking for CC and CFLAGS in gmp.h
Configure:3797: result: yes CC=gcc –std=gnu99 CFLAGS=-m32 -02 –pedantic –fomit-frame-pointer –mtune=pentiumpro –march=pentiumpro
Configure:3803: checking for CC=gcc –std=gnu99 and CFLAGS=-m32 -02 –pedantic –fomit-frame-pointer –mtune=pentiumpro –march=pentiumpro
Configure:3807: result: yes


d3xtrom3thorpha 06-18-2011 01:13 AM

FYI I'm in LFS tutorial version 6.6 section 5.4

druuna 06-18-2011 03:17 AM

Hi,

Which chapter are you actually stuck? You mentione 5.4, which is binutils and mpfr/gmp which part of gcc. I'm guessing 5.5. GCC-4.4.3 - Pass 1

The configure step you mention in your first post isn't present in the book and I do wonder if you "installed" the mpfr and gmp packages the correct way. This is what the book wants you to do:

- untar gcc
- enter newly created gcc source directory
- untar mpfr
- move untarred mpfr directory
- untar gmp
- move untarred gmp directory
- create gcc-build directory
- enter gcc-build
- start building (follow rest of the book).

Both mpfr and gmp are not to be build by themselves, they are picked up when building gcc. The commands for untarring and moving them are given in the book.

Hope this helps.

d3xtrom3thorpha 06-20-2011 06:17 AM

Fixed!

The tutorial v6.6 wasn't very clear to me about how to handle GMP and MPFR. That solved it in a jiffy.

Thanks

druuna 06-20-2011 08:02 AM

Nice to see you got it fixed!

And: You're welcome :)


All times are GMT -5. The time now is 10:10 PM.