When emerging gimp-1.2.4, it fails on the gap plug-in due to unresolved symbols that seem to come from lib-mpeg. The gcc command line shows it using /usr/kde/3.1/ilb/libmpeg.so, which comes from kdemultimedia, even though the Makefile doesnt contain the filename and uses -lmpeg. Replacing -lmpeg with /usr/lib/libmpeg.a as a workaround fixes the problem (although it goes on to fail in plug-ins/common for the same reason; another replacement there will probably fix it). Command/errors from plug-ins/common: gcc -march=athlon-tbird -O3 -pipe -Wall -o .libs/mpeg mpeg.o -rdynamic ../../libgimp/.libs/libgimp.so -L/usr/lib -L/usr/kde/3.1/lib /usr/kde/3.1/lib/libmpeg.so -L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../.. -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lXv -lXxf86dga -lXxf86vm -lcdda_paranoia -lcdda_interface /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so /usr/lib/libogg.so -lpthread /usr/lib/libesd.so /usr/lib/libaudiofile.so /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so -lc -lgcc_s /usr/lib/libgtk.so /usr/lib/libgdk.so /usr/lib/libgmodule.so /usr/lib/libglib.so -ldl -lXi -lXext -lX11 -lm -Wl,--rpath -Wl,/usr/kde/3.1/lib -Wl,--rpath -Wl,/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 mpeg.o(.text+0x1a4): In function `load_image': : undefined reference to `SetMPEGOption' mpeg.o(.text+0x1b9): In function `load_image': : undefined reference to `OpenMPEG' mpeg.o(.text+0x264): In function `load_image': : undefined reference to `GetMPEGFrame' mpeg.o(.text+0x3da): In function `load_image': : undefined reference to `CloseMPEG' collect2: ld returned 1 exit status make[3]: *** [mpeg] Error 1 Reproducible: Always Steps to Reproduce: Portage 2.0.48 (default-x86-1.4, gcc-3.2.3, glibc-2.2.5-r2,2.3.2-r1) ================================================================= System uname: 2.4.20-gentoo-r3 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="ftp://sunsite.dk/mirrors/gentoo/ ftp://gentoo.linux.no/pub/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://distro.ibiblio.org/gentoo " CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 apm cups encode libg++ mikmod nls xmms zlib gtkhtml gdbm berkdb slang bonobo svga java guile esd oggvorbis gtk ldap cdr scanner 3dnow mmx X opengl dga xv fbcon kde qt qtmt arts -gnome motif tcltk imlib ncurses readline sdl gif jpeg png tiff gd avi mpeg quicktime oss ipv6 pam ssl crypt tcpd mozilla mozirc spell truetype xml xml2 pdflib tetex perl python libwww lib++ mysql postgres innodb samba doc gpm dvd ethereal usb -lirc" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache userpriv usersandbox"
hmm nasty.. we either fix the makefile or do an LDFLAGS trick where we specify /usr/lib/libmpeg.a as first LD flag. Can you try the second option, see if it works allright ? Just add LDFLAGS="${LDFLAGS} /usr/lib/libmpeg.a" to the ebuild . it might give some extra warnings, but nothing to be worried about.
I'm getting the same error with 1.2.5; the LDFLAGS fix doesn't work. I suspect it's still trying to use KDE's library first.
hmm yeah.. we it isn't a fix if it's untested. What if you change LDFLAGS into CFLAGS ?
CFLAGS is working so far; it just left plug-ins.
I also had a very similar problem: gcc -march=pentium3 -O2 -pipe -fomit-frame-pointer -Wall -o .libs/gap_decode_mpeg gap_decode_mpeg_main.o gap_arr_dialog.o gap_pdb_calls.o -rdynamic ../../libgimp/.libs/libgimpui.so -L/usr/lib -L/usr/X11R6/lib ../../libgimp/.libs/libgimp.so /usr/lib/libmpeg.so -L/usr/qt/3/lib -L/usr/kde/3/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2 -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../.. -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -lXv -lXxf86dga -lXxf86vm -lcdda_paranoia -lcdda_interface /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so /usr/lib/libogg.so /usr/lib/libesd.so /usr/lib/libaudiofile.so /usr/lib/libasound.so -lpthread /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libstdc++.so -lc -lgcc_s /usr/lib/libgtk.so /usr/lib/libgdk.so /usr/lib/libgmodule.so /usr/lib/libglib.so -ldl -lXi -lXext -lX11 -lm -Wl,--rpath -Wl,/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2 gcc: /usr/lib/libmpeg.so: No such file or directory The plugin was being linked against a non-existent /usr/lib/libmpeg.so After a lot of help from rac I managed to discover /usr/lib/libmpeg.la was causing the problems. This libtool library file was an errant copy of /usr/kde/3.1/lib/libmpeg.la (I'm still not sure how a copy managed to end up in the wrong place.) Removing this file caused gimp to compile successfully: gcc -march=pentium2 -O2 -pipe -fomit-frame-pointer -Wall -o .libs/gap_decode_mpeg gap_decode_mpeg_main.o gap_arr_dialog.o gap_pdb_calls.o -rdynamic ../../libgimp/.libs/libgimpui.so -L/usr/lib -L/usr/X11R6/lib ../../libgimp/.libs/libgimp.so -lmpeg /usr/lib/libgtk.so /usr/lib/libgdk.so /usr/lib/libgmodule.so /usr/lib/libglib.so -ldl -lXi -lXext -lX11 -lm creating gap_decode_mpeg
The errant libmpeg.la file includes: # Libraries that this one depends upon. dependency_libs=' -L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3/lib -L/usr/lib -L/usr/lib$ ..... # Directory that this library needs to be installed in: libdir='/usr/lib' This appears to be a file from a kdemultimedia 3.0.5b install. Maybe upgrading kde missed this file?
its more important to us if the 'fix' mentioned in #3 & #4 works for you.
In my case the fix in #3 and #4 did not work since the libmpeg.la file on my machine is redundant and points to both a non-existent libmpeg.so and non-existent dependencies. As an aside, I did however emerge kdemultimedia and test the fix against a current kde libmpeg.la file and can confirm that the CFLAGS trick works fine.
There is not much we can do about files which shouldn't be there. If that is in any way a reproducable problem it should be filed to the KDE team, but i very much doubt it is.
ok, i added the CFLAGS workaround as mentioned in #3 & #4 to 1.2.5 . Thanks for the report and testing.