public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* libtool problems while building gcc
@ 2014-04-25  3:33 Dave Gittins
  2014-04-25  9:33 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Gittins @ 2014-04-25  3:33 UTC (permalink / raw)
  To: gcc-help

Hi,

Recently I managed to build gcc 4.4.0 and 4.4.7 with binutils included
(with some help here).

Now I am trying to build gcc 4.5.4 and 4.6.4, with binutils. I keep
getting an error:
libtool: Version mismatch error.  This is libtool 2.2.7a, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6.

Here is the process I am going through:
Untar gcc-4.5.4 source to gcc-4.5.4-src
Copy the binutils 2.20.1a source into the same src dir but don't
replace existing files
Symlink gcc-4.5.4-src/gmp to gmp-4.3.2, gcc-4.5.4-src/mpfr to
mpfr-2.4.2, and gcc-4.5.4-src/mpc to mpc-0.8.1
cd gcc-4.5.4-obj
../gcc-4.5.4-src/configure --prefix=... --disable-multilib
make

This fails as described. I did try later versions of binutils, but
they produced other compiler errors so I assumed they were too recent.
gcc 4.6.4 has similar issues.

This is on a Centos 6.5 machine which has gcc 4.4.7 installed locally.
I am confused about this. I have libtool 2.2.6 installed:
> libtool --version
ltmain.sh (GNU libtool) 2.2.6b

However inside the obj folder of my build, I see a different version:
> gcc-4.5.4-obj/binutils/libtool --version
libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a

Is this libtool version being built during the gcc build? It looks
like it is - but it does not seem to get installed in the --prefix
location... at least, the installed folders from my successful 4.4.0
and 4.4.7 builds do not contain any file called libtool.

Anyway is this the problem - a first stage generates files using my
local libtool 2.2.6, then it builds libtool 2.2.7, then uses the new
libtool which is not compatible with the earlier files...? Should I
install libtool 2.2.7 locally?

D

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libtool problems while building gcc
  2014-04-25  3:33 libtool problems while building gcc Dave Gittins
@ 2014-04-25  9:33 ` Jonathan Wakely
  2014-04-28  0:57   ` Dave Gittins
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2014-04-25  9:33 UTC (permalink / raw)
  To: Dave Gittins; +Cc: gcc-help

On 25 April 2014 04:33, Dave Gittins wrote:
> Hi,
>
> Recently I managed to build gcc 4.4.0 and 4.4.7 with binutils included
> (with some help here).
>
> Now I am trying to build gcc 4.5.4 and 4.6.4, with binutils. I keep
> getting an error:
> libtool: Version mismatch error.  This is libtool 2.2.7a, but the
> libtool: definition of this LT_INIT comes from libtool 2.2.6.
>
> Here is the process I am going through:
> Untar gcc-4.5.4 source to gcc-4.5.4-src
> Copy the binutils 2.20.1a source into the same src dir but don't
> replace existing files

I think doing combined tree builds (with binutils and GCC in the same
source tree) is only guaranteed to work with the top-of-tree versions
of each, otherwise various configury files don't match.

The simplest way I know to achieve what you seem to want is to install
binutils first, separately, to $PREFIX, then configure and install GCC
to the same $PREFIX. During its configuration GCC will notice that
binutils is installed in its final destination and will be configured
to automatically use $PREFIX/bin/as and $PREFIX/bin/ld rather than the
usual versions in your $PATH.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libtool problems while building gcc
  2014-04-25  9:33 ` Jonathan Wakely
@ 2014-04-28  0:57   ` Dave Gittins
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Gittins @ 2014-04-28  0:57 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Perfect, this is definitely what I should have been doing. I was
advised elsewhere to go for the combined builds but this sequence is
much better.

Thanks
D

On Fri, Apr 25, 2014 at 7:33 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 25 April 2014 04:33, Dave Gittins wrote:
>> Hi,
>>
>> Recently I managed to build gcc 4.4.0 and 4.4.7 with binutils included
>> (with some help here).
>>
>> Now I am trying to build gcc 4.5.4 and 4.6.4, with binutils. I keep
>> getting an error:
>> libtool: Version mismatch error.  This is libtool 2.2.7a, but the
>> libtool: definition of this LT_INIT comes from libtool 2.2.6.
>>
>> Here is the process I am going through:
>> Untar gcc-4.5.4 source to gcc-4.5.4-src
>> Copy the binutils 2.20.1a source into the same src dir but don't
>> replace existing files
>
> I think doing combined tree builds (with binutils and GCC in the same
> source tree) is only guaranteed to work with the top-of-tree versions
> of each, otherwise various configury files don't match.
>
> The simplest way I know to achieve what you seem to want is to install
> binutils first, separately, to $PREFIX, then configure and install GCC
> to the same $PREFIX. During its configuration GCC will notice that
> binutils is installed in its final destination and will be configured
> to automatically use $PREFIX/bin/as and $PREFIX/bin/ld rather than the
> usual versions in your $PATH.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-28  0:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25  3:33 libtool problems while building gcc Dave Gittins
2014-04-25  9:33 ` Jonathan Wakely
2014-04-28  0:57   ` Dave Gittins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).