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

Re: DRAFT: Fixing the architecture query options of dpkg.



Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:

> > At all?? I think that dpkg-cross does a very reasonable job, and I've not
> > had to use any 'major hacks' to cross compile packages.
> 
> I am talking about the debian/rules files. There is currently no way to
> write a good debian/rules files for cross compilation.

It depends very much on the upstream source. Things which use GNU autoconf
are very easy, small standalone programs are easy, other programs which
build binaries to build other parts of the package need special support in
the upstream Makefiles.

Of the 29 packages I maintain, almost all of them should support dpkg-cross.
It really isn't that hard to write good debian/rules for cross compilation.

> I know dpkg-cross, and it does a good job to work around it. Remember it is
> a _hack_. It's a hack which works quite good, but it is limited due to
> "broken" debian/rules and upstream Makefiles.

I'd give it more credit than that, it is more elegant than a cheap hack.

> * dpkg-cross does only work, if the package in question does not generate
>   binaries to run on the build machine. Some examples:

Yes, but these all would need upstream work to them. It is not the job of
debian/rules to provide for all these cases.

> * No prgram I have seen runs "configure --target=something", they all run
>   "configure something", which is not what they mean.

Really?? I thought you had compiled binutils?? For autoconf this is made
much simpler, agreed. Configure scripts which don't support some kind of
--target flag need work upstream, it is nothing to do with debian/rules.

> * Some debian/rules have hard coded "linux" in' the GNU arch part, which
>   doesn't work on the Hurd.

Yes, and I know some of mine do too. This is why we are having this
discussion, to add support for determining the target OS. :)

> Note that I am experiencing more problems than you, because I build
> cross-architecture and cross-OS (!).

Yes, I realize this, and I like your proposal for dpkg-architecture.

One thing I don't like, you have been mentioning something like this:

dpkg-buildpackage -am68k -target=m68k-linux -B

Why is the same information specified twice, won't you get dpkg-architecture
to provide the GNU arch string?

> I would like to improve the situation. The amount of work I needed to put
> into cross compilation was too high, but it was worth it, if I can sent in
> patches and corrections, so people after me will have les problems.

I'd welcome any patches and corrections for my packages to support cross
compiling better.

Regards,

	Martin.


Reply to: