From kde-core-devel Thu Nov 18 14:05:52 2004 From: Thiago Macieira Date: Thu, 18 Nov 2004 14:05:52 +0000 To: kde-core-devel Subject: Re: --as-needed problem Message-Id: <200411181205.52941.thiago.macieira () kdemail ! net> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110078679314461 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart4428284.FKd8r9eNJ6" --nextPart4428284.FKd8r9eNJ6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline David Faure wrote: [from the command-line:] > -lXtst /mnt/devel/kde/kdecvs/build/kdebase/libkonq/.libs/libkonq.so > /mnt/devel/kde/kdedir/lib/libkparts.so -L/usr/lib/qt3/lib > /usr/lib/libkdecore.so /usr/lib/libDCOP.so /usr/lib/libkdefx.so Notice that your command-line contains the reference=20 to /usr/lib/libkdecore.so, instead of -lkdecore, which would have found=20 it in -L order. I'm not sure, though, if -L overrides the system defaults=20 (i.e., precedence over /usr/lib). In any case, I've learnt from experience that building a new KDE with the=20 same prefix as one that is already installed is not a good thing. Now, having said that, --as-needed does have some side-effects, especially= =20 when you're doing exactly that: building to the same prefix. In those=20 circumstances, the build system will add -L${prefix}/lib, which will make=20 the linker find the wrong libraries. Why? Because the search order will=20 be different. Also affected will be the lt-* programs, such as meinproc=20 when building kdelibs. As far as I can tell, it should not influence in the linking of libraries,= =20 unless paths are used in -L but not in RPATH. But mostly I have found that libtool is to blame if the wrong libraries=20 get picked up. It will sometimes store wrong library names in its .la=20 files -- as well as absolute pathnames instead of -lsomething. =2D-=20 Thiago Macieira - Registered Linux user #65028 thiago (AT) macieira (DOT) info ICQ UIN: 1967141 PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 --nextPart4428284.FKd8r9eNJ6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBnKxAM/XwBW70U1gRAiFZAJ0aoSxftUHuQ5bOe/gI0cz8K++y1QCbByrR w98PSm+7LOiPoi+8Iv9LzAY= =uTZe -----END PGP SIGNATURE----- --nextPart4428284.FKd8r9eNJ6--