public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Oleg Smolsky via Libc-help <libc-help@sourceware.org>
Subject: Re: Issue with locale (sysroot installation)
Date: Sun, 21 Mar 2021 09:19:36 +0100	[thread overview]
Message-ID: <878s6g2a1z.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <fe48c641-a61e-0648-ed97-6168fb4dd505@netskope.com> (Oleg Smolsky via Libc-help's message of "Sat, 20 Mar 2021 14:32:05 -0700")

* Oleg Smolsky via Libc-help:

> 2. In the broken case it looks like glibc code is searching in the 
> system dirs. Here is "strace -e file" output:
>
> openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
> newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=2981280, ...}, 
> AT_EMPTY_PATH) = 0
> openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4
> newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=2995, ...}, 
> AT_EMPTY_PATH) = 0
> openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_TIME", 
> O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_TIME", 
> O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> openat(AT_FDCWD, "/usr/lib/locale/en_US/LC_TIME", O_RDONLY|O_CLOEXEC) = 
> -1 ENOENT (No such file or directory)
> ...

> 4. Glibc was configured with:
>
> CC=$boostrap_gcc/bin/gcc CXX=$boostrap_gcc/bin/g++ PATH=/opt/3p/bin:$PATH \
>      ../configure \
>          --prefix=/usr --libdir=/usr/lib \
>          --host=x86_64-pc-linux \
>          --enable-kernel=4.4.0 \
>          --with-headers=$sysroot/usr/include

Due to --prefix=/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.)

  reply	other threads:[~2021-03-21  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20 21:32 Oleg Smolsky
2021-03-21  8:19 ` Florian Weimer [this message]
2021-03-21 15:17   ` Oleg Smolsky
2021-03-21 18:27     ` Oleg Smolsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s6g2a1z.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).