seems either the ebuild needs to declare a dependency on gpm or (better if it can be done) remove this dependency. Reproducible: Always Steps to Reproduce: 1. emerge unmerge gpm (if gpm is installed) 2. emerge libmpeg2 3. Actual Results: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgpm Expected Results: The best solution would be for libmpeg2 to not need gpm. Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 i686) ================================================================= System uname: 2.6.11-gentoo-r4 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.90GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 12 2005, 15:30:40)] distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -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="-O3 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms" GENTOO_MIRRORS="http://mirror.uni-c.dk/gentoo/" MAKEOPTS="-j8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac aalib alsa apm avi bash-completion berkdb bindist bitmap-fonts cairo cdparanoia cjk crypt cups curl dga dvd dvdread emboss encode font-server foomaticdb gdbm gif gimpprint glut gtk gtk2 imagemagick imlib ipv6 java jpeg lcms ldap libcaca libg++ libwww mad matroska mikmod mmx mng mozilla mp3 mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline real rtc samba sdl speex spell sse ssl svg svga theora threads tiff truetype truetype-fonts type1-fonts unicode xine xml2 xmms xprint xrandr xv xvid xvmc zlib video_cards_radeon linguas_fr linguas_en" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
um, can you please post the compile errors. From the very scant information you have provided, it's not clear whether something else links to a now non-existent libgpm or whether libmpeg2 is trying to link directly. I strongly suspect that libmpeg2 is linking to something which used to link to gpm (and is still trying to). Please reopen the bug after you have provided the compile output.
Here it is. I'm not sure why the -lgpm is used. I tried emerging aalib again (on pure guess, given libaa.so is sitting right next to the -lgpm) without success ("-gpm" was clearly used on aalib emerge and given the -av output was used on the previous aalib emerge too). Oddly I have another system where libmpeg2 could be installed without gpm. i686-pc-linux-gnu-gcc -Wall -march=pentium4 -fomit-frame-pointer -pipe -O3 -fomit-frame-pointer -fno-common -I/usr/include/SDL -D_REENTRANT -o .libs/mpeg2dec mpeg2dec.o dump_state.o getopt.o gettimeofday.o -Wl,-rpath -Wl,/usr/lib ../libvo/libvo.a -lSM -lICE -lXv -L/usr/lib /usr/lib/libSDL.so //usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/libstdc++.so -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/../../../i686-pc-linux-gnu/lib -lgcc_s -lc /usr/lib/libasound.so -ldl -lXext -lvga /usr/lib/libaa.so -lm -lgpm /usr/lib/libcaca.so -lX11 -lncurses -lpthread ../libmpeg2/.libs/libmpeg2.so ../libmpeg2/convert/.libs/libmpeg2convert.so -Wl,--rpath -Wl,//usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgpm collect2: ld returned 1 exit status distcc[13129] ERROR: compile (null) on localhost failed make[1]: *** [mpeg2dec] Error 1 make[1]: Leaving directory `/var/tmp/portage/libmpeg2-0.4.0b/work/mpeg2dec-0.4.0/src' make: *** [all-recursive] Error 1
Lionel, the symptoms you show indicate that something (not necessarily aalib) that libmpeg2 links against is, in turn, trying to link against lgpm. So the key here is to find what that is and remerge it so it does not try to link against gpm. So two things you can do: if you used to have "gpm" in USE, please run: emerge -Duv --newuse world -p to see what needs to be remerged because of changed USE flags. revdep-rebuild -- -p to see what portage itself finds as broken linking.
"emerge -Duv --newuse world -p" was my first attempt to find what could have gone wrong. Unfortunately portage thinks everything is ok there (nothing to re-emerge). "revdep-rebuild" slipped my mind though so I just launched: revdep-rebuild -- -p Checking reverse dependencies... Packages containing binaries and libraries broken by any package update, will be recompiled. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds... Nothing to rebuild Evaluating package order... done. (/root/.revdep-rebuild.5_order) Dynamic linking on your system is consistent... All done. Nothing :-( The command genrating the gcc call with -lgpm is the following: /bin/sh ../libtool --mode=link gcc -Wall -g -O3 -fomit-frame-pointer -fno-common -I/usr/include/SDL -D_REENTRANT -o mpeg2dec mpeg2dec.o dump_state.o getopt.o gettimeofday.o ../libvo/libvo.a -lSM -lICE -lX11 -lXext -lXv -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread ../libmpeg2/libmpeg2.la ../libmpeg2/convert/libmpeg2convert.la I'm trying to reemerge all suspect components one by one (beginning with SDL).
re-emerging libsdl did the trick. I'm not sure why... After re-emerging libsdl the libtool command calls: i686-pc-linux-gnu-gcc -Wall -march=pentium4 -fomit-frame-pointer -pipe -O3 -fomit-frame-pointer -fno-common -I/usr/include/SDL -D_REENTRANT -o .libs/mpeg2dec mpeg2dec.o dump_state.o getopt.o gettimeofday.o -Wl,-rpath -Wl,/usr/lib ../libvo/libvo.a -lSM -lICE -lXv -L/usr/lib /usr/lib/libSDL.so //usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/libstdc++.so -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/../../../i686-pc-linux-gnu/lib -lgcc_s -lc /usr/lib/libasound.so -ldl -lXext -lvga /usr/lib/libaa.so -lm /usr/lib/libcaca.so -lX11 -lncurses -lpthread ../libmpeg2/.libs/libmpeg2.so ../libmpeg2/convert/.libs/libmpeg2convert.so -Wl,--rpath -Wl,//usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5 -lgpm between -lm and /usr/lib/libcaca.so disappeared. Note that the libsdl is linked to libcaca and libaa. Is it possible that for example, sdl was emerged with aalib compiled with gpm support, then aalib was re-emerged without it and libsdl still somehow could fool libtool into thinking it needs -lgpm for this?
yes, it's very possible.