Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libstdc++.la is not a valid libtool archive error - sticky?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
ali3nx
Guru
Guru


Joined: 21 Sep 2003
Posts: 476
Location: Winnipeg, Canada

PostPosted: Thu Jan 13, 2005 5:34 pm    Post subject: libstdc++.la is not a valid libtool archive error - sticky? Reply with quote

I have an install that was offline in a remote location for five months so i'm just enduring the pain of the last five months of upgrades. Specifically this problem would affect you if you have recently upgraded gcc.

compiles may fail to complete halting with errors such as the following examples
Code:
libtool: link: `/usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libstdc++.la' is not a valid libtool archive

or
Code:
libtool: link: `/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libstdc++.la' is not a valid libtool archive

or
Code:
libtool: link: `/usr/lib/gcc/i686-pc-linux-gnu/3.4.3.3.4.3.3/libstdc++.la' is not a valid libtool archive


The last example represents what can happen if you execute fix_libtool_files.sh more than once. Essentially if you use the script more than once you could get yourself into a really big pickle with the /usr/lib/gcc/{gcc-chost}/{gcc-version} path changing to an unrealistic version. Subsequent runs will add numerals to the path that gcc's libtool libraries reside in.

Fixing the problem is allways accomplished by changing to the gcc profile you wish to use gcc 3.3.5 or 3.4.3 with gcc-config then executing fix_libtool_files.sh {exact gcc version in the failed path}
For my system eradicator recommended the following based on the path in the third example above.

Code:
fix_libtool_files.sh 3.4.3.3.4.3.3


Since fix_libtool_files.sh moves the .la libraries to match the currently active gcc profile version the libraries will be in the correct location. Sometimes redundancy can kick ya in the butt :oops:

Here's the manual for fix_libtool_files.sh

Code:
# fix_libtool_files.sh
Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>]

    Where <old-gcc-version> is the version number of the
    previous gcc version.  For example, if you updated to
    gcc-3.2.1, and you had gcc-3.2 installed, run:

      # fix_libtool_files.sh 3.2

    If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu
    but you now have CHOST as i686-pc-linux-gnu, run:

      # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu

    Note that if only the CHOST and not the version changed, you can run
    it with the current version and the '--oldarch <old-CHOST>' arguments,
    and it will do the expected:

      # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu


If you experience libtool related compile failures refrencing missing .la files you should read this bug on bugzilla for the solution. eradicator proposed an unconventional method for using fix_libtool_files.sh. Essentially if you use the script more than once you could get yourself into a really big pickle with the gcc-lib/{gccversion} path changing to an unrealistic version.
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
MarkH
n00b
n00b


Joined: 11 Feb 2004
Posts: 25

PostPosted: Wed Jun 01, 2005 4:19 pm    Post subject: Reply with quote

Spot on for my problem - thanks

Mark
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4830
Location: Gothenburg, Sweden

PostPosted: Wed Jun 01, 2005 4:48 pm    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads in favour of the FAQ GF18: Emerge fails after upgrading gcc. libstdc++.la missing
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum