From unknown Tue Jun 17 22:28:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33711: configure --host=aarch64 produces x86-64 binary Resent-From: Erik van Velzen Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 11 Dec 2018 21:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33711 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 33711@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15445626621630 (code B ref -1); Tue, 11 Dec 2018 21:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Dec 2018 21:11:02 +0000 Received: from localhost ([127.0.0.1]:44246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWpJ0-0000Q9-1P for submit@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 ) id 1gWpGl-0000IO-3v for submit@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 ) id 1gWpGe-0004VO-5U for submit@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 ) id 1gWpGc-0004Up-4H for submit@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 ) id 1gWpGZ-0003mK-VT for bug-automake@gnu.org; Tue, 11 Dec 2018 16:08:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWpGU-0004RJ-MU for bug-automake@gnu.org; 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 ) id 1gWpGT-0004PF-Kz for bug-automake@gnu.org; Tue, 11 Dec 2018 16:08:26 -0500 Received: by mail-wm1-x332.google.com with SMTP id y1so3665219wmi.3 for ; 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 Date: Tue, 11 Dec 2018 22:07:00 +0100 Message-ID: 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-Mailman-Approved-At: Tue, 11 Dec 2018 16:11:01 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From unknown Tue Jun 17 22:28:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33711: configure --host=aarch64 produces x86-64 binary Resent-From: Mike Frysinger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Thu, 09 Dec 2021 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33711 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Erik van Velzen Cc: 33711@debbugs.gnu.org Received: via spool by 33711-submit@debbugs.gnu.org id=B33711.163905074016543 (code B ref 33711); Thu, 09 Dec 2021 11:53:02 +0000 Received: (at 33711) by debbugs.gnu.org; 9 Dec 2021 11:52:20 +0000 Received: from localhost ([127.0.0.1]:42612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvHyE-0004Ih-5L for submit@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 ) id 1mvHy9-0004IO-Rr for 33711@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 Message-ID: Mail-Followup-To: Erik van Velzen , 33711@debbugs.gnu.org References: 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: X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 09 06:56:20 2021 Received: (at control) by debbugs.gnu.org; 9 Dec 2021 11:56:20 +0000 Received: from localhost ([127.0.0.1]:42616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvI28-0004Or-Et for submit@debbugs.gnu.org; Thu, 09 Dec 2021 06:56:20 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:51002 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvI26-0004Od-9i for control@debbugs.gnu.org; Thu, 09 Dec 2021 06:56:18 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id B7507342BD9; Thu, 9 Dec 2021 11:56:12 +0000 (UTC) Date: Thu, 9 Dec 2021 06:56:18 -0500 From: Mike Frysinger To: control@debbugs.gnu.org Message-ID: Mail-Followup-To: control@debbugs.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) reassign 33711 autoconf stop From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 09 12:57:34 2021 Received: (at control) by debbugs.gnu.org; 9 Dec 2021 17:57:34 +0000 Received: from localhost ([127.0.0.1]:44724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvNfi-0003w3-Eh for submit@debbugs.gnu.org; Thu, 09 Dec 2021 12:57:34 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:36632 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvNff-0003vo-V5 for control@debbugs.gnu.org; Thu, 09 Dec 2021 12:57:32 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id 0EC60342C5E; Thu, 9 Dec 2021 17:57:00 +0000 (UTC) Date: Thu, 9 Dec 2021 12:57:06 -0500 From: Mike Frysinger To: control@debbugs.gnu.org Message-ID: Mail-Followup-To: control@debbugs.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) owner 33711 bug-autoconf@gnu.org stop