This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building and Installing gcc-4.7.0 on Ubuntu 12.04


On 6 June 2012 06:48, Anup Ghatage wrote:
> Hello,
>
> I installed a mint Ubuntu 12.04, ran the updates and then downloaded
> the tar for gcc-4.7.0.
>
> Untar'ed it.
> ./configure

You didn't read the docs then, see  http://gcc.gnu.org/wiki/InstallingGCC

> make -j4
>
> then it showed this:
> make[4]: Leaving directory `/home/UserPC/Downloads/gcc-4.
> 7.0/i686-pc-linux-gnu/libgcc'
> In file included from /usr/include/stdio.h:28:0,
> ? ? ? ? ? ? ? ? from ../.././libgcc/../gcc/tsystem.h:88,
> ? ? ? ? ? ? ? ? from ../.././libgcc/libgcc2.c:29:
> /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such
> file or directory

I think this might mean you need to install the build-essential package.

> compilation terminated.
> make[3]: *** [_negdi2.o] Error 1
> In file included from /usr/include/stdio.h:28:0,
> ? ? ? ? ? ? ? ? from ../.././libgcc/../gcc/tsystem.h:88,
> ? ? ? ? ? ? ? ? from ../.././libgcc/libgcc2.c:29:
> /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such
> file or directory
> compilation terminated.
> make[3]: *** [_lshrdi3.o] Error 1
> make[3]: Leaving directory
> `/home/UserPC/Downloads/gcc-4.7.0/i686-pc-linux-gnu/libgcc'
> make[2]: *** [all-stage1-target-libgcc] Error 2
> make[2]: Leaving directory `/home/UserPC/Downloads/gcc-4.7.0'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/home/UserPC/Downloads/gcc-4.7.0'
> make: *** [all] Error 2
> UserPC@UserPC-desktop:~/Downloads/gcc-4.7.0$
>
> I did some background search, the predefs.h error seems to occur when
> trying to install a 32 bit binary on a 64 bit Linux.
> But My Linux is 32 bit, I double checked that with uname -m, it was i686.
>
> Also something worth mentioning, when I installed GMP from source, its
> configuration file showed a waring saying : gmp.h and libgmp are of
> different versions 5.0.5 and 5.0.2 respectively.

This should be solved by following the instructions at
http://gcc.gnu.org/wiki/InstallingGCC

> Pretty clueless right now, would really appreciate it if anyone could
> help. Also, apologies, if this is a repost.

If you're clueless you should try reading the docs.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]