From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 351DA3858D29 for ; Sun, 21 Mar 2021 08:23:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 351DA3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (port=55525 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1lNtMv-0007b8-CK; Sun, 21 Mar 2021 08:23:29 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1lNtJA-00011s-CM; Sun, 21 Mar 2021 09:19:36 +0100 From: Florian Weimer To: Oleg Smolsky via Libc-help Subject: Re: Issue with locale (sysroot installation) References: Date: Sun, 21 Mar 2021 09:19:36 +0100 In-Reply-To: (Oleg Smolsky via Libc-help's message of "Sat, 20 Mar 2021 14:32:05 -0700") Message-ID: <878s6g2a1z.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2021 08:23:33 -0000 * Oleg Smolsky via Libc-help: > 2. In the broken case it looks like glibc code is searching in the=20 > system dirs. Here is "strace -e file" output: > > openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = =3D 4 > newfstatat(4, "", {st_mode=3DS_IFREG|0644, st_size=3D2981280, ...},=20 > AT_EMPTY_PATH) =3D 0 > openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = =3D 4 > newfstatat(4, "", {st_mode=3DS_IFREG|0644, st_size=3D2995, ...},=20 > AT_EMPTY_PATH) =3D 0 > openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_TIME",=20 > O_RDONLY|O_CLOEXEC) =3D -1 ENOENT (No such file or directory) > openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_TIME",=20 > O_RDONLY|O_CLOEXEC) =3D -1 ENOENT (No such file or directory) > openat(AT_FDCWD, "/usr/lib/locale/en_US/LC_TIME", O_RDONLY|O_CLOEXEC) =3D= =20 > -1 ENOENT (No such file or directory) > ... > 4. Glibc was configured with: > > CC=3D$boostrap_gcc/bin/gcc CXX=3D$boostrap_gcc/bin/g++ PATH=3D/opt/3p/bin= :$PATH \ > =A0=A0=A0 ../configure \ > =A0=A0=A0=A0=A0=A0=A0 --prefix=3D/usr --libdir=3D/usr/lib \ > =A0=A0=A0=A0=A0=A0=A0 --host=3Dx86_64-pc-linux \ > =A0=A0=A0=A0=A0=A0=A0 --enable-kernel=3D4.4.0 \ > =A0=A0=A0=A0=A0=A0=A0 --with-headers=3D$sysroot/usr/include Due to --prefix=3D/usr, the built glibc will locate ancillary in the standard paths. Therefore, you have to set LOCPATH and GCONV_PATH to tell the glibc in the sysroot to use files at non-standard locations. (The system files are not necessarily compatible.)