Re: Cannot Compile GCC 9.3 on AIX 6.1 -- ar: 0707-108 File .libs/libmpn.a is not an archive file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I work with a few different unix systems and build binutils+gcc for
them.  The AIX version I do this for is 6.1 TL06 SP09.

After I build binutils on AIX, I remove a few of the binaries because
they don't appear to properly work on AIX, though I do not have this
issue on Linux/HPUX/Solaris.  These are: ar as ld nm ranlib strip.  I
think that's probably most of the common tools for binutils, so maybe
try building gcc without binutils?

The most recent version I've done this for is gcc 8.3.0 and binutils
2.26.  I was not able to get newer versions of binutils to build on my
AIX host at all, which is why it was not something more contemporary
with gcc 8.3.0.  So my experience here may not matter if something is
different in gcc 9.3.0.


On Wed, Nov 4, 2020 at 2:57 PM Chris Pittsley <chris.pittsley@xxxxxxxxxx> wrote:
>
> Kai,
>
> Thanks for the help, that lead me to the answer. The problem was that
> make was using the IBM ranlib and ar, while libmpn.a was in the format
> used by GNU ar. I fixed my path to point to the GNU binutils and now
> that step is completing.
>
> Hitting another error now however. In the section "Configuring stage 1
> in ./mpfr", make is failing with:
>
> checking for __gmpz_init in -lgmp... no
> configure: error: libgmp not found or uses a different ABI (including
> static vs shared).
>
> Here are the steps I took to get here:
>
> git clone --branch=releases/gcc-9 git://gcc.gnu.org/git/gcc.git gcc
> cd gcc/
> contrib/download_prerequisites
> mkdir ../objdir
> cd ../objdir
> ../gcc/configure --prefix=/usr/gcc --enable-languages=c,c++,go
> make SHELL=/bin/bash CONFIG_SHELL=/bin/bash
>
> --
> Chris Pittsley
> Engineering and Support
> Alebra Technologies, Inc.
> 508-306-1332
>
> -----Original Message-----
> From: Kai Ruottu <kai.ruottu@xxxxxxxxxxx>
> To: Chris Pittsley <chris.pittsley@xxxxxxxxxx>, gcc-help@xxxxxxxxxxx
> <gcc-help@xxxxxxxxxxx>
> Subject: Re: Cannot Compile GCC 9.3 on AIX 6.1 -- ar: 0707-108 File
> .libs/libmpn.a is not an archive file.
> Date: Wed, 04 Nov 2020 11:19:14 +0200
>
>
> > Kai Ruottu kirjoitti 4.11.2020 klo 2.41:
> >
> > This was forgotten in the error notifications :
> >
> > Usage: ranlib [-t] [-X {32|64|32_64}] [--] file ...
> >
> > When I looked in the 'gcc-9.3.0/configure' there was this :
> >
> > *-*-aix4.[3456789]* | *-*-aix[56789].*)
> >     # nm and ar from AIX 4.3 and above require -X32_64 flag to all
> > ar
> > and nm
> >     # commands to handle both 32-bit and 64-bit objects.  These
> > flags are
> >     # harmless if we're using GNU nm or ar.
> >     extra_arflags_for_target=" -X32_64"
> >     extra_nmflags_for_target=" -B -X32_64"
> >     ;;
> >
> > Why this wasn't forwarded into your Makefile(s) is one question...
> > How
> > did
> > you configured your GCC build when the '*-*-aix[56789].*' template
> > didn't match
> > to your $host/$target name?
> >
> The thread from August could give some hints...
>
> http://gcc.1065356.n8.nabble.com/Compiling-GCC-10-2-on-AIX-7-2-
> td1728174.html
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux