[PATCH]: creating la files also for static libraries

Thiago Macieira thiago at kde.org
Wed Oct 26 11:46:39 CEST 2005


Ralf Habacker wrote:
>Am Mittwoch, 26. Oktober 2005 03:19 schrieb Thiago Macieira:
>> There are only two types: modules and shared libraries. Both ioslaves
>> and kdeinit programs are modules.
>
>do I understand right that shared library under linux are not loadable
> while modules are ? Under windows such a difference does not exist.

Almost. It's MacOS X that has this distinction.

Linux and other ELF platforms work just like Windows wrt to dynamically 
loadable stuff.

>But would not using empty la files confuse others who know the real
> intention also as internal file.
>I think it would  be better to use a new extension independently from
> already established standards for example .dep or similar.

Ok

>> So we're back to my point: .la are used to:
>> 1) track static library dependency
>> 2) "symlink" to the versioned binary file
>>
>> We won't use #2 for modules. As for #1, I think I asked a while ago if
>> Win32/cygwin/mingw can already cope with indirect dependencies.
>
>I'm not sure, I understand what exactly do you mean with indirect
>dependencies.
>cygwin provides unix like file system including symlinks, while all
> other environments linke mingw, msvc does not have symlink support.

I mean this: do I have to add the list of libraries used by the libraries 
I use to the link line? For instance, suppose my program uses A.dll and A 
links to B.dll (say, kernel32.dll). Do I have to make my link line:

	gcc -o myprog myprog.o -lA -lB (-lkernel32 -ladvapi32 -l...)
?

However, we do have a problem with *direct* dependencies, at least with 
the Solaris linker. The real usecase (bug 115058) is:
  my program uses symbols from libvorbis
  my program links to libvorbisenc
  libvorbisenc links to libvorbis

With the GNU linker, compiling without -lvorbis is perfectly fine, because 
it'll find the dependency. The Solaris ld detects that the symbol is 
implicit and refuses to link.

The consequence of this is that each and every program in KDE *must* list 
all libraries from which it uses at least one symbol, including Qt and 
kdecore.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

1. On frumscafte, hwonne time_t wæs náht, se scieppend þone circolwyrde 
wundorcræftlíge cennede and seo eorðe wæs idel and hit wæs gód.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20051026/5948b952/attachment.pgp


More information about the Kde-buildsystem mailing list