Re: cross-compiling Debian packages
On Sat, Mar 11, 2006 at 10:56:35PM +0300, Nikita V. Youshchenko wrote:
> > >
> > >You may look at dpkg-cross ...
> >
> > I did, and I'm using it, thanks:-)
> >
> > What is the deal BTW with that new rewrite_dependencies (as of 1.26)
> > producing bogus names with
> > -dcv1 suffix? I had to comment 2 lines out of dpkg-cross script to make
> > it work for libgpm for instance...
>
> It's versioning logic. Older dpkg-cross used to have other default paths,
> so something should be done to avoid packages created by older dpkg-cross
> to satisfy dependences of packages created by newer dpkg-cross.
>
> Do you mean it works incorrectly in some cases? If so, I'm interested in
> details ...
Well, I have not had the time to track this deeper, but this is the
behaviour I've observed:
Given a package (e.g., gpm slightly modified mice.c) with this info:
---
$ dpkg -I binary-arm/libgpmg1_1.19.6-22.my_arm.deb
new debian package, version 2.0.
size 51360 bytes: control archive= 837 bytes.
500 bytes, 15 lines control
273 bytes, 4 lines md5sums
135 bytes, 7 lines * postinst #!/bin/sh
132 bytes, 7 lines * postrm #!/bin/sh
32 bytes, 1 lines shlibs
Package: libgpmg1
Version: 1.19.6-22.my
Section: libs
Priority: standard
Architecture: arm
Depends: libc6 (>= 2.3.5-1), libgcc1 (>= 1:4.0.2)
Suggests: gpm
Conflicts: libgpm1 (<< 1.12-3)
Installed-Size: 108
Maintainer: Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>
Source: gpm
Description: General Purpose Mouse - shared library
This package provides a library that handles mouse requests
and delivers them to applications. See the description for the 'gpm'
package for more information.
---
and this dpkg-cross 1.26:
---
$ dpkg-cross -aarm -b binary-arm/libgpmg1_1.19.6-22.my_arm.deb
$ dpkg -I libgpmg1-arm-cross_1.19.6-22.my_all.deb
new debian package, version 2.0.
size 11594 bytes: control archive= 674 bytes.
654 bytes, 16 lines control
147 bytes, 2 lines md5sums
32 bytes, 1 lines shlibs
Package: libgpmg1-arm-cross
Version: 1.19.6-22.my
Section: devel
Priority: extra
Architecture: all
Maintainer: Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>
Source: gpm
Depends: libc6-arm-cross (>= 2.3.5-1), libc6-arm-dcv1, libgcc1-arm-cross (>= 1:4.0.2), libgcc1-arm-dcv1
Conflicts: libgpm1-arm-cross (<< 1.12-3)
Provides: libgpmg1-arm-dcv1
Description: General Purpose Mouse - shared library (for cross-compiling)
This package was generated by dpkg-cross for cross compiling.
.
This package provides a library that handles mouse requests
and delivers them to applications. See the description for the 'gpm'
package for more information.
----
As you see, I get depends with -dcv1 suffix as well as -cross suffix.
I suspect the following line in dpkg-cross:
my $tmp = $alt; $tmp =~ s/^([^ (]+)/$1-$arch-cross/; push @l, $tmp;
The need for versioning does not justify IMHO the uglyness of
-dcv1 when compared to -cross. And it just "feels" wrong, since it is
not the type or instances of the files in the package that changed,
but the "packaging" of these files... Why couldn't you solve that
with version strings?
>
> > Also, would you welcome patches that add the ability to handle packages
> > built with alternative libc
> > implementations, namely uClibc, Dietlibc and Newlib?
>
> Your patches are welcome.
>
> I thought that best way to handle other libc's is introducing other
> 'architectures', like i386-uclibc. Then tools could just cross-compile for
> this 'architecture'.
Yes, that's what I did. Please look into 'patches' at
http://www.xs4all.nl/~kurzanov/debian/. I had to patch dpkg, as well
as dpkg-cross to make it all work.
>
> Nikita
Пётр Курзанов.
Reply to: