Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

libstdc++ annoying workarround

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
20 posts • Page 1 of 1
Author
Message
tecknojunky
Veteran
Veteran
User avatar
Posts: 1937
Joined: Sat Oct 19, 2002 6:50 am
Location: Montréal
Contact:
Contact tecknojunky
Website

libstdc++ annoying workarround

  • Quote

Post by tecknojunky » Tue Jan 14, 2003 2:06 pm

There are two ebuilds that fails to emerge because it can't find the shared library libstdc++.so.5 (which is a link to libstdc++.so.5.0).

These ebuilds are python (2.2.2) and groff (1.18.1). The only way I can get them to emerge is by doing this:

LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 emerge <ebuild>.

Can someone tell me how to fix this.
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Top
tecknojunky
Veteran
Veteran
User avatar
Posts: 1937
Joined: Sat Oct 19, 2002 6:50 am
Location: Montréal
Contact:
Contact tecknojunky
Website

  • Quote

Post by tecknojunky » Tue Jan 14, 2003 2:18 pm

Sorry for multiposting like this. It's just that things start coming up rather fast now since i'm having this trouble for about 5 or 6 days now.

It's just that my python did finish merging but was broken after that. I had read the other recent thread about python + libstdc++ that are broken. It say to copy /etc/env.d/gcc/i386-pc-linux-gnu-3.2.1 to /etc/env.d/05gcc, but it does not work.

I noticed that inside that file, there is a LDPATH= assign exactly to what I assigned LD_LIBRARY_PATH. So I did a little experiment and changed that into 05gcc (LDPATH to LD_LIBRARY_PATH), then ...

LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 env-update
source /etc/profile

... and everything seem to be back to normal.

So my question would be more now, how to prevent this from happenning? Id this a bug somewhere?
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Top
rac
Bodhisattva
Bodhisattva
User avatar
Posts: 6553
Joined: Thu May 30, 2002 6:19 am
Location: Japanifornia
Contact:
Contact rac
Website

  • Quote

Post by rac » Tue Jan 14, 2003 5:50 pm

Have you run gcc-config? I would expect that sort of work to be its domain.
For every higher wall, there is a taller ladder
Top
tecknojunky
Veteran
Veteran
User avatar
Posts: 1937
Joined: Sat Oct 19, 2002 6:50 am
Location: Montréal
Contact:
Contact tecknojunky
Website

  • Quote

Post by tecknojunky » Tue Jan 14, 2003 6:11 pm

Well, only to query what profiles exists, where it searched it's binaries and libs.

It's a new build for my 486. On my main Celeron box, I never had to use gcc-config. In fact, I was even unaware of it's existence until I ran into those problems.

So I figured it is not needed to be used. Shouldn't bootstrap.sh set these things accordingly?
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Top
rac
Bodhisattva
Bodhisattva
User avatar
Posts: 6553
Joined: Thu May 30, 2002 6:19 am
Location: Japanifornia
Contact:
Contact rac
Website

  • Quote

Post by rac » Tue Jan 14, 2003 6:38 pm

gcc-config is still rather new. Until gcc 3.2.1-r6, it wasn't required. I am getting the impression (still at 3.2.1 myself) that its use may be required now in order to get the environment set up correctly, and perhaps something is not calling it for you. Could you remove all files you made by hand in /etc/env.d, and try running gcc-config to select the name of the gcc profile you want to use?
For every higher wall, there is a taller ladder
Top
tecknojunky
Veteran
Veteran
User avatar
Posts: 1937
Joined: Sat Oct 19, 2002 6:50 am
Location: Montréal
Contact:
Contact tecknojunky
Website

  • Quote

Post by tecknojunky » Tue Jan 14, 2003 7:17 pm

As such, I did not create files. The only thing was to copy /etc/env.d/gcc/i386-pc-linux-3.2.1 to /etc/05gcc and fudge the LDPATH to be LD_LIBRARY_PATH instead.

For you, I did:

# cd /etc/env.d
# mv 05gcc ..
# mv gcc ..
# gcc-config --get-current-profile
(prints help usage after 60 secs or so - hd in the 486 now)
# mv ../gcc .
# gcc-config --get-current-profile
i386-pc-linux-gnu-3.2.1
# gcc-config --list-profiles
i386-pc-linux-gnu-3.2.1
# gcc-config i386-pc-linux-gnu-3.2.1
* switching to i386-pc-linux-gnu-3.2.1 compiler... [Ok]
# cat 05gcc
PATH="/usr/i386-pc-linux-gnu/gcc-bin/3.2"
ROOTPATH="/usr/i386-pc-linux-gnu/gcc-bin/3.2"
MANPATH="/usr/share/gcc-data/i386-pc-linux-gnu/gcc-bin/3.2/man"
INFOPATH="/usr/share/gcc-data/i386-pc-linux-gnu/gcc-bin/3.2/info"
CC="gcc"
CXX="g++"
LDPATH="/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1"
(Uh oh, the good'ol LDPATH again hey?)
# unset LD_LIBRARY_PATH
# env-update
/usr/bin/python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
# LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 env-update
>>> Regenerating /etc/ld.so.cache...
# env-update
/usr/bin/python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
# mv ../05gcc .
# LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 env-update
>>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# env-update
>>> Regenerating /etc/ld.so.cache...


As you can see, gcc-config is useless.
(7 of 9) Installing star-trek/species-8.4.7.2::talax.
Top
IvoryTiger
Tux's lil' helper
Tux's lil' helper
Posts: 132
Joined: Thu Jun 27, 2002 4:35 am

Check /usr/lib/libstdc++.la

  • Quote

Post by IvoryTiger » Wed Jan 15, 2003 4:16 am

tecknojunky wrote:There are two ebuilds that fails to emerge because it can't find the shared library libstdc++.so.5 (which is a link to libstdc++.so.5.0).

These ebuilds are python (2.2.2) and groff (1.18.1). The only way I can get them to emerge is by doing this:

LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 emerge <ebuild>.

Can someone tell me how to fix this.
And see if your entries are pointing to the correct location. I had this happen when I went from 3.2 to 3.2.1, and fixing the entries in this file solved it.
--
For those about to compile...we salute you!
Top
y0el
n00b
n00b
User avatar
Posts: 40
Joined: Thu Aug 01, 2002 2:58 pm
Location: Sweden
Contact:
Contact y0el
Website

  • Quote

Post by y0el » Thu Jan 16, 2003 2:37 pm

Fixing the entries in what file?
Top
IvoryTiger
Tux's lil' helper
Tux's lil' helper
Posts: 132
Joined: Thu Jun 27, 2002 4:35 am

  • Quote

Post by IvoryTiger » Fri Jan 17, 2003 7:09 pm

baxlash wrote:Fixing the entries in what file?
Was in the subject line, sorry.

Check /usr/lib/libstdc++.la
--
For those about to compile...we salute you!
Top
ThunderRiver
n00b
n00b
Posts: 6
Joined: Sun Jun 09, 2002 7:14 am

  • Quote

Post by ThunderRiver » Fri Mar 07, 2003 3:53 pm

Thanks Technojunkie, the
LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.1 emerge <ebuild> does the trick.
I issued the command
LD_LIBRARY_PATH=/usr/lib/gcc-lib/i386-pc-linux-gnu/3.2.2 emerge system for stage 2, and boy groff compiles! no more "working C++ compiler required..." :D
Top
mrilock
n00b
n00b
Posts: 2
Joined: Fri Mar 14, 2003 4:32 am
Location: Colorado

another possibility?

  • Quote

Post by mrilock » Fri Mar 14, 2003 4:41 am

A couple of things I noticed:
I had the same libstd++ problem that others have run into, but didn't use LD and all that. I actually restarted the installation process, and in my make.conf file, instead of using i686, which was the recommended one for my processor, I used the actual default that was there - i586. That's the only thing I changed, and now my

#emerge sys-kernel/gentoo-sources

is actually working. I don't know if I get any further than the install, as I have another 10 minutes until it fully downloads whatever it is getting, but it is *some* progress.
I hope this helps somebody? :-)
-Matthew
Top
ajaustin
n00b
n00b
User avatar
Posts: 38
Joined: Fri Oct 18, 2002 10:58 pm
Location: Surrey UK

  • Quote

Post by ajaustin » Sat Mar 15, 2003 11:20 am

I have just posted my "solution" to this problem to this thread.

http://forums.gentoo.org/viewtopic.php?p=243119#243119
Tony
Top
puke
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 128
Joined: Sat Oct 05, 2002 2:54 pm

  • Quote

Post by puke » Fri Mar 21, 2003 1:52 pm

Hmm. Different for me..

It appears that when I upgraded to GCC 3.2.2, something didn't happen in the /etc/env.d/05gcc file:

Code: Select all

root@localhost env.d # cat 05gcc
PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info"
LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1"
Changed the last line to 3.2.2 and then executed the following:

Code: Select all

LD_LIBRARY_PATH=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2 env-update
Problem went away..
Top
ak
n00b
n00b
Posts: 15
Joined: Fri Apr 04, 2003 9:05 pm

  • Quote

Post by ak » Fri Apr 04, 2003 9:24 pm

I am sure everybody already knows this, but anyway:
Add the following line at the end of your 05gcc file.

Code: Select all

LD_LIBRARY_PATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2"
and run:

Code: Select all

# source /etc/profile
before

Code: Select all

# env-update
that way you will not have to type that line for every emerge (like I had to) :)

CORRECTION: after I got bootable gentoo installation (YES!!!) I don't have to run source anymore for env-update and emerge to work. :)

Regards,

ak
Top
Belan
n00b
n00b
Posts: 8
Joined: Mon May 19, 2003 8:59 pm

  • Quote

Post by Belan » Tue May 20, 2003 7:01 pm

Adding the LD_LIBRARY_PATH to the 05gcc (which had to be recreated) worked for me as well. Excellent work around.
Top
Krigg
n00b
n00b
User avatar
Posts: 59
Joined: Tue Apr 22, 2003 6:20 am
Location: Out There

  • Quote

Post by Krigg » Fri Jan 09, 2004 4:27 pm

adding the

Code: Select all

LD_LIBRARY_PATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3" 
to 05gcc did not work for me, I kept getting the same errors

but updating the 05gcc

Code: Select all

LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1" 
to

Code: Select all

LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3" 
and then running

Code: Select all

LD_LIBRARY_PATH=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 env-update
did work for me.

Not sure why, but that's what worked for me.

JR
Have gun, will carry!
Top
airon
n00b
n00b
User avatar
Posts: 21
Joined: Tue Sep 30, 2003 8:10 am

  • Quote

Post by airon » Sat Feb 14, 2004 12:35 pm

I had this trouble and none of this solution solved my trouble.

It comes from when I have updated gcc from 3.2.3 to 3.3.2-r5, then libtool fails to find libstdc++ in some case (example: emerge k3b).

I have solved it doing this:

/sbin/fix_libtool_files.sh 3.2.3

You should change 3.2.3 with your old gcc version. It will change the simbolic links from your old gcc to the new one.
Top
MaxAuthority
n00b
n00b
Posts: 18
Joined: Fri Mar 19, 2004 12:27 am

  • Quote

Post by MaxAuthority » Wed Jul 21, 2004 5:42 am

airon wrote:I had this trouble and none of this solution solved my trouble.
<snip>
I have solved it doing this:

/sbin/fix_libtool_files.sh 3.2.3
thanks a lot, all other tricks also did not work for me, but finally this did it for me after searching for a solution for days now.
Top
ndo1985
n00b
n00b
User avatar
Posts: 57
Joined: Fri Apr 16, 2004 1:28 am
Location: USA
Contact:
Contact ndo1985
Website

3.3.4 gcc

  • Quote

Post by ndo1985 » Sat Dec 04, 2004 8:34 pm

This always seems to work:

mkdir /usr/lib/gcc-lib/i386-pc-linux-gnu
mkdir /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.4
cp -r /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4 /usr/lib/gcc-lib/i386-pc-linux-gnu/

that's how mine was fixed
---Nathan Owens
Top
switschi
n00b
n00b
Posts: 4
Joined: Tue Mar 23, 2004 7:09 pm

Please try /sbin/fix_libtool_files.sh

  • Quote

Post by switschi » Thu Jan 13, 2005 2:20 pm

source /etc/profile
env-update
/sbin/fix_libtool_files.sh [old gcc version] --oldarch i386-pc-linux-gnu

For me it solved the problem
Top
Post Reply

20 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy