From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 02 11:21:38 2020 Received: (at 43039-done) by debbugs.gnu.org; 2 Sep 2020 15:21:38 +0000 Received: from localhost ([127.0.0.1]:60405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDUZu-0005Y8-FT for submit@debbugs.gnu.org; Wed, 02 Sep 2020 11:21:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDUZt-0005Xw-4b for 43039-done@debbugs.gnu.org; Wed, 02 Sep 2020 11:21:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46950) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDUZn-0001MM-TY; Wed, 02 Sep 2020 11:21:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54528 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kDUZn-0007br-0P; Wed, 02 Sep 2020 11:21:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Adam Griffiths Subject: Re: bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs References: <877dtiq30m.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Fructidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 02 Sep 2020 17:21:28 +0200 In-Reply-To: (Adam Griffiths's message of "Sat, 29 Aug 2020 13:10:00 +1000") Message-ID: <87d034432f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43039-done Cc: 43039-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Adam, Adam Griffiths skribis: >> > $ sudo guix system reconfigure /etc/config.scm >> > >> > guile: warning: failed to install locale >> > hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' >> > package and defining >> > `GUIX_LOCPATH', along these lines: >> > >> > guix package -i glibc-utf8-locales >> > export GUIX_LOCPATH=3D"$HOME/.guix-profile/lib/locale" >> > >> > See the "Application Setup" section in the manual, for more info. >> > >> > guix system: warning: cannot determine provenance for current system >> > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100= .0% >> >> That, I don=E2=80=99t understand. I tried to reproduce it by downloading >> >> (which is essentially the result of installing Guix System from 1.1.0). >> I ran =E2=80=98guix pull=E2=80=99 (which took a lot of time=E2=80=A6) an= d then =E2=80=98guix system >> reconfigure=E2=80=99. =E2=80=98guix system reconfigure=E2=80=99 would o= nly emit the one-liner: >> >> warning: failed to install locale >> >> and not the hint about GUIX_LOCPATH, and then it just went ahead. >> >> What locale does your system use? You can type =E2=80=9Cenv | grep LC_= =E2=80=9D to see. >> > > I'm using en_AU [...] >> (The =E2=80=98guix=E2=80=99 command provided by =E2=80=98guix pull=E2=80= =99 comes with >> =E2=80=98glibc-utf8-locales=E2=80=99 since commit >> ba48895899a117d6ace2209c3f54411a4a989133, but the locale you=E2=80=99re = using >> could be missing from that.) >> >> > downloading from >> > https://ci.guix.gnu.org/nar/lzip/0llx3y194278l5ksr4xh9kc64mh8nn8d-nss-= certs-3.52.1 >> > ... >> > nss-certs-3.52.1 133KiB 186KiB/s = 00:00 >> > [######## ] 48.3% >> > Backtrace: >> > 3 (apply-smob/1 #) >> > In ice-9/boot-9.scm: >> > 705:2 2 (call-with-prompt _ _ #) >> > In ice-9/eval.scm: >> > 619:8 1 (_ #(#(#))) >> > In guix/ui.scm: >> > 1936:12 0 (run-guix-command _ . _) >> > >> > guix/ui.scm:1936:12: In procedure run-guix-command: >> > Throw to key `encoding-error' with args `("scm_to_stringn" "cannot con= vert >> > wide string to output locale" 84 #f #f)'. >> > substitution of >> > /gnu/store/0llx3y194278l5ksr4xh9kc64mh8nn8d-nss-certs-3.52.1 failed >> >> This is really puzzling: guix-daemon is always running in a valid UTF-8 >> locale, as can be seen like this: Not quite true; I understand what was going on, details below. The workaround for you in the meantime is to run: guix build nss-certs --no-substitutes before you run =E2=80=98sudo guix system reconfigure=E2=80=99. The client =E2=80=98guix system=E2=80=99 in this case was running in the = =E2=80=9CC=E2=80=9D locale because =E2=80=9Cen_AU.utf8=E2=80=9D is not among the locales in =E2=80=98g= libc-utf8-locales=E2=80=99, which is what=E2=80=99s bundled with =E2=80=98guix=E2=80=99. Thus, =E2=80=98set-build-options=E2=80=99 in (guix store) would send =E2=80= =9CC=E2=80=9D as the =E2=80=9Clocale=E2=80=9D property. Then, =E2=80=98guix substitute=E2=80=99 would do (setlocale LC_A= LL "C"), from this code: ;; Attempt to install the client's locale, mostly so that messages are ;; suitably translated. (match (or (find-daemon-option "untrusted-locale") (find-daemon-option "locale")) (#f #f) (locale (false-if-exception (setlocale LC_ALL locale)))) Consequently, it would run in a ASCII locale and would thus fail to decode non-ASCII file names that appear in nss-certs. Similar problems could occur anytime someone runs a client in a non-UTF-8 locale. One way to reproduce it for me is this (I use =E2=80=98time-machine=E2=80=99 to get a version of =E2=80=98nss-certs=E2=80= =99 not already available on my disk): --8<---------------cut here---------------start------------->8--- $ LC_ALL=3DC guix time-machine --commit=3D8aeef3c7bdf278003892e608842200d3a= 35211c7 -- build nss-certs=20 Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or= g/git/guix.git'... 0.1 MB will be downloaded: /gnu/store/igklwlj1j60kdgrhcn6m2p2iqp87qrrs-nss-certs-3.52 substituting /gnu/store/igklwlj1j60kdgrhcn6m2p2iqp87qrrs-nss-certs-3.52... downloading from https://ci.guix.gnu.org/nar/lzip/igklwlj1j60kdgrhcn6m2p2iq= p87qrrs-nss-certs-3.52 ... nss-certs-3.52 133KiB 1= .9MiB/s 00:00 [######## ] 48.3%Backtrace: In ice-9/boot-9.scm: 1736:10 4 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 3 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 2 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 1 (_ #(#(#))) In guix/ui.scm: 2046:12 0 (run-guix-command _ . _) guix/ui.scm:2046:12: In procedure run-guix-command: Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert = wide string to output locale" 84 #f #f)'. substitution of /gnu/store/igklwlj1j60kdgrhcn6m2p2iqp87qrrs-nss-certs-3.52 = failed guix build: error: some substitutes for the outputs of derivation `/gnu/sto= re/mzrh9ad4sqqg88ym9c1x1vv2lqjyxbrv-nss-certs-3.52.drv' failed (usually hap= pens due to networking issues); try `--fallback' to build derivation from s= ource=20 --8<---------------cut here---------------end--------------->8--- This is fixed by commit 739f6309478d8ab8501bb653ceb2f634c8560f55, with two additional improvements: fe4e770fc1 ui: Attempt to fall back to "en_US.utf8" rather than "C". 739f630947 store: 'set-build-options' sends LC_MESSAGES, not LC_ALL. aba8def46d substitute: Set LC_MESSAGES to the client's locale, not LC_ALL. I=E2=80=99ll update the =E2=80=98guix=E2=80=99 package so that the changes = to =E2=80=98guix substitute=E2=80=99 take effect. Thanks again for reporting the issue! Ludo=E2=80=99.