Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libstdc++.la: No such file or directory - errors and tips
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Mon Apr 04, 2005 10:39 am    Post subject: libstdc++.la: No such file or directory - errors and tips Reply with quote

Just thought I might contribute with a useful post since it seems that for some odd reason the toolchain hardcoded issues aren't going away and maybe this will help solve any given issues at hand. Of course, please refer to kallemej's FAQ since it basically describes all the steps (all 2 of them... har har) to fixing this issue. I hate to rehash this but I think that what the other sticky lacks is perhaps coverage and by inserting keywords I hope to make this thread more searchable than other threads previously were.

Here are the steps for the simplest solution, so GET READY :):

Quote:
Note the following pattern in a compilation error:

grep: /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.la: No such file or directory -> /usr/${ERROR_ROOT_DIRECTORY}/${CHOST}/${GCC_VERSION}/libstdc++.la

What you want to do is run the following command as root with the given pattern as described above:
Code:
fix_libtool_files.sh ${GCC_VERSION}



If you still have issues (mostly due to a differing architecture, so an error message shows i386-pc-linux-gnu as opposed to i686-pc-linux-gnu for example) and you have already tried kallemej's advice for fixing archs (see FAQ above), make sure that you didn't accidentally mess up your CHOST and CFLAGS variables by choosing an incorrect/inconsistent pair for CHOST and -march or -mcpu. Also make sure that you choose the right stage tarball for the right architecture. See the installation handbook for more details on the proper configuration

Other possible solutions:
1) Try removing ~x86 (or ~amd64 possibly?) if you have added it to your /etc/make.conf file under the ACCEPT_KEYWORDS.
2) Here's a bug report that may apply to you if you emerged the latest gcc 3.4.3 version (currently version 3.4.3.20050110): http://bugs.gentoo.org/show_bug.cgi?id=84324
3) If you have a reoccurring issue with versioning (ie 3.4.3.3.4.3... etc) after running fix_libtool_files.sh, look here for some suggestions on how to remedy your problem: http://forums.gentoo.org/viewtopic-t-279136.html
4) If none of the above apply, please try post feedback on the thread noted below with your emerge --info, the stage tarball that you used, and your architecture.
5) Last resort method!!! If you can't seem to fix it any other way, just symlink the error directory to your actual gcc directory, ie something like...
Code:
ln -sf /usr/lib/gcc/${CHOST} /usr/${ERROR_ROOT_DIRECTORY}/${CHOST}/${GCC_VERSION}
Just substitute the given values as shown above by the compilation error pattern. I do not suggest this fix and I believe that you should exhaust every other option before doing this since this is like taking painkillers instead of fixing the problem; the painkillers don't solve the issue but just mask the underlying problem. If you didn't get my analogy, all that you're doing is creating a symlink to cover up the underlying problem as opposed to fixing the actual problem, so instead of fixing it once, you are just praying and hoping that the symlink, and hence the error will remain constant throughout all of your compiling so you don't have to add additional symlinks to solve the problem.

Note: You will have to restart your emerge (emerge --resume works well in this case).

Also, some people have reported seeing MUCH longer items than just something like "3.4.3" for example (like full gcc profile names, etc), so using something similar to "gcc-XXXXXXXXXXX" maybe necessary if it shows up in place of "3.4.3" for '${GCC_VERSION}'.

Moreover, if you are one of the people that has issues with a CHOST variable change (ie i386-pc-linux-gnu errors when using a i686-pc-linux-gnu type compiler profile for example), a solution has been offered by dirtyepic which may or may not solve your issue. Please head here for more details: http://forums.gentoo.org/viewtopic-t-321340.html



Tips for toolchain maintanence: As I stated previously in another post, I have very little issues with this and my installation is actually quite stable with the given packages I have (gcc 3.4.3, latest glibc, as well as a number of unstable packages), since I rebuild my toolchain via a bootstrap, then system, and finally rebuild world.

So what I suggest doing when you receive a new version of gcc is to automatically do the above, or like kallemej suggests in his FAQ, but just use your previous compiler version for gcc with fix_libtool_files.sh, and/or use your current version if you upgraded from something like 3.4.3 to 3.4.3-r1 for example, like shown below:

Code:
fix_libtool_files.sh 3.4.3


As silly as it may seem that little -r1 can really cause issues with compiling certain packages if things are hardcoded improperly.

Also, if you upgrade glibc I suggest running

Code:
/usr/portage/scripts/bootstrap.sh && emerge -e system && emerge -e world


since it should decrease the probability of inconsistencies with the glibc upgrade. You can use your favorite toolchain upgrade method in place of the second command, as many people have discovered scripts which will help automate the task for them (see this thread about a script named tcupdate). I know it's a bit redundant but it appears to work for some when other solutions wouldn't.

