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

Bug#919596: build-dependencies when crossbuilding choose-mirror



Le samedi 19 janvier à 07h 48mn 18s (+0100), Cyril Brulebois a écrit :
> Hi JH,
> 
> jhcha54008 <jhcha54008@free.fr> (2019-01-17):
> > Package: choose-mirror
> > Version: 2.96
> > Severity: wishlist
> > Tags: patch
> > 
> > Dear Maintainer,
> > 
> > Crossbuilding choose-mirror with dpkg-buildpackage -a .... results in
> > an error at the present time.
> > 
> > It succeeds with the patch below.
> 
> I'd be happy to get a log for the failure and/or a complete description
> on how to reproduce it; a description of why the change is needed / how
> it works would also be welcome.
> 
> (No objections on the patch on its own, but not everyone is uptospeed
> regarding crossbuilding, so some details would be appreciated.)
> 
> 
> Thanks,
> -- 
> Cyril Brulebois (kibi@debian.org)            <https://debamax.com/>
> D-I release manager -- Release team member -- Freelance Consultant


Hi,

Thank your for your answer. Here is a revised
version of the bug report. Thanks in advance
for your advice if there is a better way.

* Why cross-compile choose-mirror ?

The official debian-installer and udeb packages
are built on native buildds. It would be handy
to build on amd64 for testing purpose though - 
particularly when targeting some exotic 
architectures which might not exist yet for real
(e.g. riscvos. See [1])

It should be possible to cross-compile choose-mirror :
debian/rules defines the exported variables DEB_HOST_ARCH
and CROSS.

* What is the actual problem with choose-mirror ?

$ dpkg-buildpackage -a alpha -uc -us
[ ... ]
dpkg-checkbuilddeps: error: Unmet build dependencies: isoquery
[ ... ]

There is no 'Multi-Arch:' field in the debian/control file
of isoquery : isoquery:amd64 installed doesn't meet
the build dependency requirements of choose-mirror for alpha.

* How to reproduce the bug ?

Please find the details below with a minimal setup on amd64 
targeting alpha.

I hope it will help !

Regards,
JH Chatenet

[1] : http://lists.debian.org/debian-boot/2019/01/msg00044.html



1/ create a sid chroot with debootstrap --variant=buildd
  and an user 'me' :

 debootstrap --variant=buildd sid mychroot
 export LANG=C
 mount -t proc proc mychroot/proc
 chroot mychroot
 mount -t sysfs sysfs sys
 mount -t devpts devpts dev/pts -o gid=5,mode=620
 apt-get update && apt-get upgrade
 adduser me 

2/ install the toolchain

  apt-get install gcc-alpha-linux-gnu
 
3/ install the build dependencies (amd64 part)

 apt-get --no-install-recommends install fakeroot
 apt-get --no-install-recommends install debhelper debhelper wget po-debconf locales iso-codes isoquery

4/ install the build dependencies (alpha part)

 apt-get install debian-ports-archive-keyring
 cat > /etc/apt/sources.list.d/alpha.list <<EOF
deb [ arch=alpha ] http://deb.debian.org/debian-ports unstable main
deb [ arch=alpha ] http://deb.debian.org/debian-ports unreleased main
EOF
 
 dpkg --add-architecture alpha
 apt-get update
 apt-get --no-install-recommends install libc6.1:alpha
 apt-get --no-install-recommends install libdebconfclient0-dev:alpha libdebian-installer4-dev:alpha

5/ cross-compile choose-mirror

 cat > /etc/apt/sources.list.d/source.list <<EOF
deb-src http://deb.debian.org/debian unstable main
EOF
 apt-get update
 chmod o+r /etc/apt/sources.list.d/source.list
 su - me

$  apt-get source choose-mirror
$  cd choose-mirror-2.96
$  dpkg-buildpackage -a alpha -uc -us
dpkg-buildpackage: info: source package choose-mirror
dpkg-buildpackage: info: source version 2.96
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Cyril Brulebois <kibi@debian.org>
dpkg-architecture: warning: specified GNU system type alpha-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
dpkg-buildpackage: info: host architecture alpha
 dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: isoquery
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

With the proposed patch applied :

$  dpkg-buildpackage -a alpha -uc -us
[ ... ]
dpkg-deb: building package 'choose-mirror' in 'debian/.debhelper/scratch-space/build-choose-mirror/choose-mirror_2.96_all.deb'.
dpkg-deb: building package 'choose-mirror-bin' in 'debian/.debhelper/scratch-space/build-choose-mirror-bin/choose-mirror-bin_2.96_alpha.deb'.
        Renaming choose-mirror_2.96_all.deb to choose-mirror_2.96_all.udeb
        Renaming choose-mirror-bin_2.96_alpha.deb to choose-mirror-bin_2.96_alpha.udeb
 dpkg-genbuildinfo
 dpkg-genchanges  >../choose-mirror_2.96_alpha.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .
dpkg-buildpackage: info: source-only upload: Debian-native package
$ echo $?
0


Reply to: