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

Re: Emdebian native build



On Tue, 17 Jul 2007 02:43:37 +0100
Wookey <wookey@aleph1.co.uk> wrote:

> I did a bit of this a while back - I wrote a script to run emsource on the
> 100-odd packages in a debootstrap base and then build them all to see
> how many worked. But then I ran out of space on that box, so I'm not
> sure what proprtion worked. Lots more than would cross-build,
> certainly. 

Once the package has patches in Emdebian SVN - i.e. once it has
cross-built, it will build natively. The difficulty is that some
packages need manual editing of debian/rules after running em_make
because the build uses 'cp -pr' or 'mv' instead of 'dh_foo' and it is
impossible for em_make to know if the manual commands should be dropped
or retained. In such packages, removing the relevant dh_foo can cause
the build to fail because a manual 'cp' command expects a file to be in
a particular place or expects a directory to exist etc. This is no
different to any other rebuild operation but it does mean that packages
that do not yet have Emdebian patches cannot be automatically rebuilt
in bulk, along Emdebian lines, just using a simple script. By all means,
file wishlist bugs against those packages if you feel that a proper
debhelper call can replace the manual commands in the normal Debian
build.

> >  The first open issue is the compiler packages, emsetup looks for
> > "native-cross" compiler and I believe there are more issues as
> > dpkg-cross, apt-cross, ...
> 
> You don't _have_ to run emsetup, but yes it could be made easier to do
> native builds. 

Is there actually anything for emsetup to do if the supplied arch is
the same as the actual arch?

There is no need to check the toolchain - the dependencies of
emdebian-tools ensure that a native compiler is available - and there
are no toolchain packages to get from Emdebian.

The only thing emsetup can do, AFAICT, is say "Nothing for me here".

I'm not sure what issues arise with dpkg-cross or apt-cross - more
information on those please.

>From my perspective:

1. I can tweak emsetup to output a message, no problem, but I don't see
that there is anything else it can usefully do.

2. 'emsource' is useful in such builds in that it will patch the
package to make a smaller native build. Any arch-specific effects of
the patches will be ignored by dpkg-buildpackage.

3. emdebuild and empdebuild are relatively simple cross-compiler aware
wrappers around debuild and pdebuild. Just use debuild and pdebuild
as normal, the dpkg-cross diversions will take care of the rest. If
really necessary, I can add a warning to emdebuild and empdebuild to
the effect that "Don't use this if BUILD==HOST, just use foo as normal".

4. If there are problems using emsource, let me know or provide a
patch. Ta.

5. If script patches also include patches to the XML to update the
content of the manpages it would be appreciated.

6. apt-cross should not normally be used in a native build - I can see
no reason to have libfoo-dev and libfoo-BUILDARCH-cross. There is no
need to use a cross-compiler when doing an Emdebian native build and
therefore there is (AFAICT) no need to have cross-built dependencies
installed.

-- 


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

Attachment: pgpbztMvDbKcM.pgp
Description: PGP signature


Reply to: