public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Oleg Smolsky <osmolsky@netskope.com>
To: Florian Weimer <fw@deneb.enyo.de>,
	Oleg Smolsky via Libc-help <libc-help@sourceware.org>
Subject: Re: Issue with locale (sysroot installation)
Date: Sun, 21 Mar 2021 11:27:22 -0700	[thread overview]
Message-ID: <1bfd09b7-f4ef-3ccd-6cf6-a5ec1eaaf874@netskope.com> (raw)
In-Reply-To: <f2fbb5f9-d97f-84d4-62cc-7c10cd8eb922@netskope.com>

On 2021-03-21 08:17, Oleg Smolsky wrote:
> On 2021-03-21 01:19, Florian Weimer wrote:
>>
>>> 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.)
>
> Ah, I see. Thank you for the hint, Florian! The run-time solution 
> works, but I would like to bake the locale location into glibc.
>
> My current build recipe configures GLibc with "--prefix=/usr 
> --libdir=/usr/lib" and then I do "make install_root=$sysroot install". 
> This generates the right directory structure for GCC to discover 
> everything and for the generated executables to run (given the minimal 
> rpath tweaks).
>
> Is there a different way to configure/install so that the locale path 
> gets baked in and discovered at run-time?

After a few experiments, I got the following to work: glibc is built 
with --prefix=$sysroot/usr. The only kink is that during GCC build I 
have to create $sysroot hierarchy inside $sysroot - so I cheated with a 
symlink.

The test program finds the locale at the right place now.

Thanks!
Oleg.


      reply	other threads:[~2021-03-21 18:27 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
2021-03-21 15:17   ` Oleg Smolsky
2021-03-21 18:27     ` Oleg Smolsky [this message]

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=1bfd09b7-f4ef-3ccd-6cf6-a5ec1eaaf874@netskope.com \
    --to=osmolsky@netskope.com \
    --cc=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).