[Clfs-support] gmp-4.3.1. fails to compile in Ch. 5, "Constructing Cross Compile Tools"

Dan McGhee beesnees at grm.net
Wed Sep 2 17:36:18 PDT 2009

Dan McGhee wrote:
> Using SVN-20090831-Native-Multilib
> Compile fails with "C++ compiler not available, see config.log for 
> details."
I don't know how, or if I can, respond to something in the archives. Jim 
Gifford replied to this with:
> This error message implies that g++ is not available from the host, what 
> does config.log show.
First, the "config.log" just repeated the error with reference to lines 
in "configure." The info I included with my first post were the lines to 
which the "config.log" referred me. They test for the presence of g++, 
which I know is present and other parts of "configure" found, and for 
some reason the test failed.

I did some research today and learned (?) a couple of things from the 
"GMP Manual" at the GMP website. GMP apparently isn't really good at 
"guessing" the processor type. The search for a compiler is based on the 
results of that "guess." You can take the guesswork out by passing 
--build=$(processor) and/or --host=$(system). I hesitate to use the 
terms "host" and "target" because there was a discussion in the manual 
about using those terms incorrectly. However.........

After I unsuccessfully tried a few iterations with --build= and --host=, 
I stumbled on to GMP's ability to search for and *determine *the 
location of the compiler by passing `--enable-cxx=detect.` My paraphrase 
of what the manual says is that when you pass `--enable-cxx` 
`./configure` must know exactly who and where the compiler is. 
Therefore, if the original guess on the processor is wrong, GMP will not 
compile. I've seen discussions that ABI=32 may solve the compile 
problems. (I think ABI is right.) The manual indicates that GPM is 
really good at choosing 32 or 64 bit libraries depending on which is the 
most efficient. This, however, is apparently predicated on the success 
of processor identification and compiler location.

So I used just the instructions in the book except that I passed 
`--enable-cxx=determine` and I got past the "find the compiler" point 
successfully. The compile, however, failed because there is no m4 
installed in my Ubuntu--boy do I love LFS. I'm going to take care of 
that and see what happens.

The other side of this logic is that maybe there is something else going 
on that I, in my inexperience, can't see. I think what I'm doing now 
means that m4 is a dependency of GMP, but neither CLFS stable nor 
development install m4 before GMP. I also don't know if m4 is standard 
on distributions. Guess I'm gonna learn something else.


More information about the Clfs-support mailing list