Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
auto delete of libgcc_s.so.1 :-(
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Sat Mar 24, 2012 2:35 pm    Post subject: auto delete of libgcc_s.so.1 :-( Reply with quote

Every time I try to install gcc it fails and deletes libgcc_s.so.1 so lots of things don't run.
Luckily I got libgcc_s.so.1 off a livecd but I can't reinstall gcc.

Code:

>>> Installing (1 of 1) sys-devel/gcc-4.5.3-r2
 * Switching native-compiler to x86_64-pc-linux-gnu-4.5.3 .../bin/sh: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
>>> Regenerating /etc/ld.so.cache...
sh: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
 [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   . /etc/profile


 * If you have issues with packages unable to locate libstdc++.la,
 * then try running 'fix_libtool_files.sh' on the old gcc versions.

 * You might want to review the GCC upgrade guide when moving between
 * major versions (like 4.2 to 4.3):
 * http://www.gentoo.org/doc/en/gcc-upgrading.xml

/bin/bash: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory


Quote:

Portage 2.1.10.51 (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, glibc-2.14.1-
r2, 3.3.0+ x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-3.3.0+-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-
with-gentoo-2.1
Timestamp of tree: Fri, 23 Mar 2012 21:45:01 +0000
app-shells/bash: 4.2_p24
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.2-r3, 3.1.4-r4, 3.2.2-r1
dev-util/cmake: 2.8.7-r5
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1
sys-apps/openrc: 0.9.9.3
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.3
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.3-r2
sys-devel/gcc-config: 1.6
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc: 2.14.1-r2
Repositories: gentoo geki-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fexceptions"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hs
qldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/f
onts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d
/etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -fexceptions"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news paral
lel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs
unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net
/gentoo http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress -
-force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/di
stfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/openoffice-geki"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="64bit X a52 aac accessibility acl acpi aften aim alsa amd64 analyzers ao apn
g atk audiofile auto-completion bash-completion berkdb bzip2 cairo cdda cddb cdio
cdparanoia cdr cdrom cli consolekit cracklib crypt cups cxx dbus declarative dev
ice-mapper dhcpcd djvu docbook dri dvb dvd dvdr dvi embedded enca encode exif ext
ras fat ffmpeg fontconfig fortran fts3 gdbm gif gimp glibc-compat20 glibc-omitfp
gnutls gpm graph gtkhtml gtkspell gudev gzip iconv id3 imagemagick ipv6 java java
6 javascript jpeg jpeg2k kde kdm lame lcms libv4l2 mad melt minizip mmx mng modul
es mp3 mp4 mpeg msn mudflap mysql ncurses nls nptl nptlonly nsplugin ntp ocr ogg
ogg123 ogm opengl openmp openssl pam pcre pdf plasma png pnm policykit pppd progr
am_options python qt-dbus qt3support qt4 readline sdl secure-delete semantic-desk
top server session spell sql sqlite sqlite3 sse sse2 ssh ssl stream svg sysfs tcp
d thread threadpython threads tiff tk tools truetype udev unicode usb v4l v4l2 vn
c vorbis webkit wicd wifi wxwidgets x264 xcomposite xine xinerama xml xorg zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsn
oop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul m
ulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias
auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm a
uthz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cg
i cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cac
he filter headers include info log_config logio mem_cache mime mime_magic negotia
tion rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAL
LIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS
="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC
="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt g
psclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtc
m104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL
="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb nc
urses text" LIRC_DEVICES="hauppauge" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" U
SERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan lengt
h2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal raw
nat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGU
AS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
Package Settings
=================================================================
USE="cxx fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc (-fixe
d-point) -gcj -graphite -gtk (-hardened) (-libssp) -lto (-multilib) -multislot -n
ocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

sys-devel/gcc-4.5.3-r2 was built with the following:
CFLAGS="-march=athlon64 -O2 -pipe -O2"
CXXFLAGS="-march=athlon64 -O2 -pipe -O2"


I tried masking this version of gcc but the previous version does the same thing.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Sat Mar 24, 2012 2:59 pm    Post subject: Reply with quote

bjlockie,

Is libgcc_s.so.1 really missing or do you have a symlink issue?

If the file was really missing, the whole gentoo world will fall apart for everyone. I've have not seen any reports like that, so I expect its something particular to your system.
Try gcc-config to chose another gcc if you have one, then chooing your current version. Does that help?
That's fixed symlinks that point to the gcc of your choice.

If its still broken, we can get gcc from the tinderbox. Post back if you need that step as its not to be taken lightly.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Sat Mar 24, 2012 3:09 pm    Post subject: Reply with quote

NeddySeagoon wrote:
bjlockie,

Is libgcc_s.so.1 really missing or do you have a symlink issue?

If the file was really missing, the whole gentoo world will fall apart for everyone. I've have not seen any reports like that, so I expect its something particular to your system.
Try gcc-config to chose another gcc if you have one, then chooing your current version. Does that help?
That's fixed symlinks that point to the gcc of your choice.

If its still broken, we can get gcc from the tinderbox. Post back if you need that step as its not to be taken lightly.


It really is gone from my system.
find /lib64 -name libgcc\*
/lib64/libgcc_s.so.1

That is the one I put there.

$ gcc-config -l
[1] x86_64-pc-linux-gnu-4.5.3

It's like it partially upgraded.

My system works with the one I got from the livecd.

I can emerge other stuff so gcc works.
I just can't emerge gcc or libgcc_s.so.1 disappears.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Mar 24, 2012 9:34 pm    Post subject: Reply with quote

And you definitely don't have /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/libgcc_s.so.1?
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Sat Mar 24, 2012 11:11 pm    Post subject: Reply with quote

Ant P. wrote:
And you definitely don't have /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/libgcc_s.so.1?


I have that so maybe gcc deletes the one in /lib64 and then fails to install.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Sat Mar 24, 2012 11:15 pm    Post subject: Reply with quote

could you post ldd /bin/bash?

I checked on my system and bash depend on /lib64/libgcc_s.so.1.

V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
gienah
Developer
Developer


Joined: 24 Nov 2010
Posts: 212
Location: AU

PostPosted: Sun Mar 25, 2012 12:27 am    Post subject: Reply with quote

My bash does not depend on it:

Code:

argus / # ldd -r /bin/bash
   linux-vdso.so.1 =>  (0x00007ffff19ff000)
   libreadline.so.6 => /lib64/libreadline.so.6 (0x00007feea2cc5000)
   libncurses.so.5 => /lib64/libncurses.so.5 (0x00007feea2a72000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007feea286e000)
   libc.so.6 => /lib64/libc.so.6 (0x00007feea24e9000)
   /lib64/ld-linux-x86-64.so.2 (0x00007feea2f0a000)
argus / # equery uses app-shells/bash
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-shells/bash-4.2_p20:
 U I
 - - afs          : Adds OpenAFS support (distributed file system)
 - - bashlogger   : Log ALL commands typed into bash; should ONLY be used in restricted environments such as honeypots
 + + examples     : Install examples, usually source code
 - - mem-scramble : Build with custom malloc/free overwriting allocated/freed memory
 + + net          : Enable /dev/tcp/host/port redirection
 + + nls          : Adds Native Language Support (using gettext - GNU locale utilities)
 - - plugins      : Add support for loading builtins at runtime via 'enable'
 - - vanilla      : Do not add extra patches which change default behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of
                    the meaning changes drastically
argus / #


So an idea is maybe if you re-emerged app-shells/bash it might build it without the dependency on /lib64/libgcc_s.so.1

I am really not sure if I am supposed to have /lib64/libgcc_s.so on my system or not, as its not owned by anything:

Code:

argus / # equery belongs /lib64/libgcc_s.so.1
 * Searching for /lib64/libgcc_s.so.1 ...
argus / # gcc-config -L
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2:/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/32
argus / # ls -al /lib64/libgcc_s.so.1 `gcc-config -L | cut -d: -f1`/libgcc_s.so.1
-rw-r--r-- 1 root root 88368 Mar 23 22:33 /lib64/libgcc_s.so.1
-rw-r--r-- 1 root root 88368 Mar 23 22:33 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/libgcc_s.so.1
argus / # diff -wc /lib64/libgcc_s.so.1 `gcc-config -L | cut -d: -f1`/libgcc_s.so.1
argus / #


I recently did (not sure if this was a good idea or not, just saying I did it anyway):

Code:

cd /lib64
rm libgcc_s.so.1


and then rebuilt everything, it has since re-appeared.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun Mar 25, 2012 1:03 am    Post subject: Reply with quote

bjlockie,

Just for lack of any better ideas, try these settings

Quote:
CFLAGS="-O2 -march=athlon64-sse3 -pipe"
ACCEPT_KEYWORDS="~amd64"


Good luck :wink:
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Sun Mar 25, 2012 8:23 am    Post subject: Reply with quote

BillWho, CFLAGS settings does have not effect on the linked libraries, and the ACCEPT_KEYWORDS gets automatically expanded by emerge --info, therefore pointless again.

V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jun 01, 2012 2:04 am    Post subject: Reply with quote

Arrg, I can't figure out a work-around to upgrade gcc.

# gcc-config -l
[1] x86_64-pc-linux-gnu-4.5.3 *
[2] x86_64-pc-linux-gnu-4.6.3

# gcc-config 2
* Switching native-compiler to x86_64-pc-linux-gnu-4.6.3 ...
/bin/sh: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
>>> Regenerating /etc/ld.so.cache...
sh: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [ ok ]

# cp /libgcc_s.so.1 /lib64

# ldd /lib64/libgcc_s.so.1
ldd: warning: you do not have execution permission for `/lib64/libgcc_s.so.1'
linux-vdso.so.1 (0x00007fff91600000)
libc.so.6 => /lib64/libc.so.6 (0x00007fae3ca58000)
/lib64/ld-linux-x86-64.so.2 (0x00007fae3d048000)
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jun 01, 2012 2:07 am    Post subject: Reply with quote

bjlockie wrote:
Arrg, I can't figure out a work-around to upgrade gcc.
# cp /libgcc_s.so.1 /lib64


Yay, I copied it to /lib and it worked.
# gcc-config 2
* Switching native-compiler to x86_64-pc-linux-gnu-4.6.3 ...
>>> Regenerating /etc/ld.so.cache... [ ok]
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Fri Jun 01, 2012 2:43 am    Post subject: Reply with quote

bjlockie wrote:
bjlockie wrote:
Arrg, I can't figure out a work-around to upgrade gcc.
# cp /libgcc_s.so.1 /lib64


Yay, I copied it to /lib and it worked.
That should not be different from what you did before. Please post the output of ls -la / ; cat -n /etc/ld.so.conf.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jun 01, 2012 11:25 pm    Post subject: Reply with quote

Hu wrote:
bjlockie wrote:
bjlockie wrote:
Arrg, I can't figure out a work-around to upgrade gcc.
# cp /libgcc_s.so.1 /lib64


Yay, I copied it to /lib and it worked.
That should not be different from what you did before. Please post the output of ls -la / ; cat -n /etc/ld.so.conf.


Copying to /lib AND /lib64 works but /lib is just a symlink so it must have been something else.

$ ls -la / ; cat -n /etc/ld.so.conf
total 316
drwxr-xr-x 26 root root 4096 May 20 06:42 .
drwxr-xr-x 26 root root 4096 May 20 06:42 ..
drwxr-xr-x 2 root root 4096 Mar 15 2011 .config
drwxr-xr-x 3 root root 4096 Sep 24 2011 .kde4
drwxr-xr-x 2 root root 4096 May 17 14:38 .nvclock
drwxr-xr-x 2 root root 4096 May 30 22:16 bin
drwxr-xr-x 2 root root 4096 Oct 27 2011 boot
drwxr-xr-x 2 root root 4096 Oct 11 2009 cache
drwxr-xr-x 2 root root 4096 Feb 17 23:50 desktop
drwxr-xr-x 15 root root 3220 Jun 1 14:28 dev
lrwxrwxrwx 1 root root 18 Oct 27 2008 downloads -> /storage/downloads
drwxr-xr-x 98 root root 4096 Jun 1 14:29 etc
drwxr-xr-x 3 root root 4096 Oct 27 2008 home
lrwxrwxrwx 1 root root 6 May 20 06:42 lib -> /lib64
lrwxrwxrwx 1 root root 6 Oct 29 2008 lib32 -> /lib64
drwxr-xr-x 12 root root 4096 May 31 23:30 lib64
-rw-r--r-- 1 root root 88264 Mar 23 14:03 libgcc_s.so.1
drwx------ 2 root root 16384 Oct 27 2008 lost+found
drwxr-xr-x 10 root root 4096 May 30 20:53 media
drwxr-xr-x 10 root root 4096 Mar 22 22:07 mnt
drwxr-xr-x 13 root root 4096 May 29 20:39 opt
drwxr-xr-x 2 root root 4096 Feb 17 23:50 pkginf
dr-xr-xr-x 124 root root 0 Jun 1 14:28 proc
drwx------ 37 root root 4096 Jun 1 19:17 root
drwxr-xr-x 6 root root 120 Jun 1 14:28 run
drwxr-xr-x 2 root root 4096 May 31 20:57 sbin
lrwxrwxrwx 1 root root 14 May 20 06:38 storage -> /media/storage
dr-xr-xr-x 11 root root 0 Jun 1 14:28 sys
drwxrwxrwt 28 rjl root 135168 Jun 1 19:19 tmp
drwxr-xr-x 21 root root 4096 Jan 10 06:24 usr
drwxr-xr-x 14 root root 4096 Oct 26 2011 var
1 # ld.so.conf autogenerated by env-update; make all changes to
2 # contents of /etc/env.d directory
3 /lib64
4 /usr/lib64
5 /usr/local/lib64
6 /lib
7 /usr/lib
8 /usr/local/lib
9 include ld.so.conf.d/*.conf
10 /usr/local/lib64/kde4
11 /usr/lib64/opengl/xorg-x11/lib
12 //usr/lib64/xulrunner-2.0
13 /usr/local/firefox
14 /usr/local/thunderbird
15 /usr/lib64/qca2
16 /usr/lib64/qt4
17 /usr/lib/qt4
18 /usr/games/lib64
19 /usr/games/lib
20 /usr/lib64/R/lib
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Sat Jun 02, 2012 12:47 am    Post subject: Reply with quote

bjlockie wrote:
Copying to /lib AND /lib64 works but /lib is just a symlink so it must have been something else.

$ ls -la / ; cat -n /etc/ld.so.conf
total 316
lrwxrwxrwx 1 root root 6 May 20 06:42 lib -> /lib64
lrwxrwxrwx 1 root root 6 Oct 29 2008 lib32 -> /lib64
drwxr-xr-x 12 root root 4096 May 31 23:30 lib64
That is very wrong. lib32 is its own directory, separate from lib64. A separate 32-bit libgcc_s is supposed to be placed in /lib32. If you have /lib32 and /lib64 pointing to the same place, you will have weird results.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Sat Jun 02, 2012 3:09 am    Post subject: Reply with quote

Hu wrote:
bjlockie wrote:
Copying to /lib AND /lib64 works but /lib is just a symlink so it must have been something else.

$ ls -la / ; cat -n /etc/ld.so.conf
total 316
lrwxrwxrwx 1 root root 6 May 20 06:42 lib -> /lib64
lrwxrwxrwx 1 root root 6 Oct 29 2008 lib32 -> /lib64
drwxr-xr-x 12 root root 4096 May 31 23:30 lib64
That is very wrong. lib32 is its own directory, separate from lib64. A separate 32-bit libgcc_s is supposed to be placed in /lib32. If you have /lib32 and /lib64 pointing to the same place, you will have weird results.


Even though I don't use multilib?
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Raeior
n00b
n00b


Joined: 17 Jul 2012
Posts: 11

PostPosted: Tue Jul 17, 2012 6:08 pm    Post subject: Reply with quote

Just wanted to add that i'm seeing the same problem in a Gentoo installation running inside Virtualbox. Everytime GCC (4.7.1 or 4.6.3) is rebuilt the emerge fails in the "postrm" step due to bash missing it's libgcc_s.so.1 dependency. From that point on the system is completely unusable as even booting fails due to init getting killed. Restoring the libgcc_s.so.1 -> gcc/x86_64-pc-linux-gnu/4.7.1/libgcc_s.so.1 symlink solves this problem until the next time gcc is emerged.
ldd /bin/bash gives this output (the same for other stuff like sh):
Code:
faelrynn-VM / # ldd /bin/bash
   linux-vdso.so.1 (0x00007fff223ff000)
   libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f9c346dc000)
   libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f9c34489000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f9c34285000)
   libc.so.6 => /lib64/libc.so.6 (0x00007f9c33ee1000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9c33cc5000)
   libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f9c33ab0000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f9c34921000)


On my laptop also running Gentoo the libpthread and libgcc_s.so.1 lines are missing and the output looks like the one gienah posted. Recompiling bash with CFLAGS="-O2 -pipe -march=native -msse4.2 -mcx16 -fno-ident" is not changing this.
ls -la / is showing this output:
Code:
faelrynn-VM / # ls -la /
insgesamt 80
drwxr-xr-x  21 root root  4096 18. Mai 16:56 .
drwxr-xr-x  21 root root  4096 18. Mai 16:56 ..
drwxr-xr-x   2 root root  4096 17. Jul 19:39 bin
drwxr-xr-x   3 root root  4096 27. Mai 15:01 boot
drwxr-xr-x  12 root root  3180 17. Jul 18:45 dev
drwxr-xr-x  69 root root  4096 17. Jul 19:39 etc
drwxr-xr-x   3 root root  4096  8. Feb 2010  home
lrwxrwxrwx   1 root root     5 18. Mai 16:56 lib -> lib64
drwxr-xr-x   3 root root  4096 27. Mai 16:09 lib32
drwxr-xr-x  12 root root  4096 17. Jul 19:13 lib64
drwx------   2 root root 16384  7. Feb 2010  lost+found
drwxr-xr-x   3 root root  4096 12. Mai 18:08 media
drwxr-xr-x   6 root root  4096 29. Sep 2011  mnt
drwxr-xr-x   5 root root  4096  9. Nov 2011  opt
dr-xr-xr-x 123 root root     0 17. Jul 2012  proc
drwx------  18 root root  4096 17. Jul 18:59 root
drwxr-xr-x   6 root root   120 17. Jul 18:48 run
drwxr-xr-x   2 root root  4096  8. Jun 21:41 sbin
dr-xr-xr-x  12 root root     0 17. Jul 2012  sys
drwxrwxrwt   5 root root  4096 17. Jul 19:45 tmp
drwxr-xr-x  13 root root  4096 17. Mär 2010  usr
drwxr-xr-x  15 root root  4096 12. Mai 17:46 var

So this seems to be correct?
The VM is more of a playground but it's an annoying problem nonetheless.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Tue Jul 17, 2012 7:16 pm    Post subject: Reply with quote

I have the same issue. I think gcc-config has been broken recently: I think the problem is that the bash running gcc-config breaks before gcc-config can finish what it is supposed to do (maybe it depends also on the bash version).

My workaround is the following:
Code:
$ bb
$ cd  /usr/lib/gcc-lib/*
$ ln -s [new_compiler_version] [old_compiler_version]
$ gcc-config [whatever…]
$ rm [old_compiler_version]
$ exit
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8706
Location: ~Brussels - Belgique

PostPosted: Tue Jul 17, 2012 7:34 pm    Post subject: Reply with quote

Hello,

The problem is the ld.so.cache file

The real solution is to run ldconfig immediately and everything will be fine.

If it doesn't work, the work-around is
Code:
bb
ln /usr/lib/gcc/***ARCH**/**NEW_VERSION**/lib/libgcc_s.so.1 /usr/lib
gcc-config -l **NEWVERSION**
rm /lib/libgcc_s.so.1
ldconfig
exit

_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Fri Sep 21, 2012 10:04 pm    Post subject: Reply with quote

I just stumbled across the same issue: last week, my home server (a sheeva plug) just... died... after an update. Not funny, as I rely on the thing for git and was away during the week Upon returning home today, I discovered that shitloads of programs, including bash, did not correctly link against libgcc_s.so.1 anymore. I independently came up with the same solution as XavierMiller: mounted the harddrive on my laptop, temporarily symlinked the lib to /usr/lib in order to get the thing to boot, ran ldconfig and then removed the symlink.

All is fine now, but I must admit that I find this issue pretty scary and would like to understand what exactly happened. My interpretation is that the gcc ebuild for 4.5.4 cleaned out the previous 4.5.3-r2 installation and did not run ldconfig, thus leaving the dynamic linker without a working libgcc_s.so.1. However, I am not satisfied with this: there are two older compilers installed, both listed in the cache, and 4.5.x was not my working compiler, so why the heck did the dynamic linker not just use one of the older ones? Also, doesn't portage run ldconfig after every merge? I'd really like to find out what really happened and file a bug report, I think that this is a pretty serious issue, so, if anyone has any ideas... ;)
Back to top
View user's profile Send private message
drhirsch
n00b
n00b


Joined: 08 May 2004
Posts: 66
Location: Germany

PostPosted: Thu Sep 27, 2012 2:12 pm    Post subject: Reply with quote

I just got hit by this after an gcc update and it seems gcc-config is the culprit, which actually does a "rm -f /lib*/lib{gcc_s,unwind}.so*" (WTF?) somewhere.
Back to top
View user's profile Send private message
sligo
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2011
Posts: 93

PostPosted: Tue Oct 09, 2012 11:14 pm    Post subject: Reply with quote

Same problem here! Installed the latest gcc (4.5.4) on arm STABLE (!) which broke my whole system. Since its a slow machine, i logged out while updating and after that i couldn't log back into the machine at all. Not with ssh or even with serial usb attached. It took me quite a while to fix it since my system is running on NAND flash build into the board. There is no way to connect that into another machine or simply download the next "livecd" and link some files.

I wouldn't mind if this hits users running unstable. But i am running stable for a reason and i think this is some serious bug!

Thanks XavierMiller for the work-around!!
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Wed Oct 10, 2012 1:51 am    Post subject: Reply with quote

you can avoid having to create the symlink by running
Code:
LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/ ldconfig

(replace x86_64-pc-linux-gnu with your CHOST and 4.5.4 with your gcc version)
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Sun Oct 14, 2012 7:41 pm    Post subject: Reply with quote

Thank you, thank you, thank you chithanh!!

ln, ls everything stopped working... luckily had a browser still open and came to this topic :)
Back to top
View user's profile Send private message
jgerasmus
n00b
n00b


Joined: 02 Mar 2011
Posts: 2
Location: Amsterdam, Netherlands

PostPosted: Fri Oct 19, 2012 8:50 pm    Post subject: Reply with quote

Thank you @XavierMiller your solution worked perfectly! Has someone filed a bug report on this? Had exactly the same issue as described above on my raspberry pi (ARM). Unfortunately I was running headless, and as ssh stopped functioning I thought pulling the power would do just fine... For anybody who make this same mistake, chroot into the environment and using @XavierMiller's solution worked fine.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Tue May 14, 2013 5:44 pm    Post subject: Reply with quote

Gentoo new motto: "killer gcc updates since 2004" and going strong.
or "when we say unstable we mean it!"
or "Try gcc-4.7.2 for complete system destruction."

I emerged gcc and the post install failed.
Then the whole system fell apart:
Code:
ls
ls: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
# /bin/bash
/bin/bash: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory


Nothing worked until I found this little treasure:
XavierMiller wrote:

If it doesn't work, the work-around is
Code:
bb
ln /usr/lib/gcc/***ARCH**/**NEW_VERSION**/lib/libgcc_s.so.1 /usr/lib
gcc-config -l **NEWVERSION**
rm /lib/libgcc_s.so.1
ldconfig
exit

I added in a
Code:
cp  /lib/libgcc_s.so.1 /root/libgcc_s.so.1

and did a
Code:
gcc-config x86_64-pc-linux-gnu-4.7.2

before the rm just to be safe.
Seriously Thank you this just saved me on gcc-4.7.2 update!
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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