This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help required when building gcc-4.1.2 for i686 environment
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "Prashant Batra (prbatra)" <prbatra at cisco dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 9 Feb 2012 21:37:09 +0000
- Subject: Re: Help required when building gcc-4.1.2 for i686 environment
- References: <B97B134FACB2024DB45F524AB0A7B7F205CFDA5D@XMB-BGL-419.cisco.com>
On 9 February 2012 21:17, Prashant Batra (prbatra) wrote:
> Hello,
>
> I am trying to build a gcc/g++ tool-chain for i486 architechture on an
> x86_64 machine.
> I downloaded gcc-4.1.2 and configured it with host as x86_64 and target
> as i486 after installing the pre-requistes i.e gmp, mrpf, and mpc
> libraries .
I don't think you need MPC for GCC 4.1.2
> ../gcc-4.1.2/configure --with-gmp=/auto/local//prbatra/gcc-install/
> --with-mpfr=/auto/local//prbatra/gcc-install/
> --prefix=/auto/local//prbatra/gcc-install/ --host=x86_64-gnu-linux
> --target=i486-gnu-linux --enable-languages=c,c++,objc
Do you really need to install GMP and MPFR manually? Installing them
in non-system directories causes issues unless you build them with
--disable-shared
It's easier to put the GMP and MPFR sources in the GCC tree or install
your OS vendor's packages.
See http://gcc.gnu.org/wiki/InstallingGCC
> In file included from ./gthr-default.h:1,
> ? ? ? ? ? ? ? ? from ../../gcc-4.1.2/gcc/gthr.h:114,
> ? ? ? ? ? ? ? ? from ../../gcc-4.1.2/gcc/unwind-dw2.c:42:
> ../../gcc-4.1.2/gcc/gthr-posix.h:43:21: error: pthread.h: No such file
> or directory
> ../../gcc-4.1.2/gcc/gthr-posix.h:44:20: error: unistd.h: No such file or
> directory
You don't have the necessary system headers installed, you need to
install a package such as glibc-devel or libc-dev