Good luck and hopefully the compiling with work well for you from now on :).


emerges I have seen been affected by this issue (please PM me so I can add more to the list to make it more searchable):
    Amarok
    avifile
    beep-media-player
    gcc (emerge --newuse -uD world) # this is due to some flags changing in gcc
    gedit
    Gnome
    GTK
    imagemagick
    imlib
    KDE
    PHP
    xine-lib



Please post any issues here: http://forums.gentoo.org/viewtopic-p-2269364.html

Revision history
    2005.04.10 - Added reference to emerge --newuse world and changing CHOST var.
    2005.04.13 - Added CHOST/CFLAGS relevancy reasoning.
    2005.04.14 - Changed glibc upgrade suggestion and wording.
    2005.04.17 - Added reoccurring version error suggestion and trimmed some lines.
    2005.04.18 - Added 'dirty symlink hack' and revised compile error pattern.
    2005.04.19 - Grammatical fix and partioned solutions a bit better.


Last edited by yaneurabeya on Mon Jun 06, 2005 3:55 am; edited 5 times in total
Back to top
View user's profile Send private message
fury
n00b
n00b


Joined: 01 May 2003
Posts: 34
Location: California

PostPosted: Thu Apr 21, 2005 3:24 am    Post subject: Reply with quote

Thanks, this worked perfectly!
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Thu Apr 21, 2005 7:09 am    Post subject: Reply with quote

Please post to the feedback thread next time -_-...
Back to top
View user's profile Send private message
protokol
n00b
n00b


Joined: 02 Jan 2005
Posts: 9

PostPosted: Sun May 01, 2005 10:06 pm    Post subject: Didn't work here. Reply with quote

i ran:
theeric portage # fix_libtool_files.sh 3.3.5
* Scanning libtool files for hardcoded gcc library paths...
* [1/6] Scanning /lib ...
* [2/6] Scanning /usr/lib ...
* FIXING: /usr/lib/gstreamer-0.8/libgstmodplug.la ...[]
* FIXING: /usr/lib/libSDL.la ...[]
* [3/6] Scanning /opt/sun-jdk-1.4.2.08/jre/lib ...
* [4/6] Scanning /usr/games/lib ...
* [5/6] Scanning /usr/i686-pc-linux-gnu/lib ...
* [6/6] Scanning /usr/local/lib ...

i tried emerging gtk+ once again, with the same error:
grep: //usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/libstdc++.la: No such file or directory
/bin/sed: can't read //usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/libstdc++.la: No such file or directory
libtool: link: `//usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/libstdc++.la' is not a valid libtool archive

I'm using stage 2 on x86

emerge --info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
Python: dev-lang/python-2.3.5 [2.3.5 (#2, Apr 28 2005, 20:29:35)]
dev-lang/python: 2.3.5
sys-apps/sandbox: [Not Present]
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.5, 1.9.4, 1.6.3, 1.7.9-r1, 1.4_p6, 1.8.5-r3
sys-devel/binutils: 2.15.92.0.2-r7
sys-devel/libtool: 1.5.16
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm avi bash-completion berkdb bitmap-fonts bonobo cdr crypt cups curl divx4linux dvd eds emboss encode esd fam ffmpeg foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile i8x0 imagemagick imlib java joystick jpeg junit libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl nptlonly offensive ogg oggvorbis opengl oss pam pdflib perl png python quicktime readline real samba scanner sdl session spell ssl svga tcltk tcpd theora tiff truetype truetype-fonts type1-fonts usb vorbis xml xml2 xprint xv xvid zlib userland_GNU kernel_linux libc_glibc"
Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Mon May 02, 2005 1:13 am    Post subject: Reply with quote

Note //usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/libstdc++.la ; I have already listed a number of fixes, with the last being possible if you can't see the beforementioned fixes to work.
And please next time _READ_ the documentation more carefully and note the fact that there is a feedback thread for comments such as these. I'm sorry, but I cannot stress this fact enough. So please... do that.

Also, do realize that you changed your CHOST since it's now i686 instead of i386, like the error message claims...
Back to top
View user's profile Send private message
kompressor
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2003
Posts: 127
Location: Randolph, VT

PostPosted: Sat Jun 04, 2005 1:27 am    Post subject: Re: libstdc++.la: No such file or directory - errors and tip Reply with quote

yaneurabeya wrote:

5) Last resort method!!! If you can't seem to fix it any other way, just symlink the error directory to your actual gcc directory, ie something like...
Code:
ln -sf /usr/lib/gcc/${CHOST} /usr/${ERROR_ROOT_DIRECTORY}/${CHOST}/${GCC_VERSION}
Just substitute the given values as shown above by the compilation error pattern. I do not suggest this fix and I believe that you should exhaust every other option before doing this since this is like taking painkillers instead of fixing the problem; the painkillers don't solve the issue but just mask the underlying problem.


Can you explain why this should be the last resort?
How is it not fixing the problem?
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Mon Jun 06, 2005 3:56 am    Post subject: Re: libstdc++.la: No such file or directory - errors and tip Reply with quote

kompressor wrote:
Can you explain why this should be the last resort?
How is it not fixing the problem?


Read that section again and next time post to the feedback thread please...
Back to top
View user's profile Send private message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Thu Jun 09, 2005 4:24 pm    Post subject: Reply with quote

If fix_libtool_files.sh 3.4.3 does not solve your problem for old version gcc 3.4.3, try this: fix_libtool_files.sh 3.4.3-20050110
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Sat Jun 11, 2005 6:25 am    Post subject: Reply with quote

blackwhite wrote:
If fix_libtool_files.sh 3.4.3 does not solve your problem for old version gcc 3.4.3, try this: fix_libtool_files.sh 3.4.3-20050110


Yes, blackwhite...
1) That only applies for this release though.
2) Read the freakin instructions on posting please!!! N00BS!
Back to top
View user's profile Send private message
joaobertacchi
n00b
n00b


Joined: 21 Sep 2005
Posts: 6
Location: Campinas/SP - Brazil

PostPosted: Wed Sep 21, 2005 7:26 pm    Post subject: Upgrade gcc 3.3.5 to 3.3.6 Reply with quote

I had a similar problem when I upgrade to gcc 3.3.6.

As discribed in http://forums.gentoo.org/viewtopic-t-370444-view-previous.html?sid=4d9a681fcfaf6490aab531e84bc913e8 fix_libtool_files.sh didn't work.
The sugestion was: rebuild libtool with the new gcc.

Code:
emerge libtools


After that, fix_libtool_files.sh started to work.
Back to top
View user's profile Send private message
aromero3
n00b
n00b


Joined: 04 Nov 2005
Posts: 6

PostPosted: Fri Nov 04, 2005 9:05 pm    Post subject: Reply with quote

If anyone comes across this and still has problems and does not want to have to emerge an older version of gcc, make sure that when you see the error message from libtool make sure to keep in mind any extra suffixes to the version.

If libtool complains: Libtool cannot find library: /usr/lib/gcc-lib/<arch>/<old version>/libstdc++.la

run fix_libtool_files.sh <old version>

I ran what I though was something like 3.3.5 but it was really 3.3.5-20050901 or something like that.

So in the end it was fix_libtool_files.sh 3.3.5-20050901 or something like that
Back to top
View user's profile Send private message
zonksoft
n00b
n00b


Joined: 15 Nov 2005
Posts: 1

PostPosted: Tue Nov 15, 2005 5:46 pm    Post subject: Reply with quote

You should really try this solution posted by teletoby in this thread:

teletoby wrote:


- fix_libtool_files.sh 3.3.5 --oldarch i386-pc-linux-gnu
definitely finds some libtool files (mostly in kde) and fixes them.

- search for the #define CcCmd definition in /usr/lib/X11/config/host.def and replace 'i386-pc-linux-gnu' with 'i686-pc-linux-gnu'.

this should fix at least the problems with kde-stuff and standard x11 applications.


teletoby


I got the error while emerging mod_php and this fixed my problem immediately.
Back to top
View user's profile Send private message
s.o.l.a.r.i.s
n00b
n00b


Joined: 24 Dec 2003
Posts: 41

PostPosted: Sat Jan 21, 2006 10:28 pm    Post subject: Re: Upgrade gcc 3.3.5 to 3.3.6 Reply with quote

joaobertacchi wrote:
I had a similar problem when I upgrade to gcc 3.3.6.

As discribed in http://forums.gentoo.org/viewtopic-t-370444-view-previous.html?sid=4d9a681fcfaf6490aab531e84bc913e8 fix_libtool_files.sh didn't work.
The sugestion was: rebuild libtool with the new gcc.

Code:
emerge libtools


After that, fix_libtool_files.sh started to work.


I am also running gcc 3.3.6. I tried your solution but there seems to be no ebuild for libtools *confused*

Chris
Back to top
View user's profile Send private message
cheecheeo
n00b
n00b


Joined: 08 Dec 2005
Posts: 6
Location: P-town, Oregon

PostPosted: Fri Jan 27, 2006 5:54 pm    Post subject: Re: Upgrade gcc 3.3.5 to 3.3.6 Reply with quote

s.o.l.a.r.i.s wrote:

I am also running gcc 3.3.6. I tried your solution but there seems to be no ebuild for libtools *confused*

Chris


Try rebuilding "libtool".
Back to top
View user's profile Send private message
sutashu
n00b
n00b


Joined: 02 Dec 2004
Posts: 4
Location: Gdansk Poland

PostPosted: Sat Jan 28, 2006 12:27 pm    Post subject: fix_libtool_files.sh - command not found Reply with quote

Is fix_libtool_files.sh part of the gcc package? There is no such file in my system :(
Back to top
View user's profile Send private message
eeknay
Guru
Guru


Joined: 07 Jul 2003
Posts: 402
Location: EndOfTheRainbow

PostPosted: Wed Feb 22, 2006 4:37 pm    Post subject: Reply with quote

I have an error that looks like this:
Code:

grep: /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.la: No such file or directory
/bin/sed: can't read /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.la: No such file or directory
libtool: link: `/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.la' is not a valid libtool archive
make[3]: *** [libkio.la] Error 1
make[3]: Leaving directory `/var/tmp/portage/kdelibs-3.5.1-r1/work/kdelibs-3.5.1/kio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/kdelibs-3.5.1-r1/work/kdelibs-3.5.1/kio'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/kdelibs-3.5.1-r1/work/kdelibs-3.5.1'
make: *** [all] Error 2


This happends during rebuilding kdelibs with new use.
As you can see, it asks for gcc-3.3.5 which I don't even have installed considering this:
Code:

(~) eeknay $ gcc-config -l
 [1] i686-pc-linux-gnu-3.3.6 *
 [2] i686-pc-linux-gnu-3.3.6-hardened
 [3] i686-pc-linux-gnu-3.3.6-hardenednopie
 [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.5
 [7] i686-pc-linux-gnu-3.4.5-hardened
 [8] i686-pc-linux-gnu-3.4.5-hardenednopie
 [9] i686-pc-linux-gnu-3.4.5-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.5-hardenednossp


So, should I install gcc-3.3.5? But this a can't do, since I don't have any ebuilds for this.

eeknay
_________________
Linda: "The holiday season is time of celebration for most but it is also the time to remember the tragic suffering of the less fortunate."
Morbo: "Earthlings do not yet know the meaning of suffering."
Back to top
View user's profile Send private message
eeknay
Guru
Guru


Joined: 07 Jul 2003
Posts: 402
Location: EndOfTheRainbow

PostPosted: Wed Feb 22, 2006 8:22 pm    Post subject: Reply with quote

also the fix_libtool does not do the trick for me
_________________
Linda: "The holiday season is time of celebration for most but it is also the time to remember the tragic suffering of the less fortunate."
Morbo: "Earthlings do not yet know the meaning of suffering."
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Tue May 16, 2006 2:54 pm    Post subject: Reply with quote

for anyone who hits this bug after upgrading from gcc-4.1.0 to gcc-4.1.0-r1, i have tried to clarify the reasoning why this isn't automated here:
http://bugs.gentoo.org/show_bug.cgi?id=73435#c207
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
larrythecow
n00b
n00b


Joined: 18 Apr 2007
Posts: 14
Location: Sydney, Australia

PostPosted: Fri Apr 27, 2007 9:35 am    Post subject: Reply with quote

I'm just confused because I get the error:

grep: /usr/lib/libstdc++.la: No such file or directory
/bin/sed: can't read /usr/lib/libstdc++.la: No such file or directory
libtool: link: `/usr/lib/libstdc++.la' is not a valid libtool archive

