[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: --as-needed problem
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-11-18 14:05:52
Message-ID: 200411181205.52941.thiago.macieira () kdemail ! net
[Download RAW message or body]


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 
to /usr/lib/libkdecore.so, instead of -lkdecore, which would have found 
it in -L order. I'm not sure, though, if -L overrides the system defaults 
(i.e., precedence over /usr/lib).

In any case, I've learnt from experience that building a new KDE with the 
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 
when you're doing exactly that: building to the same prefix. In those 
circumstances, the build system will add -L${prefix}/lib, which will make 
the linker find the wrong libraries. Why? Because the search order will 
be different. Also affected will be the lt-* programs, such as meinproc 
when building kdelibs.

As far as I can tell, it should not influence in the linking of libraries, 
unless paths are used in -L but not in RPATH.

But mostly I have found that libtool is to blame if the wrong libraries 
get picked up. It will sometimes store wrong library names in its .la 
files -- as well as absolute pathnames instead of -lsomething.

-- 
  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

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic