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

Re: Long-term mass bug filing for crossbuild support

Neil Williams <codehelp@debian.org> writes:
> Russ Allbery <rra@debian.org> wrote:

>> This is a bad suggestion and was apparently made without referring to
>> the existing Debian instructions for how to handle packages that use
>> Autoconf and friends.

> Your assumption is wrong, I'm afraid. For one reason or another, I spend
> a lot of time in the autofoo documentation. Must be crazy, yes, yes....

Well, then I'm even more mystified as to why you contradicted those
instructions and told people not to pass --build to configure for
non-cross-compile builds.

>> Please see the autotools-dev instructions, which are more
>> detailed and which correctly recommend:
>> DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
>> DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
>>     SYSTEM = --build $(DEB_HOST_GNU_TYPE)
>> else
>>     SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
>> endif

> Actually, /usr/share/doc/autotools-dev/README.Debian.gz differs from
> that by specifying $(confflags) instead of SYSTEM and using 'export'.

Sorry, you're entirely correct, and I shouldn't paste from one of my
packages instead of from the actual documentation.  (And I should go add
export, as that was there for a reason.  Mea culpa.)

> I don't see what benefit arises from the only other difference, ?=
> instead of =. When cross-compiling, it isn't sensible to allow the value
> to be overridden elsewhere.  The value is set in the cross-compiling
> tools via dpkg-architecture and should be read into debian/rules as
> such.

Sometimes humans know better than tools, so I like to leave it open so
that humans can override if they need to.

> As noted elsewhere in this thread, --build can be specified alone but is
> usually only used for specialist builds for i686 on i386 etc. I fail to
> see the merit of proposing that packages add --build to the normal
> Debian build for no reason.

Do we really need to rehash this?  This has been discussed at some length
on debian-devel in the past.  There are a wide variety of reasons why
always being explicit about the build architecture is better, from
upstream brokenness to upstream defaults that differ from how Debian
handles architectures to getting the right canonical triplet encoded into
things.  The reason why these instructions are captured in autotools-dev
is so that we don't have to go over this again each time this comes up.

It's this problem that leads me to specifically call your instructions
bad, based on the previous discussions on debian-devel.  Depending on the
version of the Autotools involved and the architecture involved, following
your instructions rather than the instructions in autotools-dev may
violate Policy 4.3 and 11.1 by encoding the wrong architecture triplet.
The autotools-dev documentation points this out.

As near as I can tell, the autotools-dev instructions already handle the
cross-build requirements from the message at the start of this thread, and
they've already previously been hashed out and gotten some consensus.  I'd
rather just stick with recommending them to people rather than coming up
with a new and different recommendation and going through this again.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: