[PATCH]: creating la files also for static libraries
Ralf Habacker
ralf.habacker at freenet.de
Wed Oct 26 15:44:38 CEST 2005
Am Mittwoch, 26. Oktober 2005 11:46 schrieb Thiago Macieira:
> 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
I have added this requirement to the todo list.
> >> 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.
Is libvorbisenc a static library ? If so, then there should the .dep file
contains any platform inpendent form of dependencies. The question is what
form.
> 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.
which is the prefered way under windows too, because the linker does not have
such support.
Probably the library module stuff of bksys (obj.uselib) is able to deal with
this.
The KIO module for example provides the kdesu and kdewalletclient library
beside the main kio library, although for other reason as you stated.
Regards
Ralf
More information about the Kde-buildsystem
mailing list