From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D9CBE1382C5 for ; Fri, 8 Jan 2021 23:37:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 47B92E0875; Fri, 8 Jan 2021 23:37:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9486DE0801 for ; Fri, 8 Jan 2021 23:37:25 +0000 (UTC) From: Andreas =?ISO-8859-1?Q?K=2E_H=FCttel?= To: gentoo-user@lists.gentoo.org Cc: Thomas Mueller Subject: Re: [gentoo-user] Gentoo chroot with old glibc Date: Sat, 09 Jan 2021 01:37:14 +0200 Message-ID: <5231675.rdbgypaU67@farino> Organization: Gentoo Linux In-Reply-To: <20210104115748.50A5EE0930@pigeon.gentoo.org> References: <2061dce3-a6b3-31a7-aed0-c08487fa15ce@apteryx.fr> <5242903.IbC2pHGDlb@pinacolada> <20210104115748.50A5EE0930@pigeon.gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3250187.LZWGnKmheA"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: 23da1edd-fb97-4bf1-9d16-294840109f4d X-Archives-Hash: 276ba4f134a4b4ba3397729bc0d52b28 --nextPart3250187.LZWGnKmheA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; protected-headers="v1" From: Andreas =?ISO-8859-1?Q?K=2E_H=FCttel?= To: gentoo-user@lists.gentoo.org Cc: Thomas Mueller Subject: Re: [gentoo-user] Gentoo chroot with old glibc Date: Sat, 09 Jan 2021 01:37:14 +0200 Message-ID: <5231675.rdbgypaU67@farino> Organization: Gentoo Linux In-Reply-To: <20210104115748.50A5EE0930@pigeon.gentoo.org> References: <2061dce3-a6b3-31a7-aed0-c08487fa15ce@apteryx.fr> <5242903.IbC2pHGDlb@pinacolada> <20210104115748.50A5EE0930@pigeon.gentoo.org> Am Montag, 4. Januar 2021, 13:57:37 EET schrieb Thomas Mueller: > > > That's what I did: I found a 2017 stage3 with a still older glibc and > > > managed to upgrade to a 2020 gentoo while masking the last glibc > > > versions. That was tricky because I had to git-checkout intermediate > > > versions of the portage tree in order to deal with the EAPI changes b= ut > > > I have a working chroot now. Thanks. > >=20 > > That's the easy way to do it, yes. > >=20 > > The hard way is to treat this as a cross-compilation problem and bootst= rap > > your own stages from scratch. Instructions would be a bit longer... > >=20 > > Andreas K. H=FCttel >=20 > I have looked through crossdev. Is that what it would take to cross-comp= ile > and bootstrap stages from scratch? >=20 > Could that be done from (instead of an old glibc) musl, uClibc, or FreeBSD > or NetBSD? In principle yes, but every experimental piece can add more problems.=20 It's probably best to start with a base that is as boring as possible. What crossdev does is (simplified) * "create" (as symlinks) ebuilds for cross-compiler, cross-binutils, and=20 target glibc * build cross-compiler, cross-binutils, and target glibc * installs a wrapper for emerge that uses these =46or example, you end up on an amd64 system with an additional directory /= usr/ riscv64-unknown-linux-gnu that contains=20 * a gcc that runs on amd64 (CBUILD) but generates code for riscv64 (CTARGET) * a binutils that runs on amd64 but works with files for riscv64 * a glibc for riscv64 Then, using commands like riscv64-unknown-linux-gnu-emerge -av @system you can build in /usr/riscv64-unknown-linux-gnu pieces of the target system= =2E=20 This works only in a very limited way, since many upstream build systems do= =20 not support cross-compiling. However, with some patience you can get to the= =20 point where the directory can be tarred up and used as a chroot on the targ= et=20 architecture. =2D-=20 Andreas K. H=FCttel dilfridge@gentoo.org Gentoo Linux developer=20 (council, qa, toolchain, base-system, perl, libreoffice) --nextPart3250187.LZWGnKmheA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEE2dlecvcVU8/ThuQ/jJJgxvbXoxAFAl/47KpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ5 RDk1RTcyRjcxNTUzQ0ZEMzg2RTQzRjhDOTI2MEM2RjZEN0EzMTAACgkQjJJgxvbX oxBTehAAsRVQTvEEcFNW/b4Zq7QgVpCL7ZMeKCKKTifqXMNsoCZPCS+b2a4Rk17T PE1oFqjsrlKViX+pGzLcL83l9d/0wv7p12jt63oGPtHHQjWsoDN5XO1lYto6pzMw iKHfikwpJAlL72Iqdt0SG8x2sIde5qsSDs08vc7aDXu0Te9yLCMcdI4BWgf0a2Zy YSg1bXrilPv49V5wSKwJq+zOrINA/KpMIF3dRgYgTxv5a5623Fwjq6OlF3h/nSOH c+C9G+4xmKrwQj+hk5elIrS7gD/hS8l6NyE62ks8i9JkyHxUWOJ6mjYZFhR7epyR t9ym/vqkGU3UQFBVif8nhUrflEtG/J3E+3fqgwBt++UVDj6WfBjPrORx0uhshIQ7 miw5kFunTZ2UURkhYoBP50NflONmSR5vAmfThBo3Gvepec3/mJDROumPd+G7Lunt E2Er8WAqpqMJHQ4VR1ZDmr6Vk6ox/91JFdhk+Wrmq0o9QBwIlPWn3vmLTa4SYppo M3B3gELgkGJorZT/jXCiUgECqJOGt8OZeiKCcu0sA/GTUaE8xLz3TFnuCMyUAs1k V1mdyBatykb53nbHco4prhxJp5MjzNPqL5OFNOZKWZ+30m5UyOhgBdc41av/oCD2 4WizIbposfpy3Yw5va+TEnEZx+TxSrfqlPiwE3h1J1W74oyB/B8= =1KvW -----END PGP SIGNATURE----- --nextPart3250187.LZWGnKmheA--