GNU bug report logs - #33711
configure --host=aarch64 produces x86-64 binary

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: autoconf; Reported by: Erik van Velzen <erik@HIDDEN>; Owned by: bug-autoconf@HIDDEN; dated Tue, 11 Dec 2018 21:12:01 UTC; Maintainer for autoconf is (unknown).
Owner recorded as bug-autoconf@HIDDEN Request was from Mike Frysinger <vapier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package 'automake' to 'autoconf'. Request was from Mike Frysinger <vapier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 33711 <at> debbugs.gnu.org:


Received: (at 33711) by debbugs.gnu.org; 9 Dec 2021 11:52:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 09 06:52:20 2021
Received: from localhost ([127.0.0.1]:42612 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mvHyE-0004Ih-5L
	for submit <at> debbugs.gnu.org; Thu, 09 Dec 2021 06:52:20 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:50308
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vapier@HIDDEN>) id 1mvHy9-0004IO-Rr
 for 33711 <at> debbugs.gnu.org; Thu, 09 Dec 2021 06:52:16 -0500
Received: by smtp.gentoo.org (Postfix, from userid 559)
 id C3A3F3433F8; Thu,  9 Dec 2021 11:52:07 +0000 (UTC)
Date: Thu, 9 Dec 2021 06:52:13 -0500
From: Mike Frysinger <vapier@HIDDEN>
To: Erik van Velzen <erik@HIDDEN>
Subject: Re: bug#33711: configure --host=aarch64 produces x86-64 binary
Message-ID: <YbHt7YlXrbEdklhA@vapier>
Mail-Followup-To: Erik van Velzen <erik@HIDDEN>, 33711 <at> debbugs.gnu.org
References: <CAFEDrMOZHUY4vrWzHEd6YLS5TzEKrKSCS9AX6wVLFtGj5GSsjg@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="OXB1RmoK9/oq+72c"
Content-Disposition: inline
In-Reply-To: <CAFEDrMOZHUY4vrWzHEd6YLS5TzEKrKSCS9AX6wVLFtGj5GSsjg@HIDDEN>
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33711
Cc: 33711 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)


--OXB1RmoK9/oq+72c
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

reassign 33711 autoconf
thanks

