[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#499292: dpkg-cross: cross package misses out libraries in sub-dirs



Package: dpkg-cross
tag 499292 + moreinfo
thanks

On Wed, 17 Sep 2008 14:51:28 +0100
Wookey <wookey@debian.org> wrote:

> Package: dpkg-cross
> Version: 2.3.0
> Severity: important
> 
> Doing dpkg-cross -a arm -b libgsmd0_0.8-12_arm.deb 
> produces a cross-package libgsmd0-arm-cross_0.8-12_all.deb as
> expected. However the cross package is missing most of the libraries
> in the original - having only dangling symlinks:

There is a significant problem here. Allowing dpkg-cross to think that
files in /usr/lib/.+/ where . != lib are "useful" would make a whole
set of plugins, modules and private application libraries into "useful"
files. I'm not sure we want to do that. e.g. every GConv .so file in
glibc would suddenly be added to libc6-arm-cross, repeated for every
other toolchain.

$ find /usr/lib/ -name '*.so' | grep -v '/usr/lib/lib' | grep -c so
2323

Ouch.

> $> dpkg-deb --contents libgsmd0_0.8-12_arm.deb

I can't find this package in Debian - the /usr/lib/$package/
subdirectories should not normally be used for public libraries with
symbols that need to be linked against any other object.

> lrwxrwxrwx root/root         0 2008-09-16 15:23 ./usr/lib/gsmd/libgsmd-machine_generic.so -> libgsmd-machine_generic.so.0.0.0

Isn't that a private application plugin|module ? Is there any actual
purpose in providing these for linking during the build? Most plugins
and private application libraries are explicitly prevented from being
linked against other objects outside the application concerned - it is
possible that even if these objects are provided, dpkg-shlibdeps may
not be able to locate them.

> drwxr-xr-x root/root         0 2008-09-17 14:41 ./usr/arm-linux-gnu/lib/
> -rw-r--r-- root/root     21864 2008-09-16 15:23 ./usr/arm-linux-gnu/lib/libgsmd.so.0.0.0

This behaviour is intended only for support for libcairo-directfb
(which itself is probably not the best solution and does cause problems
elsewhere in the build).

> drwxr-xr-x root/root         0 2008-09-17 14:41 ./usr/arm-linux-gnu/lib/gsmd/

"Shared object files (often .so files) that are not public libraries,
that is, they are not meant to be linked to by third party executables
(binaries of other packages), should be installed in subdirectories of
the /usr/lib directory. Such files are exempt from the rules that
govern ordinary shared libraries, except that they must not be
installed executable and should be stripped.

Packages containing shared libraries that may be linked to by other
packages' binaries, but which for some compelling reason can not be
installed in /usr/lib directory, may install the shared library files
in subdirectories of the /usr/lib directory, in which case they should
arrange to add that directory in /etc/ld.so.conf in the package's
post-installation script, and remove it in the package's post-removal
script."

Policy 10.2

Does gsmd have a compelling reason for putting public libraries
in /usr/lib/gsmd/ ? Are these files public libraries? Are they actually
"useful" within the context of dpkg-cross?

Is it safe to make such files "useful" to dpkg-cross when the vast
majority of these files are expressly *not* meant to be linked into
package builds?

True, the dangling symlinks aren't nice but I think dpkg-cross is doing
the right thing here. 

(I may remove the workaround for libcairo-directfb after Lenny - I
think we need a different solution for that problem. It currently
prevents the gtk2.0 -udeb from being cross-built and the workaround
is not a complete fix anyway.)

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp9shiw0hfux.pgp
Description: PGP signature


Reply to: