From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cIOqNFKatWV6JAAAqHPOHw:P1 (envelope-from ) for ; Sun, 28 Jan 2024 01:05:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cIOqNFKatWV6JAAAqHPOHw (envelope-from ) for ; Sun, 28 Jan 2024 01:05:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=riseup.net header.s=squak header.b=H9jAbD1N; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706400338; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fH4lIpT84sP9WARymEm7Q3KIdaZebQcM14KbkZLoMUQ=; b=uknBQNlYBu4vDxPjEe7XydUbggtjWAKoZq2UiLcWCCBwq/Yrap0xpNVssPfBc/cUjVI0PS aKb8X2cejLUoJhVa5P85ccDKX9Vm7DQhIoTK5fnYNBiO8ut7X1jvI+i2iW/ftefhGyJW1C zu4PsOUc61N4fuHtySBlOaUcVEWJuZkLXDpo05/nTttPIxONcYDpsVXUEH0uC2gpBDuZlR FsZeHq3Yc5eZrEEj0OYINQd0i+za03C/4/Q0Xh5SjY7o+NETyVGUvtzIttMxHwkK67FMPS ceC6fRJdbfNc+lpLqcDcZza1pR3/jn974usoTw/zbAWwrwYzINljIUxKRcRiSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=riseup.net header.s=squak header.b=H9jAbD1N; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706400338; a=rsa-sha256; cv=none; b=p1ApnsU1dULkW+KZ+vtPKO2U7CWtOgjgdcVkh5/dHED/WfyIxVBQzcWq+qkycqSrEh72OU uCktWoPwb/MaAT6ZruM+H8EkBB8pmj1ZeggfRqM8UdSWaPfGmY3RGcpPTuTVZB+lIDxAy4 7EBkp9PxAo5/YygjfGbihxdvpUCaHmziHEPLvefzwKqvVT1xAEvI3NQ+hUl+uC+7nPvxfN FmxAiJa/olTxVkS12vscEgyfqGcMduemRVqcpwAmWy9khOqlJnbpp/EANdf81CsXnDnP1h 6eFmvTNk8Q62f6RdWcC2ehpSdw/O6Lbf3LTKwuvxOq6J2HZo43//NpHIrGSrvA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8AE2D6FBEC for ; Sun, 28 Jan 2024 01:05:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTsKF-0007QY-CU; Sat, 27 Jan 2024 18:43:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsKD-0007QK-Rk for help-guix@gnu.org; Sat, 27 Jan 2024 18:43:02 -0500 Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsKB-0006Jm-Nq for help-guix@gnu.org; Sat, 27 Jan 2024 18:43:01 -0500 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4TMrhx0mrZzDqWT; Sat, 27 Jan 2024 23:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1706398977; bh=pzoikBybvojPdHjt4hs52wg21O1Kaw7ShGLjzKctFzI=; h=From:To:Cc:Subject:Date:References:In-reply-to:From; b=H9jAbD1NxE4FwR0MB2KbwsRPIYg2VAhIpjgJiceZqAoFUkHgs7m8U4r+hjhWICJ83 0S7wRS/cl0F5jad60Od0q/T55PCswSyWFNFYVE5Vl4lg1IdGN0mitje/F9XvykzpEz 24VoBVqfMq4OCFPWEMvoNn4GbFzW0wTawLkHvFsY= X-Riseup-User-ID: 0B4F4B4A099A642974C386F92789525C7814D054D9FF4913F56225D7488CA2E8 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4TMrhw392szJn62; Sat, 27 Jan 2024 23:42:56 +0000 (UTC) From: Csepp To: Sven Hartrumpf Cc: help-guix@gnu.org Subject: Re: Using cross-compiled packages (e.g. x86_64-linux-gnux32 on x86_64-linux-gnu) Date: Sun, 28 Jan 2024 00:40:37 +0100 References: <20240106.132746.668568851375710132.hartrumpf@gmx.net> <86ttn0c1kx.fsf@riseup.net> <20240126.150040.71261172484115188.hartrumpf@gmx.net> In-reply-to: <20240126.150040.71261172484115188.hartrumpf@gmx.net> Message-ID: <86le8axs05.fsf@riseup.net> MIME-Version: 1.0 Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.25 X-Migadu-Queue-Id: 8AE2D6FBEC X-Spam-Score: 2.25 X-Migadu-Scanner: mx11.migadu.com X-TUID: HTokqJn3Xnum Sven Hartrumpf writes: > Hello. > >> Sven Hartrumpf writes: >> >>> Hello. >>> >>> I want to cross-compile some packages for the x32 ABI >>> (because it can speed up one of my performance-critical applications). >>> Thanks to Efraim=E2=80=99s recent changes, I can simply use >>> >>> # guix build lz4 =E2=80=93target=3Dx86_64-linux-gnux32 >>> (lz4 is only a simple example, not the one which is important for me :-) >>> >>> What is a good or simple way to use the resulting binaries >>> (which I find under /gnu/store/=E2=80=A6/bin/lz4)? >>> My user-land binaries are mainly x86_64-linux-gnu, only few will be >>> x86_64-linux-gnux32. >>> >>> Greetings >>> Sven > > Csepp wrote, 2024-01-26: > >> Don=E2=80=99t they run as normal? > > They do. > I was looking for a way to prefer some x32 binaries over the 64bit ones. > >> If the question is about installing them in a profile, you could put them >> in a manifest. Or you could try grafting them into existing packages if = you >> want them to use them in scripts. But be careful that you don=E2=80=99t = mix >> libraries into that. > > For many packages, I will have two builds in /gnu/store , e.g. > > # file /gnu/store/*zstd*/bin/zstd > /gnu/store/p61ifh74s4n4jg7c1j1f2gw2c235lna0-zstd-1.5.5/bin/zstd: ELF 64-b= it LSB > executable, x86-64, version 1 (SYSV), dynamically linked, interpreter > /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-6= 4.so.2, > for GNU/Linux 2.6.32, stripped > /gnu/store/yf15abzz51wfapi699g1xp02lklkis5z-zstd-1.5.5/bin/zstd: ELF 32-b= it LSB > executable, x86-64, version 1 (SYSV), dynamically linked, interpreter > /gnu/store/dxxbn44p9lfy7pbpj82kj68rk2mixn89-glibc-cross-x86_64-linux-gnux= 32-2.35/lib/ld-linux-x32.so.2, > for GNU/Linux 2.6.32, stripped > >> But as far as using them goes, I=E2=80=99m pretty sure you can just run = them. Guix >> is actually really nice for this use case, because you don=E2=80=99t hav= e to >> manually manage a different sysroot for every ABI. I=E2=80=99ve used thi= s property >> at work to cross-build an ARM package and transfer it to a Raspberry Pi.= It >> just worked. > > Yes. > But thhe use of =E2=80=93target for building x32 binaries is somewhat dif= ferent from cross-compilation > because the resulting binaries can (and should) be run on the host system= . And of course, > a profile can only referenced one version and that will be the 64bit vers= ion. > > I came up with a naive solution which works for me (as a Guix System begi= nner). > I explicitly put links in ~/.local/bin/x86_64-linux-gnux32/ to the x32 bi= naries I prefer. > (~/.local/bin/x86_64-linux-gnux32/ is the first element in my PATH). > > Greetings > Sven I recommend looking into package transformations (especially how grafts wor= k) and/or managing multiple profiles. If you want to have the x32 variants in your profile, I think you can do th= at with a manual graft.