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

Re: sh support in dpkg-cross

On Tue, 2008-01-29 at 14:06 +0100, Jonas Meyer wrote:
> Hello,
> Im playing with sh3. I already got a toolchain that seems to work, but
> I cant figure out how to make dpkg-shlibdeps work. As I built a
> toolchain for mipsel in parallel with the sh3 toolchain Im pretty sre
> that the problem is not with the toolchain but with dpkg-cross or
> dpkg-shlibdeps.

The problem is with the rewritten dpkg-shlibdeps that cannot work with
the rewritten dpkg-cross. See #453267

> Building expat fails likethisfor sh3:
> dh_shlibdeps -a -l /mnt/quitte/sh3linux/expat-1.95.8/debian/libexpat1/usr/lib
> dpkg-shlibdeps: failure: couldn't find library libgcc_s.so.1 needed by
> debian/libexpat1/usr/lib/libexpat.so.1.0.0 (its RPATH is '').
> Note: libraries are not searched in other binary packages that do not
> have any shlibs or symbols file.
> To help dpkg-shlibdeps find private libraries, you might need to set

Which is precisely what you do need to do.

use constant DEFAULT_LIBRARY_PATH =>
    qw(/lib /usr/lib /lib32 /usr/lib32 /lib64 /usr/lib64
       /emul/ia32-linux/lib /emul/ia32-linux/usr/lib);
my @shlibdeps=();
# GCC_TARGET for cross compiler builds
my $crossprefix = Dpkg::Arch::debarch_to_gnutriplet($ENV{GCC_TARGET}) if
# host for normal cross builds.
$crossprefix = $ENV{DEB_HOST_GNU_TYPE}
# target when building a cross compiler
$crossprefix = $ENV{DEB_TARGET_GNU_TYPE}
if ($crossprefix)
    @shlibdeps = ( "${crossprefix}/lib", "/usr/${crossprefix}/lib",
    "/${crossprefix}/lib32", "/usr/${crossprefix}/lib32",
    "/${crossprefix}/lib64", "/usr/${crossprefix}/lib64");
our @librarypaths = ((DEFAULT_LIBRARY_PATH), @shlibdeps);

The basic effect is to:
1) detect cross builds, reverse cross and cross compiler builds
2) add /usr/$arch_triplet/lib to LD_LIBRARY_PATH for the call to
dpkg-shlibdeps only when necessary.


Neil Williams

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: