Subject: inter-shlib dependencies ?
To: None <>
From: Jaromir Dolecek <>
List: current-users
Date: 02/12/1999 23:18:34
I have a shared library, say ``foo''. It uses some functions from other
shared library, say it's ``foo2''. The foo library was linked against
``foo2'', with something like
	ld -Bshareable -o _some_objs_ -lfoo2
or whatever else is needed on ELF.

Now I make an application (say ``fx'') and link it against ``foo'' only:
	cc -o fx -lfoo
Now when I run the app and it calls a function defined in ``foo''
which in turn calls function defined in ``foo2'', everything works
even when the ``fx'' application is linked against ``foo'' only.

My questions:
Is this true for all NetBSD archs -- i.e. for ELF and something
other than i386 ?
If yes, why pkglibtools strips -l,-L parameters while linking shared library ?

While looking on KDE's kimgio library, I discovered pkglibtools
seems to not pass those -l and -L flags, so I'd like to find if there is
any reason for such behaviour. Each and every application, which
wants to use kimgio needs to be explicitely linked with libtiff &
libjpg to be able to work for those formats. If I go and link
kimgio by hand with -ltiff & -ljpeg added to ld flags, it works ok
and all applications are happy.

That's all on NetBSD-current/i386, as you might guess already :)
It's the snapshot from about beginning of december.
Jaromir Dolecek <>
It is better never to have been born.  But who among us has such luck?
One in a million, perhaps.