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

Re: Help for mipsel building environment



On Mon, 21 Jun 2010 23:21:11 +0200
marc zonzon <marc.zonzon@gmail.com> wrote:

> But trying again to compile sources from squeeze like nano that I used
> as test, my build again failed.

An xcontrol file exists for nano in Emdebian SVN as a patch:
http://www.emdebian.org/svn/browser/current/target/trunk/n/nano/trunk/emdebian-xcontrol.patch

That dates from Crush 1.0 and does need updating, but it gives some
idea of what is actually needed.

> I saw in the log that the cross dependencies were not generated.
> So I inspected your cross-deps-hooks, it looks only for dependencies
> in xcontrol, and these packages have only control no xcontrol. I
> suppose that all grip packages have xcontrol, but my test was not from
> grip.

xcontrol isn't something that you can reliably generate, sadly. There
are packages listed in Build-Depends which should not be made into
-cross packages - these are Build-Depends-Tools. Trying to install
these will cause dependency resolution failures in apt-cross as well as
putting unwanted files into the build chroot. You cannot determine
which packages go into which line merely from the package name -
autotools-dev is a Build-Depends-Tools, apt is a Build-Depends. Also,
whilst we still need to use apt-cross, xcontrol sometimes needs to help
apt-cross by specifying explicitly one or more of the dependencies of
listed packages which may get omitted due to Build-Depends-Conflicts
and other corner cases which confuse apt-cross.

The main reason to cross-build any Debian package now is to *change*
the builds, either by modifying the Build-Depends or adding patches to
remove functionality. Therefore, xcontrol needs to be under manual
editing control.

Grip packages don't contain xcontrol unless the original package
already has one in Debian (typically, packages with an xcontrol file
are maintained by someone who has a personal interest in cross-building
the package).

Automatically cross-building unchanged Debian packages simply does not
work. However, in most cases, the changes needed are limited to the
creation of an xcontrol file - but without automating that step.

> So I wrote a new script in shell+sed (I could have patched yours, but
> I'm quite perl challenged!) and it worked fine.

pbuilder is shell and this hook is only in perl because it was
originally written in perl for the previous build system.
 
> I give my hook below, even if it has probably to change, whenever I
> have time to test with more packages.

I'd recommend using this script *before* the build and ensuring that
you edit the file before you start.

I don't think it is useful to try to generate xcontrol metadata
entirely automatically. We need a different way of handling xcontrol
files so that Debian maintainers can include an xcontrol file into the
package.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgpeq5w6OQT7h.pgp
Description: PGP signature


Reply to: