Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390599 - sys-devel/gcc-4.5.3-r1: libgmp.so.3: cannot open shared object file
Summary: sys-devel/gcc-4.5.3-r1: libgmp.so.3: cannot open shared object file
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 08:33 UTC by Mike Hammill
Modified: 2012-05-21 11:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,8.25 KB, text/plain)
2011-11-15 08:34 UTC, Mike Hammill
Details
config log (config.log,14.92 KB, text/plain)
2011-11-15 08:35 UTC, Mike Hammill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hammill 2011-11-15 08:33:17 UTC
On ppc32 (G3 and G4) with already existing and functioning gcc-4.5.3-r1, the "new" ebuild of gcc-4.5.3-r1 will not build because it fails on configure.

Reproducible: Always

Steps to Reproduce:
1. normal daily update of system (emerge -vauDN world)
2. today 2011-11-15 brings in gcc-4.5.3-r1 (with new cxx flags)
3. build of gcc-4.5.3-r1 with previous gcc-4.5.3-r1 fails on configure
Actual Results:  
Failed build of gcc

Expected Results:  
Successfully built gcc

quicky ~ # emerge --info gcc
Portage 2.1.10.11 (default/linux/powerpc/ppc32/10.0/desktop, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 ppc)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.39-gentoo-r3-ppc-7450,_altivec_supported-with-gentoo-2.1
Timestamp of tree: Tue, 15 Nov 2011 00:15:01 +0000
distcc 3.1 powerpc-unknown-linux-gnu [enabled]
ccache version 2.4 [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.2.2
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13::<unknown repository>, 2.68
sys-devel/automake:       1.6.3-r1, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo betagarden mhammill local-repo
ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="*"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/tex
mf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write"
FEATURES="assume-digests binpkg-logs buildpkg distcc distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.mdfnet.se/gentoo ftp://mirror.mdfnet.se/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en_GB sv_SE sv"
MAKEOPTS="-j16"
PKGDIR="/var/pkg"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/betagarden /var/lib/layman/mhammill /usr/local/portage"
SYNC="rsync://giddy.michael.hammill.name/gentoo-portage"
USE="X a52 aac acl alsa altivec audacious autoipd avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cdr cli consolekit cracklib crypt cups curl cxx dbus device-mapper djvu dri dts dvd dvdr dvi dvi2tty dvipdfm emacs em
boss encode escreen exif expat extra faac faad fam ffmpeg firefox flac fontconfig fortran fuse gdbm gdu gif git gnutls gpm graphics graphviz gs gstreamer gtk gtk2 gtk3 gtkhtml hddtemp humanities hwdb iconv ieee1394 imagemagick imlib ipv6
 jai java jpeg jython kerberos keyring kpathsea latex latex3 lcms ldap libcaca libnotify live m17n-lib mad mailwrapper mng modules mp3 mp4 mpeg mudflap nagios-ssh ncurses network network-cron nls nntp no-old-linux nptl nptlonly nsplugin 
ogg opengl openmp openssl pam pango pcre pdf perl png policykit ppc ppds pppd pulseaudio pymacs python qt3support readline ruby sasl science sdl session sound spell ssl startup-notification svg sysfs system-sqlite t1lib tcl tcpd template
s tex4ht theora threads tiff tk truetype udev unicode usb vcd vorbis webkit wmf xanim xattr xcb xft xinerana xml xorg xulrunner xv xvid zlib" ALSA_CARDS="powermac" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug f
ile hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm auth
z_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_
magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="p
tp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 
rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en_GB sv_SE sv" PHP_TARGETS="php5-3" RUBY_TAR
GETS="ruby18" USERLAND="GNU" VIDEO_CARDS="r128 radeon fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-4.5.3-r1 was built with the following:
USE="altivec fortran gtk mudflap nls nptl openmp -bootstrap -build -doc (-fixed-point) -gcj -graphite (-hardened) (-libffi) -lto (-multilib) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"
CFLAGS="-mcpu=7450 -O2 -pipe"
CXXFLAGS="-mcpu=7450 -O2 -pipe"


quicky ~ # gcc-config -l
 [1] powerpc-unknown-linux-gnu-4.5.3 *


Also please note I tried the same build with no DISTCC, no ccache, and J1 and got the same error.  If you need the similar logs from that, let me know.
Comment 1 Mike Hammill 2011-11-15 08:34:41 UTC
Created attachment 292601 [details]
build log
Comment 2 Mike Hammill 2011-11-15 08:35:06 UTC
Created attachment 292603 [details]
config log
Comment 3 Mike Hammill 2011-11-15 08:40:38 UTC
As instructed by the ebuild, here is some further output requested if one is going to submit a bug:

quicky ~ # emerge -pqv =sys-devel/gcc-4.5.3-r1
[ebuild   R   ] sys-devel/gcc-4.5.3-r1  USE="altivec cxx%* fortran gtk mudflap nls nptl openmp -bootstrap -build -doc (-fixed-point) -gcj -graphite (-hardened) (-libffi) -lto (-multilib) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-11-15 14:16:28 UTC
/usr/libexec/gcc/powerpc-unknown-linux-gnu/4.5.3/cc1: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory

Not related to USE flags. Your machine is inconsistant and you need to run revdep-rebuild.
Comment 5 Mike Hammill 2011-11-15 15:53:39 UTC
(In reply to comment #4)
> /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.5.3/cc1: error while loading
> shared libraries: libgmp.so.3: cannot open shared object file: No such file or
> directory
> 
> Not related to USE flags. Your machine is inconsistant and you need to run
> revdep-rebuild.

Yesterday, as instructed by  gmp-5.0.2
* Old versions of installed libraries were detected on your system.
* In order to avoid breaking packages that depend on these old libs,
* the libraries are not being removed.  You need to run revdep-rebuild
* in order to remove these old dependencies.  If you do not have this
* helper program, simply emerge the 'gentoolkit' package.
*   # revdep-rebuild --library '/usr/lib/libgmp.so.3'
revdep req'd on '/usr/lib/libgmp.so.3'
* Once you've finished running revdep-rebuild, it should be safe to
* delete the old libraries.  Here is a copy & paste for the lazy:
*   # rm '/usr/lib/libgmp.so.3'

** Running revdep-rebuild  '/usr/lib/libgmp.so.3'
 * Configuring search environment for revdep-rebuild

 * Checking reverse dependencies
 * Packages containing binaries and libraries using '/usr/lib/libgmp.so.3'
 * will be emerged.

 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Checking dynamic linking 

 * There are no dynamic links to '/usr/lib/libgmp.so.3'... All done. 

So there seems to be a bug then in revdep-rebuild???????
Comment 6 Mike Hammill 2011-11-15 15:57:39 UTC
Just so the order is clear.  I ran revdep-rebuild yesterday, whereas I ran the update for gcc today.  So, revdep should have found that gcc needed to rebuilt yesterday.  eix reports:
app-portage/gentoolkit-0.3.0.4-r4
I'll run revdep again now, and see if it still missing gcc.
Comment 7 Mike Hammill 2011-11-15 21:59:33 UTC
(In reply to comment #4)
> /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.5.3/cc1: error while loading
> shared libraries: libgmp.so.3: cannot open shared object file: No such file or
> directory
> 
> Not related to USE flags. Your machine is inconsistant and you need to run
> revdep-rebuild.

This seems like either (1) a bug in the message given in the e-build for libgmp, which explicitly says to use --library /usr/lib/libgmp.so.3 or (2) a bug in revdep-rebuild for not knowing that a search for /usr/lib/libgmp.so.3 should also do on on libgmp.so.3.  I doubt (2), but here is why I say that:

Doing what libgmp suggests, as says, does not work (even now). I get:
quicky ~ # revdep-rebuild -ip -L /usr/lib/libgmp.so.3                                                                                                                                                                                        
 * Configuring search environment for revdep-rebuild

 * Checking reverse dependencies
 * Packages containing binaries and libraries using /usr/lib/libgmp.so.3
 * will be emerged.

 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Checking dynamic linking 
[ 100% ]                 

However, quicky ~ # revdep-rebuild -ip -L libgmp.so.3 && revdep-rebuild -ip both correctly identify the problem.  Should this be reported as a bug to libgmp then?
Comment 8 Mike Hammill 2011-11-15 22:04:39 UTC
Final note: I followed the same procedure which led to this problem on ppc32 on the following archs, but on those I had no problem: x86_64, x86, sparc64.  Why did this problem only show up on ppc32?
Comment 9 Mike Hammill 2011-11-15 22:58:09 UTC
OK, really is my final note on why I think there *IS* a bug to report here.  Thank goodness for tmux scrollback, I re-checked the steps leading to my broken gcc (which, by the way, can't be fixed as you suggested.  revdep-rebuild only suggests packages to rebuild; if gcc has been broken, you have to do some backup restores, so I think this is a rather nasty bug).  Here were my steps:

1. update gmp-5.0.2 (caused by gentoo adding cxx flag)
2. immediately after update, run 
   revdep-rebuild -ip -L '/usr/lib/libgmp.so.3'
   as suggested by gmp ebuild
3. immediately after that, run
   revdep-rebuild -ip 
   as my script always does that after every depclean
4. immediately after that, manually delete /usr/lib/libgmp.so.3 
   *as the gmp ebuild says to do*
5. receive nice newly broken gcc, report bug and are told you should run revdep-rebuild, which of course, now that libgmp.so.3 is gone, reports problems.  Too bad if one actually follows what the e-build says?  Works on all other architectures I run.  Just not ppc32.

Marking the bug invalid seems like it will lead others to problems.  I had backups, so no big deal.  I am filing the bug for the sake of others I could image running into the same problem.
Comment 10 Joe Breuer 2012-05-21 11:20:14 UTC
For other poor souls bitten by this, I'll add my latest encounter with this:
(on amd64)

1. Do an upgrade, gmp is upgraded

2. The upgrade suggests:
   # revdep-rebuild --library '/usr/lib64/libgmp.so.3'

3. Using this, no files linking to it are found
   # rm '/usr/lib/libgmp.so.3'

4. congrats, gcc (specifically: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1) is now broken due to missing libgmp.so.3

4.1 Interestingly:
# file /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
# ldd /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1
        not a dynamic executable

So perhaps that's why revdep-rebuild does the Wrong Thing (TM).

5. [recover libgmp.so.3 from backup]

6. # emerge -1 gcc
sys-devel/gcc-4.5.3-r2 is rebuilt

7. # rm '/usr/lib/libgmp.so.3'

8. congrats, it's broken still/again

9. [recover libgmp.so.3 again]

10. Hmm. Idea:
   # revdep-rebuild --library 'libgmp.so.3'

11. Without the specific path, dev-libs/mpc is found to be using libgmp.so.3 and gets rebuilt

12. Now, removing libgmp.so.3 no longer poses a problem.