On Thu, 05 Apr 2012 23:51:56 -0500 "David C. Rankin" drankinatty@suddenlinkmail.com wrote:
All,
Help? One of the side effects of the gcc 4.7 move is an install error in several packages of the form (gwenview example):
/usr/bin/ld: cannot find -ltdeinit_gwenview collect2: error: ld returned 1 exit status libtool: install: error: relink `gwenview.la' with the above command before installing it
Why would I have to relink anything during 'install' ?? Why doesn't it do it??
The 'above command' it wants me to relink with is:
libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/crtbeginS.o .libs/gwenview_dummy.o -Wl,-rpath -Wl,/opt/trinity/lib -Wl,-rpath -Wl,/opt/tqt3/lib -L/build/src/gwenview/src/gvcore/.libs -L/opt/trinity/lib -L/opt/tqt3/lib -L/usr/lib/mysql -L/usr/X11R6/lib64 -L/build/pkg/opt/trinity/lib -ltdeinit_gwenview -L/usr/lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib -lgwenviewcore -ltdeprint -lkmediaplayer -ljpeg -lexiv2 -lkipi -lkio -ltdeui -ltdecore -L/build/pkg/usr/lib -lkutils -L/build/pkg/opt/tqt3/lib -ltqt-mt -lpq -lmysqlclient -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -ldl -lpng -lz -lXext -lX11 -lSM -lICE -ltqt -lpthread -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0 -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/crtendS.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib/crtn.o -O2 -march=x86-64 -mtune=generic -O2 -Wl,--no-undefined -Wl,--allow-shlib-undefined -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,--hash-style=gnu -Wl,-soname -Wl,gwenview.so -o .libs/gwenview.so
Why can't it find -ltdeinit_gwenview? It's right where it should be:
23:42 archangel:/dat_e/chroot/david/build/src/gwenview> find . -name "libtdeinit_gwenview*" ./src/app/libtdeinit_gwenview.la ./src/app/.libs/libtdeinit_gwenview.lai ./src/app/.libs/libtdeinit_gwenview.soT ./src/app/.libs/libtdeinit_gwenview.so ./src/app/.libs/libtdeinit_gwenview.la
Why does it appear to be missing -L/build/src/gwenview/src/app/.libs ?
That's a lot of 'Whys?', but I'm stumped.
Best guess: the dependency_libs in the .la file is being incorrectly generated. The quick-stupid fix would probably involve applying sed in between the compile and the install phase, since a .la is a text settings file (one of dubious value that causes endless problems under Gentoo, which is the only reason I know anything about them at all).
The correct fix is probably to get libtool out of the toolchain entirely, stop generating the .la, and replace them with pkg-config and a .pc (ref: http://blog.flameeyes.eu/2008/04/what-about-those-la-files ).