From kde-core-devel Tue Nov 09 17:47:21 2004 From: Szombathelyi "György" Date: Tue, 09 Nov 2004 17:47:21 +0000 To: kde-core-devel Subject: Re: --as-needed problem Message-Id: <200411091847.21198.gyurco () freemail ! hu> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110002267410791 2004. november 9. 18.32 dátummal David Faure ezt írta: > > > > > > The problem is that libtool puts all paths to direct and indirect > > > dependencies into the RPATH section of lt-meinproc, but since libkdeui > > > is not a direct dependency, it's not listed in the NEEDED section. > > > > > > $ objdump -p lt-meinproc (only relevant parts): > > > > > > NEEDED libkio.so.4 > > > NEEDED libkdecore.so.4 > > > NEEDED libqt-mt.so.3 > > > NEEDED libbz2.so.1 > > > NEEDED libxslt.so.1 > > > NEEDED libxml2.so.2 > > > NEEDED libstdc++.so.5 > > > NEEDED libc.so.6 > > > RPATH > > > /home/gyuri/cvs/kdelibs/kio/.libs:/home/gyuri/cvs/kdelibs/kdeui/.libs:/ > > >home > > > /gyuri/cvs/kdelibs/kdesu/.libs:/home/gyuri/cvs/kdelibs/kwallet/client/. > > >libs: > > > /home/gyuri/cvs/kdelibs/kdecore/.libs:/home/gyuri/cvs/kdelibs/dcop/.lib > > >s:/ho > > > me/gyuri/cvs/kdelibs/kdefx/.libs:/opt/kde3/lib:/usr/lib/qt-3.3/lib:/usr > > >/X11R 6/lib:/usr/lib > > > > > > $ objdump -p lt-meinproc: > > > RPATH /opt/kde3/lib:/usr/lib/qt-3.3/lib:/usr/X11R6/lib > > > > > > > > > So the library path for libkdeui is picked from libkio (libkio is > > > depend directly on libkdeui), which has the RPATH set to $KDEDIR/lib. > > > But if you remove $KDEDIR/lib/libkio.so.4, the dynamic linker falls > > > back to the RPATH in lt-meinproc, and everything will work again. > > > I hope this small(?) inconvenience will not end in removing the > > > --as-needed patch (if you're a developer, and disturbed by this > > > behavior you can always compile with --disable-as-needed), it's _very_ > > > useful for making KDE packages. > > If it prevents compiling kdelibs, it won't be any good to packagers either. > > This sounds like two conflicting libtool features - can't it be fixed in > libtool somehow? (hacking the RPATH or something) I don't think it's easily solvable. Libtool generates custom RPATH values only for programs (in lt-progname), not for libraries. Libtool should create ./libs/lt-library_name.so.x.x.x, not just ./libs/library_name.so.x.x.x and link lt-progname not to library_name, but to lt-library_name. Then lt-library_name.so.x.x.x can contain the custom RPATH values, like lt-progname (which points to the build dir). Bye, György ____________________________________________________________________ Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol. Probald ki most! http://www.freestart.hu