This is the mail archive of the
mailing list for the GCC project.
Re: Building GCC 4.0.4 on 64 bit Linux
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Brendon Costa <brendon dot j dot costa at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 20 May 2009 17:19:11 -0400
- Subject: Re: Building GCC 4.0.4 on 64 bit Linux
- References: <email@example.com>
On Thu, May 21, 2009 at 06:42:26AM +1000, Brendon Costa wrote:
> Hi all,
> I have to use GCC 4.0.4 (yes I know it is old, I plan to update to a
> new version with plugins in the future, but that will take a LOT of
> work). I recently started using a 64 bit Ubuntu OS instead of 32 bit.
> However I cant seem to get GCC 4.0.4 to compile on this platform.
> Basically while compiling I get a link error linking libgcc which is
> shown below.
> Does anyone know if it is possible to build this version of GCC for 64
> bit Ubuntu? I don't mind patching it a little to get it up and
> running, but this is the first time I have looked at working with 64
> bit platforms and am not familiar with ways around this link problem.
> My configure line looked like:
> ../../dev/gcc-4.0.4/configure -v --enable-languages=c,c++
> --prefix=/home/bcosta/build/install --enable-shared --with-system-zlib
> --without-included-gettext --enable-threads=posix --enable-nls
> --program-suffix=-4.0 --enable-clocale=gnu --enable-libstdcxx-debug
> --enable-objc-gc --enable-mpfr --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu
I believe that Ubuntu does not install the 32-bit libraries by default. The
error occurs in building 32-bit libgcc, which is produced in the normal x86_64
builds. Gcc has the concept of multi-lib, where it wants to support people who
use incompatible options, such as -m32 or -m64. It builds both libraries, and
then selects the appropriate library at link time, depending on the options.
You need to either:
1) Install the 32-bit development libraries in the appropriate places; (or)
2) Configure your compiler with --disable-multilib to prevent the 32-bit libgcc
from being built.
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA