This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: `make` error: gmp.h: No such file or directory.
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: zero modulo <zeromodulo at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 19 Mar 2013 20:04:26 +0000
- Subject: Re: `make` error: gmp.h: No such file or directory.
- References: <CAA8xkY=O1hqcj-bZ6PsxyKDsPmCn3rGNfmTK+cBUr3UqUne5iQ at mail dot gmail dot com> <CAA8xkYncyN_pyzSmyVFfY93i0hTJyJDNyF_hs2B71MvDwLbv2w at mail dot gmail dot com>
On 19 March 2013 15:23, zero modulo <zeromodulo@gmail.com> wrote:
> On Mon, Mar 18, 2013 at 12:07 AM, zero modulo <zeromodulo@gmail.com> wrote:
>> $ LDFLAGS="-L/sandbox/builds/lib" CPPFLAGS="-I/sandbox/builds/include"
>> ./configure --prefix=$PREFIX
>> [...]
>>
>> $ make
>> ../.././gcc/double-int.h:24:17: fatal error: gmp.h: No such file or directory
>> compilation terminated.
>> make[3]: *** [c-lang.o] Error 1
>> make[3]: Leaving directory
>> `/sandbox/sources/gcc-4.7.2/host-i686-pc-linux-gnu/gcc'
>> make[2]: *** [all-stage1-gcc] Error 2
>> make[2]: Leaving directory `/sandbox/sources/gcc-4.7.2'
>> make[1]: *** [stage1-bubble] Error 2
>> make[1]: Leaving directory `/sandbox/sources/gcc-4.7.2'
>> make: *** [all] Error 2
>>
>> $ ls /sandbox/builds/include/gmp.h
>> /sandbox/builds/include/gmp.h
>
> I haven't quite exactly figured out what was wrong in this case, but I
> decided to use GCC that came with my system. Thanks anyway.
You can't pass the GMP include dir in CPPFLAGS, you should follow the
documented procedure for building GCC instead, the easiest being the
one Andrew suggested.