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

Re: dpkg in experimental



On Fri, 28 Sep 2007 16:54:25 +0200
"Hector Oron" <hector.oron@gmail.com> wrote:

> Hello,
> 
>   I'm looking at gcc-4.3 (on experimental) and trying to cross built
> it, but i get the following error, that maybe somebody could explain
> what is it.

Don't use the dpkg in experimental with dpkg-cross <<2.0.0. The two are
incompatible. Work is ongoing.
 
>   And why is dpkg-buildpackage failing?

Because the dpkg-dev in experimental has converted dpkg-buildpackage to
perl (which will make it easier to work with in cross-building) but the
dpkg-cross diversion is shell. When the diversion tries to call the new
perl script, it fails because it is expecting to call a shell script.
(Hence 'use' is seen as an unknown command because shell does not
understand the perl keyword 'use'). There is no point "fixing" the
diversion because it has already been removed in dpkg-cross 
1.99+2.0.0pre2 (dpkg-cross CVS).

> I experienced that same
> problem trying to build another package for experimental (it was
> *apt-cross* with dpkg-cross 1.99+2.0.0pre1 dependency) which did not
> work for me.

apt-cross ? Which version? Current trunk in SVN is 0.2.9, there is a
0.2.2 branch too. Current Debian unstable version is 0.2.0 and Emdebian
has 0.2.1. Depending on progress in dpkg, apt-cross 0.2.2 may not see
the light of day - indeed, I'm rather hoping that it doesn't because it
retains the existing bugs which are fixed in the NorthernCross code of 0.2.9.

dpkg from experimental will break ALL builds if you still have
dpkg-cross installed. Cross-builds won't find the right support and
native builds will be confused by the diversion. Installing dpkg-cross
1.99+2.0.0pre2 from CVS will remove the diversion and all will be well
for native builds at least. Cross-builds will almost certainly fail.

To use apt-cross 0.2.9 and emdebian-tools 0.3.9 from SVN, you'll need
dpkg-cross 1.99+2.0.0pre2 from CVS and a patched dpkg-dev from
*unstable*:

ii  apt-cross                 0.2.9  
ii  dpkg-dev                  1.14.6.1
ii  emdebian-tools            0.3.9 

These are the versions I am using on amd64.

On powerpc and i386, I'm using
apt-cross 0.2.2 (might be uploaded to Emdebian but currently a branch in SVN)
emdebian-tools 0.3.1 (ditto - not ready quite yet.)
dpkg-cross 1.39
dpkg-dev 1.14.6

Current repository versions for unstable are:
apt-cross 0.2.1
emdebian-tools 0.3.0
dpkg-cross 1.39
dpkg-dev 1.14.6

I recommend the current repository versions for unstable.

The code to cross-build with dpkg-dev 1.14.7 from experimental has not
been written yet - it will be internal to dpkg-dev (as far as
dpkg-buildpackage is concerned).

So a summary:
1. There is no cross-building support available for the experimental
dpkg-dev 1.14.7 yet. When it is done, it will be internal to dpkg.
2. The current repository versions of apt-cross, dpkg-cross, dpkg-dev
and emdebian-tools for unstable *work*. My advice is to stick with
those and don't use the experimental dpkg.
3. There are pending releases of apt-cross and emdebian-tools to fix
interim bugs but these may not be needed, it depends on work within
dpkg.
4. When dpkg supports dpkg-cross 1.99+2.0.0pre2, dpkg-cross pre2 and
apt-cross 0.2.9 and emdebian-tools 0.3.9 will be uploaded - locations
to be decided depending on results of dpkg changes. If those check out,
dpkg-cross 2.0.0, apt-cross 0.3.0 and emdebian-tools 0.4.0 will be
uploaded to Debian unstable, dependent on dpkg-dev >= 1.14.8 (probably).
5. The SVN versions of apt-cross and emdebian-tools work with the CVS
version of dpkg-cross 1.99+2.0.0pre2 as long as the patches from
#439979 are applied to the *shell* version of dpkg-buildpackage. (You
need the second set of patches from that bug report, [0].
6. To restore native build functionality and still use dpkg from
experimental, build dpkg-cross 1.99+2.0.0pre2 from dpkg-cross CVS to
remove the cross-building diversion. Cross builds will break but native
builds will proceed.
7. If you want to build gcc-4.3, remove all experimental / CVS/SVN
packages, specify 'experimental' only as a deb-src and do it using the
current versions in unstable.

[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439979#10

The moral of this story is: be careful how you use Debian experimental
- it really can break things quite spectacularly.
;-)

Downgrading should be painless. (If you get problems, let me know
because that would be a bug.)

The dpkg team are hoping to complete the cross-building support in
dpkg-dev 1.14.8 in the next few days (Guillem has been ill recently) at
which point the new NorthernCross-derived code will uploaded, as
described.

I haven't covered this before because I didn't expect anyone to try it.
Everything works if you stick to unstable and that is how I've planned
the entire transition.

-- 


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

Attachment: pgpsQjSLkjspe.pgp
Description: PGP signature


Reply to: