From unknown Sat Jun 14 05:28:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48088: libtool hardcodes native (cross-)compiler, incorrect when using libtool as cross-compiler Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 Apr 2021 22:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48088 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 48088@debbugs.gnu.org Cc: libtool@gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161964743724250 (code B ref -1); Wed, 28 Apr 2021 22:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Apr 2021 22:03:57 +0000 Received: from localhost ([127.0.0.1]:54298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbsHk-0006J4-Np for submit@debbugs.gnu.org; Wed, 28 Apr 2021 18:03:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:37772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbsHh-0006Iv-N0 for submit@debbugs.gnu.org; Wed, 28 Apr 2021 18:03:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbsHh-0005lc-H9 for bug-guix@gnu.org; Wed, 28 Apr 2021 18:03:53 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:36236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbsHe-00076G-9f for bug-guix@gnu.org; Wed, 28 Apr 2021 18:03:53 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id yN3m240040mfAB406N3mnT; Thu, 29 Apr 2021 00:03:46 +0200 Message-ID: From: Maxime Devos Date: Thu, 29 Apr 2021 00:03:33 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-bqsbxLIQVyHb6S0hzwy5" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1619647426; bh=VJ9GsapFArO494hcz+PNd8uIyOv0OikmxBOzkKrNgoA=; h=Subject:From:To:Cc:Date; b=mBAu0mDKSZLCw8ZUWO6ktRjRpy3m96LbF1XpgBkCT9N6wtEHPusbD+wr94dY3gIDK gIN/a4VGGXIhitKjgGDP1wg5c+WiE2qR1NPHgdVPKvodKp5peBJ+8HeiLr71RqFlJo 4ZGo9RyQEHki/oltmZ5OmqqKUcZP1Q7NNk83d8baSu+a7HDd1PGaTPmZBFTpdG4tu6 lSlI6u3cKX2kzIgbsoO74xB6tM4U9BWWg4YHa1EfVfuQ5pXFYUWmo1EKY9v3gaORLU vuSSYx07R0nxllqqBEvgpory5sKzqlLxrF8YH8ym/3XhHrWvrFvBlXz/ZM6Df99Aby KyWBwoIoPWXUQ== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) 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: -2.3 (--) --=-bqsbxLIQVyHb6S0hzwy5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, [CC'ing to libtool mailing list, maybe they can shed some light on the matt= er of how libtool can be used as a cross-compiler. This concerns the definiti= on of the libtool package in guix.] $ cat $(guix build libtool)/bin/libtool Some relevant output: > # A C compiler. > LTCC=3D"gcc" > # Compile-time system search path for libraries. > sys_lib_search_path_spec=3D"/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-p= erl-5.30.2/lib /gnu/store/i5a9qb07y9xjh9ry8hp6km43kji16nmd-libltdl-2.4.6/li= b /gnu/store/i8h2pcxqdq07ijm3ibkka8f4smn1w48v-bzip2- 1.0.8/lib /gnu/store/9860f1abqj8wjjnwl8a9v54pdcc3bhgf-xz-5.2.4/lib /gnu/sto= re/60g7r3l01fd7c58yjbm6krgcwj1jkpwg-file-5.38/lib /gnu/store/swqdvwri9dbv6z= ssg6v0by7l05hd6wxp-gawk-5.0.1/lib /gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34/lib /gnu/store/fa= 6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib /gnu/store/s3dcqzwqaakv1yx37b= y9chksdbkgih17-glibc-2.31-static/lib /gnu/store/hwcky7446s952w0mwchhmm211ll07zrq-glibc-utf8-locales-2.31/lib /gn= u/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unkno= wn-linux-gnu/7.5.0 /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib " Usually, libtool uses the compiler it was passed. However, during linking, (at least during the compilation of libtomsmath II= RC), libtool uses LTCC instead. Thus, when a package X has libtool in native-in= puts, and it is being cross-compiled, it should really use a variant of libtool t= hat has been configured to set LTCC=3DTARGET-gcc (or LTCC=3DTARGET-clang). There do not seem to exist any such variants currently. (For a relatively = clean method for automatically using a cross-compiling variant, see the "pkg-conf= ig" macro.) Thus, I thought it would =E2=80=98simply=E2=80=99 be a matter of pa= ssing an appropriate "--target=3DTARGET" option to libtool's configure script when libtool is be= ing used as cross-compiler. But alas, libtool configure only supports --build and -= -host, no --target in sight! Any ideas? Maxime. --=-bqsbxLIQVyHb6S0hzwy5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYInbtRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vZeAQCGtyJdyUTwNktd8k1Ac6KrNlAA T3rqzbc6WwUYHTNC1QD9EQ6twfYyfl1s8VPhthGN3/ZrFEHqNnwAnZ0oTcINdwU= =GdcH -----END PGP SIGNATURE----- --=-bqsbxLIQVyHb6S0hzwy5-- From unknown Sat Jun 14 05:28:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48088: libtool hardcodes native (cross-)compiler, incorrect when using libtool as cross-compiler Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 29 Apr 2021 11:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48088 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Cc: 48088@debbugs.gnu.org, libtool@gnu.org Received: via spool by 48088-submit@debbugs.gnu.org id=B48088.161969716616744 (code B ref 48088); Thu, 29 Apr 2021 11:53:01 +0000 Received: (at 48088) by debbugs.gnu.org; 29 Apr 2021 11:52:46 +0000 Received: from localhost ([127.0.0.1]:54983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc5Dq-0004M0-FA for submit@debbugs.gnu.org; Thu, 29 Apr 2021 07:52:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc5Dm-0004Ll-W4 for 48088@debbugs.gnu.org; Thu, 29 Apr 2021 07:52:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40539) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc5Dg-0000bS-S7; Thu, 29 Apr 2021 07:52:36 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33474 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lc5Dg-00046A-9X; Thu, 29 Apr 2021 07:52:36 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Thu, 29 Apr 2021 13:52:34 +0200 In-Reply-To: (Maxime Devos's message of "Thu, 29 Apr 2021 00:03:33 +0200") Message-ID: <87o8dxl33x.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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: -3.3 (---) Hi Maxime, Maxime Devos skribis: > $ cat $(guix build libtool)/bin/libtool > Some relevant output: [...] > However, during linking, (at least during the compilation of libtomsmath = IIRC), > libtool uses LTCC instead. Thus, when a package X has libtool in native-= inputs, The =E2=80=98libtool=E2=80=99 script provided by the =E2=80=98libtool=E2=80= =99 package is usually unused. The modus operandi for Libtool is that packages generate their own =E2=80=98libtool=E2=80=99 script at configure time, tailored for the gi= ven configuration options, based on a template installed by =E2=80=98libtoolize= =E2=80=99 (itself invoked by =E2=80=98autoreconf=E2=80=99). Perhaps the =E2=80=98libtomsmath=E2=80=99 package is doing something unusua= l? HTH, Ludo=E2=80=99. From unknown Sat Jun 14 05:28:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48088: libtool hardcodes native (cross-)compiler, incorrect when using libtool as cross-compiler Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 29 Apr 2021 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48088 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 48088@debbugs.gnu.org, libtool@gnu.org Received: via spool by 48088-submit@debbugs.gnu.org id=B48088.161971677024361 (code B ref 48088); Thu, 29 Apr 2021 17:20:02 +0000 Received: (at 48088) by debbugs.gnu.org; 29 Apr 2021 17:19:30 +0000 Received: from localhost ([127.0.0.1]:56741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcAJy-0006Km-MM for submit@debbugs.gnu.org; Thu, 29 Apr 2021 13:19:29 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:43100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcAJu-0006KZ-6A for 48088@debbugs.gnu.org; Thu, 29 Apr 2021 13:19:25 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by xavier.telenet-ops.be with bizsmtp id yhKL240050mfAB401hKL3e; Thu, 29 Apr 2021 19:19:20 +0200 Message-ID: <0bcb6ff1fc169172a0ad85851948874fd97cafae.camel@telenet.be> From: Maxime Devos Date: Thu, 29 Apr 2021 19:18:56 +0200 In-Reply-To: <87o8dxl33x.fsf@gnu.org> References: <87o8dxl33x.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-AM1fw17ZCmSWcU2s7slU" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1619716760; bh=Y2IErkxjtSZhv450SoGEb1tuOqVNS8+FKRtvA2umw7M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=OVD6bgNgamCZ1PM35sZw4ezUSO6WXnd+VYEEwnyA8VAN3kcJnrSfe3D/a9QV7LRUD 96xkB+oNPXrxqGA0vK3I0P3V89L4ftCb4lc5q7ZvgmLO0uSBnB28Mhgt11Puvgoo/b pgWmeLkdhivZ61hxYR/1ZUK9C2zHTyZj68n1/W1Bz67M6B7mAChc/hy9oULFaiaVkX pGSKRJPyKl/u2xuzl/inPe78JyTXT5R3Bt8nQe/T03SiSBTul948+wbpfXUsVjEP0U dCC6snTG78yG3ORIOG9AwmxpeRLvEht1rqN9XK3rWRnOJW9vPwjxXp4xLWGsneUkrB Pn8gBaOApUa4w== X-Spam-Score: -0.7 (/) 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: -1.7 (-) --=-AM1fw17ZCmSWcU2s7slU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Severity: minor Hi Ludo, Ludovic Court=C3=A8s schreef op do 29-04-2021 om 13:52 [+0200]: > [...] > The =E2=80=98libtool=E2=80=99 script provided by the =E2=80=98libtool=E2= =80=99 package is usually > unused. The modus operandi for Libtool is that packages generate their > own =E2=80=98libtool=E2=80=99 script at configure time, tailored for the = given > configuration options, based on a template installed by =E2=80=98libtooli= ze=E2=80=99 > (itself invoked by =E2=80=98autoreconf=E2=80=99). >=20 > Perhaps the =E2=80=98libtomsmath=E2=80=99 package is doing something unus= ual? Yes, it does not have a configure script, and invokes "libtool" directly fr= om the makefile. It seems like =E2=80=98we=E2=80=99 will have to patch libtom= smath appropriately. I might eventually look into the issue, but probably not in the near future= . Let's stop CC'ing libtool@gnu.org; this issue isn't really a bug in libtool= . Greetings, Maxime. --=-AM1fw17ZCmSWcU2s7slU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIrqgBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7msUAQDD/YlF55a++VTJEZObiWZepvFR YcN7K1C3jkw8rw+NmAD/Yj4vhORhppPzAT/i7PfIBWem9eDYNrbz/j+v3uUyOQg= =m45U -----END PGP SIGNATURE----- --=-AM1fw17ZCmSWcU2s7slU--