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

Bug#221528: make apt package cross compile friendly



Package: apt
Version: 0.5.14
Severity: wishlist
Tags: patch

Hi,

I just tried to cross compile an apt package for powerpc using
dpkg-cross. It works fine, after a few tweaks that are dpkg-cross
related, except for one thing in the autoconf part. It fails to find
the glibc version, because this is determined by trying to execute
a cross compiled program in buildlib/tools.m4. The following patch
to buildlib/tools.m4 fixes it:

93a94
>       AC_CACHE_VAL(ac_cv_glibc_ver,
105c106
<               GLIBC_VER="-$GLIBC_VER"
---
>               ac_cv_glibc_ver=$GLIBC_VER
109a111,112
>       )
>       GLIBC_VER="-$ac_cv_glibc_ver"

When the patch is applied, all you have to do is add the line
ac_cv_glibc_ver=libc6.2 (for target woody)
to /etc/dpkg/cross-config.$arch

(I also had to install dpkg-cross'ed versions of apt and apt-utils,
to make dpkg-shlibdeps find the libraries, but this is not a bug in
apt).

Making packages cross compile friendly is /very/ useful if the host
you are building for is very slow and lacks a compiler - as in my case.
So please consider applying this patch.

Greetings,
Oliver

-- Package-specific info:

-- (/etc/apt/preferences present, but not submitted) --


-- (/etc/apt/sources.list present, but not submitted) --


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux nimrod 2.4.22 #18 Tue Oct 21 10:03:29 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages apt depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.3.2-4    GCC support library
ii  libstdc++5                  1:3.3.2-4    The GNU Standard C++ Library v3

-- no debconf information




Reply to: