Debian Bug report logs - #463588
dpkg-cross: -a amd64 should search /emul/ia32-linux

version graph

Package: dpkg-cross; Maintainer for dpkg-cross is Debian Embedded Group <debian-embedded@lists.debian.org>; Source for dpkg-cross is src:dpkg-cross.

Reported by: Tim Bagot <timb@bluearc.com>

Date: Fri, 1 Feb 2008 17:03:02 UTC

Severity: normal

Tags: patch

Found in versions dpkg-cross/2.1.0, dpkg-cross/2.2.4

Fixed in version dpkg-cross/2.3.0

Done: Neil Williams <codehelp@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Tim Bagot <timb@bluearc.com>, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#463588; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to Tim Bagot <timb@bluearc.com>:
New Bug report received and forwarded. Copy sent to Tim Bagot <timb@bluearc.com>, Debian Embedded Group <debian-embedded@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Tim Bagot <timb@bluearc.com>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: dpkg-cross: -a amd64 should search /emul/ia32-linux
Date: Fri, 01 Feb 2008 17:00:51 +0000
Package: dpkg-cross
Version: 2.1.0
Severity: normal

Suppose I want a cross-compiling environment targeting Debian-amd64. By
default, the gcc-4.2 package builds a biarch compiler (which is after
all needed to replicate properly the build environment available on an
amd64 host), and therefore requires libc6{,-dev}-i386-amd64-cross.
Unfortunately dpkg-cross does not convert these packages successfully:
it fails to find any libraries because they are all in /emul/ia32-linux,
which it does not search. I think dpkg-cross should search for libraries
under /emul/ia32-linux and put them in $(CROSSDIR)/lib32/.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg-cross depends on:
ii  binutils-multiarch  2.18.1~cvs20080103-1 Binary utilities that support mult
ii  debconf [debconf-2. 1.5.19               Debian configuration management sy
ii  dpkg-dev            1.14.16.6            package building tools for Debian
ii  libdebian-dpkgcross 2.1.0                functions to aid cross-compiling D
ii  perl                5.8.8-12             Larry Wall's Practical Extraction 

Versions of packages dpkg-cross recommends:
ii  fakeroot                      1.9.1      Gives a fake root environment

-- debconf information:
* dpkg-cross/default-arch: None




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Embedded Group <debian-embedded@lists.debian.org>:
Bug#463588; Package dpkg-cross. Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Embedded Group <debian-embedded@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 463588@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 463588@bugs.debian.org
Cc: Debian Embedded <debian-embedded@lists.debian.org>
Subject: Possible fix
Date: Sat, 12 Jul 2008 19:47:29 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg-cross
tag 463588 + patch
thanks

> Suppose I want a cross-compiling environment targeting Debian-amd64. By
> default, the gcc-4.2 package builds a biarch compiler (which is after
> all needed to replicate properly the build environment available on an
> amd64 host), and therefore requires libc6{,-dev}-i386-amd64-cross.
> Unfortunately dpkg-cross does not convert these packages successfully:
> it fails to find any libraries because they are all in /emul/ia32-linux,
> which it does not search. I think dpkg-cross should search for libraries
> under /emul/ia32-linux and put them in $(CROSSDIR)/lib32/.

Would changes that result in the contents of the package below be an
appropriate fix for this bug?

$ dpkg -c libc6-dev-i386-amd64-cross_2.7-12_all.deb
drwxr-xr-x root/root         0 2008-07-12 19:39 ./
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/
-rw-r--r-- root/root    128946 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libnsl.a
-rw-r--r-- root/root       858 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/Mcrt1.o
-rw-r--r-- root/root     12668 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libanl.a
-rw-r--r-- root/root      2482 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/Scrt1.o
-rw-r--r-- root/root   1072840 2008-06-02 22:20 ./usr/x86_64-linux-gnu/lib32/libpthread.a
-rw-r--r-- root/root      2172 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/crti.o
-rw-r--r-- root/root       286 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libc.so
-rw-r--r-- root/root       810 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libbsd-compat.a
-rw-r--r-- root/root      1712 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/crtn.o
-rw-r--r-- root/root      1162 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libBrokenLocale.a
-rw-r--r-- root/root      8054 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libdl.a
-rw-r--r-- root/root     85754 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libresolv.a
-rw-r--r-- root/root      2416 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/crt1.o
-rw-r--r-- root/root     16350 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libc_nonshared.a
-rw-r--r-- root/root      1192 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libmcheck.a
-rw-r--r-- root/root       810 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libg.a
-rw-r--r-- root/root      8792 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libutil.a
-rw-r--r-- root/root     49438 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libcrypt.a
-rw-r--r-- root/root    492274 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libm.a
-rw-r--r-- root/root     59330 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/librt.a
-rw-r--r-- root/root      3376 2008-06-02 22:20 ./usr/x86_64-linux-gnu/lib32/libpthread_nonshared.a
-rw-r--r-- root/root      4168 2008-06-02 22:19 ./usr/x86_64-linux-gnu/lib32/gcrt1.o
-rw-r--r-- root/root   3033660 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libc.a
-rw-r--r-- root/root       662 2008-06-02 22:22 ./usr/x86_64-linux-gnu/lib32/libieee.a
-rw-r--r-- root/root       248 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libpthread.so
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/include/
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/include/gnu/
-rw-r--r-- root/root       624 2008-06-02 22:20 ./usr/x86_64-linux-gnu/include/gnu/stubs-32.h
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/include/sys/
-rw-r--r-- root/root      1012 2008-06-02 22:20 ./usr/x86_64-linux-gnu/include/sys/elf.h
-rw-r--r-- root/root      1193 2008-06-02 22:20 ./usr/x86_64-linux-gnu/include/sys/vm86.h
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/share/
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/share/doc/
drwxr-xr-x root/root         0 2008-07-12 19:39 ./usr/share/doc/libc6-dev-i386-amd64-cross/
-rw-r--r-- root/root       283 2008-07-12 19:39 ./usr/share/doc/libc6-dev-i386-amd64-cross/README
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_dns.so -> libnss_dns.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libcidn.so -> libcidn.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_files.so -> libnss_files.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libresolv.so -> libresolv.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libanl.so -> libanl.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libutil.so -> libutil.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libthread_db.so -> libthread_db.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_compat.so -> libnss_compat.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libBrokenLocale.so -> libBrokenLocale.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_nis.so -> libnss_nis.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libcrypt.so -> libcrypt.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libm.so -> libm.so.6
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libdl.so -> libdl.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnsl.so -> libnsl.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_hesiod.so -> libnss_hesiod.so.2
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/librt.so -> librt.so.1
lrwxrwxrwx root/root         0 2008-07-12 19:39 ./usr/x86_64-linux-gnu/lib32/libnss_nisplus.so -> libnss_nisplus.so.2

Current changes for this bug and #483076:

Index: dpkg-cross
===================================================================
RCS file: /cvsroot/dpkg-cross/dpkg-cross/dpkg-cross,v
retrieving revision 1.51
diff -p -u -b -B -r1.51 dpkg-cross
--- dpkg-cross	10 Jul 2008 19:00:52 -0000	1.51
+++ dpkg-cross	12 Jul 2008 18:42:00 -0000
@@ -559,6 +559,14 @@ sub sub_build {
 		} elsif (/^\/usr(\/X11R6)?\/lib32\/([^\/]+\.[ao])$/) {
 			# regular .a or .o file under /usr/lib32 or /usr/X11R6/lib32
 			link_file("$src$_", "$dst$crosslib32/$2") or goto fail;
+		} elsif ((m:^/emul/ia32-linux/usr/lib/([^\/]+\.[ao])$:)) {
+			# regular .a or .o file under /emul/ia32-linux/
+			link_file("$src$_", "$dst$crosslib32/$1") or goto fail;
+		} elsif (m:^/usr/lib/([\w\-/]+)/lib/([^/]+\.so[^/]*)$:) {
+			# regular .so* file under /usr/lib/.*/lib/
+			# e.g. /usr/lib/libcairo-directfb/lib/libcairo.so.2.17.5
+			# See #483076
+			link_file("$src$_", "$dst$crosslib/$1/lib/$2") or goto fail;
 		} elsif (/^(\/usr(\/X11R6)?)?\/lib\/([^\/]+\.so[^\/]*)$/) {
 			# regular .so* file under /lib, /usr/lib or /usr/X11R6/lib
 			if (is_ldscript("$src$_")) {
@@ -587,6 +595,13 @@ sub sub_build {
 			} else {
 				link_file("$src$_", "$dst$crosslib32/$3") or goto fail;
 			}
+		} elsif ((m:^/emul/ia32-linux/usr/lib/([^\/]+\.so[^\/]*)$:)) {
+			# regular .so* file under /emul/ia32-linux/usr/lib
+			if (is_ldscript("$src$_")) {
+				fix_ldscript("$src$_", "$dst$crosslib32/$1") or goto fail;
+			} else {
+				link_file("$src$_", "$dst$crosslib32/$1") or goto fail;
+			}
 		} elsif (/^\/usr(\/X11R6)?\/lib\/([^\/]+\.la)$/) {
 			# regular .la file under /usr/lib or /usr/X11R6/lib
 			fix_la_file("$src$_", "$dst$crosslib/$2", $crosslib) or goto fail;
@@ -596,6 +611,9 @@ sub sub_build {
 		} elsif (/^\/usr(\/X11R6)?\/lib32\/([^\/]+\.la)$/) {
 			# regular .la file under /usr/lib32 or /usr/X11R6/lib32
 			fix_la_file("$src$_", "$dst$crosslib32/$2", $crosslib32) or goto fail;
+		} elsif ((m:^/emul/ia32-linux/usr/lib/([^\/]+\.la)$:)) {
+			# regular .la file under /emul-ia32-linux/usr/lib/
+			fix_la_file("$src$_", "$dst$crosslib32/$1", $crosslib32) or goto fail;
 		} elsif (/\/usr\/lib\/(pkgconfig\/[^\/]+.pc)$/) {
 			# regular .pc file in /usr/lib/pkgconfig
 			fix_pc_file("$src$_", "$dst$crosslib/$1") or goto fail;
@@ -642,7 +660,7 @@ sub sub_build {
 		chomp;
 		s/^$src//;
 		# Ignore any symlinks not under /usr or /lib or /lib64
-		/^\/(usr|lib|lib64)/ or next;
+		m:^/(usr|lib|lib64|emul/ia32-linux): or next;
 		next if (/^\/usr\/\w+-\w+(-\w+(-\w+)?)?\// && !$cross2cross);
 		# Find out (absolute) symlink destination
 		my $lv = readlink("$src$_");
@@ -651,7 +669,7 @@ sub sub_build {
 			$lv = "$1/$lv";
 		}
 		# Ignore any symlinks pointing outside /usr and /lib and /lib64
-		$lv =~ /^\/(usr|lib|lib64)/ or next;
+		$lv =~ m:^\/(usr|lib|lib64|emul/ia32-linux): or next;
 
 		# Calculate corresponding DESTINATION path
 		$lv = convert_path($lv);

Index: Debian/DpkgCross.pm
===================================================================
RCS file: /cvsroot/dpkg-cross/dpkg-cross/Debian/DpkgCross.pm,v
retrieving revision 1.30
diff -p -u -b -B -r1.30 DpkgCross.pm
--- Debian/DpkgCross.pm	26 Jun 2008 15:22:13 -0000	1.30
+++ Debian/DpkgCross.pm	12 Jul 2008 18:42:14 -0000
@@ -510,6 +510,8 @@ sub convert_path ($) {
 		$path = "$crosslib64/$'";
 	} elsif ($path =~ /^(\/usr(\/X11R6)?)?\/lib32\//) {
 		$path = "$crosslib32/$'";
+	} elsif ($path =~ m:^(/emul/ia32-linux/(usr/)?lib/):) {
+		$path = "$crosslib32/$'";
 	} elsif ($path =~ /^\/usr\/\w+-\w+(-\w+(-\w+)?)?\//) {
 		# leave alone
 	} else {

Is it safe to include ia32-linux in the pattern matches? Are there other
cases where non-linux support might be needed?

-- 


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


[signature.asc (application/pgp-signature, inline)]

Tags added: patch Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sat, 12 Jul 2008 18:51:06 GMT) Full text and rfc822 format available.

Bug marked as found in version 2.2.4. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sat, 12 Jul 2008 21:27:13 GMT) Full text and rfc822 format available.

Tags added: pending Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Sun, 13 Jul 2008 10:03:10 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Tim Bagot <timb@bluearc.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #21 received at 463588-close@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 463588-close@bugs.debian.org
Subject: Bug#463588: fixed in dpkg-cross 2.3.0
Date: Tue, 15 Jul 2008 14:47:04 +0000
Source: dpkg-cross
Source-Version: 2.3.0

We believe that the bug you reported is fixed in the latest version of
dpkg-cross, which is due to be installed in the Debian FTP archive:

dpkg-cross_2.3.0.dsc
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0.dsc
dpkg-cross_2.3.0.tar.gz
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0.tar.gz
dpkg-cross_2.3.0_all.deb
  to pool/main/d/dpkg-cross/dpkg-cross_2.3.0_all.deb
libdebian-dpkgcross-perl_2.3.0_all.deb
  to pool/main/d/dpkg-cross/libdebian-dpkgcross-perl_2.3.0_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 463588@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <codehelp@debian.org> (supplier of updated dpkg-cross package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 15 Jul 2008 14:10:28 +0100
Source: dpkg-cross
Binary: dpkg-cross libdebian-dpkgcross-perl
Architecture: source all
Version: 2.3.0
Distribution: unstable
Urgency: low
Maintainer: Debian Embedded Group <debian-embedded@lists.debian.org>
Changed-By: Neil Williams <codehelp@debian.org>
Description: 
 dpkg-cross - tools for cross compiling Debian packages
 libdebian-dpkgcross-perl - functions to aid cross-compiling Debian packages
Closes: 463588 483076 489567
Changes: 
 dpkg-cross (2.3.0) unstable; urgency=low
 .
   * Same change as apt-cross in the buginfo.sh script:
   * bashism in /bin/sh script (Closes: #489567)
   * corrupted pkg-config data for libcairo-directfb (Closes: #483076)
   * -a amd64 should search /emul/ia32-linux (Closes: #463588)
Checksums-Sha1: 
 a59de12706e85d42404100c2c466687f15ae428d 1259 dpkg-cross_2.3.0.dsc
 83bd95e30960d0461e41bc4304adcd8c388816d7 84931 dpkg-cross_2.3.0.tar.gz
 8eb38b306d3a15aa1c02a51a289ab3703471a499 49192 dpkg-cross_2.3.0_all.deb
 7d3fbb77e7bb4a5a176fabf78378439494fbd5ed 30802 libdebian-dpkgcross-perl_2.3.0_all.deb
Checksums-Sha256: 
 60a1ee6e850bf66e335dceab69d98a13c484226acb8dc2caf160df0291913799 1259 dpkg-cross_2.3.0.dsc
 0e9039daa32c8437c24af7111c7a80c7d47d8277db8e8f4bbb0468e192efe85f 84931 dpkg-cross_2.3.0.tar.gz
 8e7429df31f3f05efaaf783837ba30afed06e3fc8fb64799be6de86ec593fe6b 49192 dpkg-cross_2.3.0_all.deb
 844fc3a7c2b2e309f40478c8e28e01702873a3a50eb9c568f8b347b892b7587f 30802 libdebian-dpkgcross-perl_2.3.0_all.deb
Files: 
 9ff000ca96d9812f9b7380cb2a22927d 1259 utils extra dpkg-cross_2.3.0.dsc
 8672b454f53493b7302578d831ea01b9 84931 utils extra dpkg-cross_2.3.0.tar.gz
 0b51a566ef5683d34e6ef66132799329 49192 utils extra dpkg-cross_2.3.0_all.deb
 f5267c14cc138bad64d7ee7427cacea9 30802 perl extra libdebian-dpkgcross-perl_2.3.0_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkh8tRcACgkQiAEJSii8s+PzfwCfYQxWU0BSjlll2nLr16khxpPY
gR8Anjd1DDoYka/IaP2IFfiip2iOc5rh
=55fC
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Aug 2008 07:35:52 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 13:18:49 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.