On 11 Dec 2018 22:07, Erik van Velzen wrote:
> I compiled https://github.com/json-c/json-c using the command `sh
> autogen.sh && ./configure --host=3Daarch64 && make`. Unexpectedly this
> creates an x64 binary.
>=20
> The correct argument in my case is --host=3Daarch64-linux-gnu
>=20
> I think this should be an error. Currently, there is only the output
> "checking for aarch64-gcc... no" but this does not abort. So the error
> is postponed until the binary is actually used.

compiler lookup is an autoconf macro (AC_PROG_CC).  automake isn't involved.
reassigning to the autoconf project for consideration.

care must be taken to not break the non-cross-compiling case, but that prob=
ably
might mean that trying to improve the UX without breaking existing valid fl=
ows
is impossible without being extremely fragile.  so as much as it sucks, thi=
s is
probably a "sigh, that's just the way it is" situation.

consider a multilib system:
* default ABI is x86_64 (64-bit) but x86 (32-bit) also works
* `gcc` supports both depending on compiler flags
* `./onfigure` will produce 64-bit binaries
* `./onfigure --host=3Dx86_64` will produce 64-bit binaries, but there is no
  `x86_64-gcc` (if any exist, it'd be more like `x86_64-pc-linux-gcc`)
* `./configure --host=3Di686 CFLAGS=3D'-m32'` will produce 32-bit binaries,=
 but
  there is no `i686-gcc`

> If I give --host=3Dgibberish I do get an error as expected:
>=20
> "checking host system type... Invalid configuration `gibberish':
> machine `gibberish' not recognized"

this is coming from the config project [1].  it is responsible for parsing
the specified tuple to see if it resembles something reasonable.  giving it
gibberish is not reasonable, so it aborts.  but a bare cpu name like you
showed at the top is valid syntax.  it just doesn't expand the way you're
expecting.

[1] https://savannah.gnu.org/projects/config/
-mike

--OXB1RmoK9/oq+72c
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGx7e0ACgkQQWM7n+g3
9YEEsQ/+IPeS4OviMB1bhDz1OA7fU7+zdBH9yB4pQN+HHIn4E8n9DtH20wrRdaLk
SmtJ2eqyhJjoQHrb4LMpYddL8ckaFwe9shPcPbZHAFllkDC67sE0ffVm0aLGYD71
sVy3MPW/mLbJLs8v+a55sEttklMEMvK1Pz1wRHu8ysSn/BXZ2mOieTRiu1sC7RH/
nN8a49cO2tq/FQ7fUbr5P8Tea5tg6+KMIdzr63Jb0WZHL8+42DbGB6Hp9K9Lp+mE
OxPiwYWtEU4uuCtHTTI6q+E9meI/UA0BGbSGNlNLfN3wIfdUiPmivcLAV65hVfo3
k1B4psV57T1I6uwxdVXunC+JeThysGNaO7h67eh6dewUed+sCgiNWhnuFU4Y1U7V
R2KrP6AW68NKLvX/PZ4g9BqiEsYOzH10ZvW5nqN3+By7IzD84h3zXhtRkQdyV12C
PAoY7Iz9IoJM8i7261gjz8IjRM/14M/5Wm+TqBYQ3elD2bqXXEuffkxmTSi0sNaO
kOl177E+02XRDs+2zXcouHFuiOUFSZ+UF8FHRIRAVWZ+8sdh5pX+BfOB/nr++fb+
fn/qgB06druFJKWhEk4P7NjJTt6GhakRXH4woOTTOM9gbOkVeFEFPoJFy1UZcP7I
siJVeqm2g5W6QbGvd0Ee29xeLeyGKiIhWvYpkBRN7zTAWn4+akg=
=q8QW
-----END PGP SIGNATURE-----

--OXB1RmoK9/oq+72c--




Information forwarded to bug-automake@HIDDEN:
bug#33711; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Dec 2018 21:11:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 11 16:11:02 2018
Received: from localhost ([127.0.0.1]:44246 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWpJ0-0000Q9-1P
	for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 16:11:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33947)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <erik@HIDDEN>) id 1gWpGl-0000IO-3v
 for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 16:08:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <erik@HIDDEN>) id 1gWpGe-0004VO-5U
 for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 16:08:38 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49983)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <erik@HIDDEN>) id 1gWpGc-0004Up-4H
 for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 16:08:34 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43490)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <erik@HIDDEN>) id 1gWpGZ-0003mK-VT
 for bug-automake@HIDDEN; Tue, 11 Dec 2018 16:08:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <erik@HIDDEN>) id 1gWpGU-0004RJ-MU
 for bug-automake@HIDDEN; Tue, 11 Dec 2018 16:08:28 -0500
Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:53750)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <erik@HIDDEN>) id 1gWpGT-0004PF-Kz
 for bug-automake@HIDDEN; Tue, 11 Dec 2018 16:08:26 -0500
Received: by mail-wm1-x332.google.com with SMTP id y1so3665219wmi.3
 for <bug-automake@HIDDEN>; Tue, 11 Dec 2018 13:08:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=evanv-nl.20150623.gappssmtp.com; s=20150623;
 h=mime-version:from:date:message-id:subject:to;
 bh=4f/koryhQ0WtzrY81mM+K4rKu883ZypzgXYzp5emG/c=;
 b=ARDb1qsyz7FtCcMUgSdmtqvZs1OISoXJym8lgHyGUDe79kRp0BsexCAxbUWmuVUQ33
 A/n8Z3p40aKSPq4Fy5ESP6Ezv8m9ETmXYSKOmUihmjzfBB2r6iDsbsQfCCKO1NCQSpNH
 LZL/bgD3ff/H50i7NFSpVxFiWc+25078ONJjH0R7lzUOHeGeVTSwCdx4wONhw+3qX4dy
 2Ho3JPCBTMnCdsbolo/aXHdagYmfiqPC7mCCrkqISZNuMtShrzHyCXNWoJG+BmhyCAX+
 V104E8ZNrP2z+Di/Q2RClHjyiHVbAQreObr1vnaYU/gqxdN57Mu1e4ysFg2MDVE/gBuP
 Be1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=4f/koryhQ0WtzrY81mM+K4rKu883ZypzgXYzp5emG/c=;
 b=gs3wpodxmyJeZs9NgSNBjePoNF2Vaj13kKwyD7U4gjYlODm7XXKYfpE1axEY2UTbSd
 WFgNeoQmue1elDB4I/TV9eWaUWP9jvur5KpPAY3KS8X6xcvZOknxYrBdu/j0fc9OR8D1
 QN6EVtbCuIjHLNVQwQS7EA332tUsT8Uv8Gj4sZkIfv5rTD/G7C77oljlGi17t8bNHtPE
 CwNnRTOg/ZfAoEXDs6YDvc2Nd90vQc8w8q9nBtR549z4nf5vEYlPtdN/k0Q04OC5BwAb
 q2HYXPPElUtD4JuAJu+0NW9KUqq1DPVelobKu+J6mE+fTSP8AEbSeD7tKiITFksDtPaF
 fPlg==
X-Gm-Message-State: AA+aEWZIj8zr/DlxdweoOAUuosZjDFdZYWIx25SvjJurGvSO+3QTCXjK
 yRjXx5YuWBqvx0OCNsDRxVC+q5seveEjXOBBmxGUKbVYWlM=
X-Google-Smtp-Source: AFSGD/XtG5Jm/UtQ7er+O/zD+5YX+JUtEpW7LndknCvXRTYx36DrwYzRKhA7GmU01xM7u3ERVqV5n3jWOmwb1GfOae4=
X-Received: by 2002:a7b:c095:: with SMTP id r21mr3949086wmh.118.1544562499315; 
 Tue, 11 Dec 2018 13:08:19 -0800 (PST)
MIME-Version: 1.0
From: Erik van Velzen <erik@HIDDEN>
Date: Tue, 11 Dec 2018 22:07:00 +0100
Message-ID: <CAFEDrMOZHUY4vrWzHEd6YLS5TzEKrKSCS9AX6wVLFtGj5GSsjg@HIDDEN>
Subject: configure --host=aarch64 produces x86-64 binary
To: bug-automake@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 11 Dec 2018 16:11:01 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

I compiled https://github.com/json-c/json-c using the command `sh
autogen.sh && ./configure --host=aarch64 && make`. Unexpectedly this
creates an x64 binary.

The correct argument in my case is --host=aarch64-linux-gnu

I think this should be an error. Currently, there is only the output
"checking for aarch64-gcc... no" but this does not abort. So the error
is postponed until the binary is actually used.

If I give --host=gibberish I do get an error as expected:

"checking host system type... Invalid configuration `gibberish':
machine `gibberish' not recognized"

Thanks for your work GNU people,

Erik van Velzen




Acknowledgement sent to Erik van Velzen <erik@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#33711; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 9 Dec 2021 18:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.