From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id BA9893858004 for ; Sun, 21 Mar 2021 18:27:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BA9893858004 Received: by mail-pl1-x62c.google.com with SMTP id ay2so5386023plb.3 for ; Sun, 21 Mar 2021 11:27:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7teU572TTHRBj7LfWgXhbEvxJN829lUYVrrdOUOyh1U=; b=l8QMFSaW/ZgWTQYpAwYZEuMsGeICMjiwGoDUSAJbUsZBu/SqHDk9q9opb7CJtAlkbs C4hxtbhkC0RhSLU17RXVHtTh5WJdwhGykSPhlLOuwESEvaRB+irLOSVuRT4tGI2rWVe+ GP9ko9iI+6XG4D6BDZ2QXWHe+Tm7CuGDm+lSb4X96BrI1fSQ+dagJZIQz7Lpz+qw9ytN RWYjRFqmf23fG1mdWDhbRgh315s+jGRvVw0JlcadZBp3fEDwfZAh4WEefTJKob+g+idp zD9MWA32eWZuI3Ps5a//0/3PGdYqM4t1XQr6ZsvHAG3vZKt+zrZ6COMuMi0hgswG1Dih 0BmQ== X-Gm-Message-State: AOAM532JyS7MMAtmEl2UB6jVsmUEUmzkL+RJuS9ngLkBJn9tOGqnhkGE 2Sahe5LQT2HzejXS3RVUP1HNA71zmPJDNw== X-Google-Smtp-Source: ABdhPJy+lUYQm3uMVptRL7OpVFM5mW3D8JiHjBpk9OdWYMy8B5eS7ahFcD7ixhy8WUWzCNCBvDiMjA== X-Received: by 2002:a17:90a:a96:: with SMTP id 22mr9466035pjw.200.1616351244436; Sun, 21 Mar 2021 11:27:24 -0700 (PDT) Received: from [192.168.10.170] (c-73-15-174-176.hsd1.ca.comcast.net. [73.15.174.176]) by smtp.gmail.com with ESMTPSA id p1sm11327954pfn.22.2021.03.21.11.27.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Mar 2021 11:27:23 -0700 (PDT) Subject: Re: Issue with locale (sysroot installation) From: Oleg Smolsky To: Florian Weimer , Oleg Smolsky via Libc-help References: <878s6g2a1z.fsf@mid.deneb.enyo.de> Message-ID: <1bfd09b7-f4ef-3ccd-6cf6-a5ec1eaaf874@netskope.com> Date: Sun, 21 Mar 2021 11:27:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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 18:27:27 -0000 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.