Compiling gcc-4.2 on 64 bit Ubuntu

Andrew Haley aph@redhat.com
Wed Feb 28 13:22:00 GMT 2007


Terry Frankcombe writes:
 > 
 > I've run into trouble trying to compile gcc 4.2 (gcc-4.2-20070221) on an
 > amd64 machine running 64 bit Ubuntu.  I configure with:
 > 
 > ./configure --disable-multilibs --enable-languages=fortran
 > 
 > then doing a make gets as far as compiling ../.././gcc/crtstuff.c in
 > gcc-4.2-20070221/host-x86_64-unknown-linux-gnu/gcc.  /usr/include/gnu/stubs.h is included which then tries to include gnu/stubs-32.h, which doesn't exist, rather than gnu/stubs-64.h, which does.  Thus apparently __WORDSIZE is defined as 32.

Neither of these files are part of gcc.

 > Now Ubuntu has 64 bit libraries in /usr/lib and 32 bit libraries
 > in /usr/lib32 (with a simlink from /usr/lib64 to /usr/lib).

Well, that is totally broken.  Blame Ubuntu.

 > Any ideas about how I can coerce configure to set things up correctly to
 > build a 64 bit compiler?

Get a suitable set of sources for Ubuntu.  I suggest that they can be
downloaded from the Ubuntu web site.

Andrew.



More information about the Gcc-help mailing list