It is in a different directory. None of the solutions seem to apply.[/glsa]
_________________
www.myah.org <- another great distro.
Back to top
View user's profile Send private message
larrythecow
n00b
n00b


Joined: 18 Apr 2007
Posts: 14
Location: Sydney, Australia

PostPosted: Fri Apr 27, 2007 1:20 pm    Post subject: Reply with quote

Turns out I just needed to run /usr/portage/scripts/bootstrap.sh and it worked fine but now when I emerge kdemultimedia-3.5.5 I get:

libtool: link: cannot find the library `/usr/lib/libstdc++.la'
_________________
www.myah.org <- another great distro.
Back to top
View user's profile Send private message
zoltix
Apprentice
Apprentice


Joined: 22 Mar 2004
Posts: 249
Location: Brusssels

PostPosted: Fri Jan 04, 2008 5:20 pm    Post subject: Reply with quote

I installed the gcc.4.1.2 and after I can't find libstdc++.la....
Could you please help me to find a solution ?
Back to top
View user's profile Send private message
reshma
n00b
n00b


Joined: 20 Aug 2009
Posts: 1

PostPosted: Sat Aug 22, 2009 9:18 am    Post subject: Reply with quote

Does the resort grand rivera princess in playa del carmen have internet? Anybody who knows or has stayed there does the new resort Grand Rivera Princess in Playa Del Carmen have free internet access? If it's not free how much is it?
__________________
external keyword tool ~ keyworddiscovery.com ~ keycompete.com ~ compete.com ~ webmasterworld.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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