This is a followup to ed0cd12a82, which
adds the C.UTF-8 locale to the glibc package, and
ee4e79f871, which changed the default to
“C.UTF-8” for ‘guix’ commands.
Fixes a bug whereby starting ‘guix’ in an environment where the LC_*
variables are unset would start it in the “C” locale:
echo '(pk (setlocale LC_ALL))' | guix shell -CW coreutils -- guix repl
This would lead to breakage for commands such as ‘guix substitute’ that
need to run in a UTF-8 locale.
* gnu/packages/aux-files/guile-launcher.c (main): Try “C.UTF-8” before
“en_US.UTF-8”. Do that also when the current locale is “C”.
* guix/ui.scm (install-locale): Likewise.
Change-Id: I36da4db8f898f1083b33760e1ab46c3a257de811
This is a follow-up to commit
b0416b8503
guile: Silence GC warnings on the Hurd.
This should work around <https://issues.guix.gnu.org/73181>, resurrecting
offloading to the Hurd.
* gnu/packages/aux-files/guile-launcher.c: (main)[__GNU__]: Move code to
silence warnings to...
(inner_main)[__GNU__]: ...here.
Change-Id: I408201f7f4072c9a33837e6020ac63270b33702e
This should work around <https://issues.guix.gnu.org/73181>, resurrecting
offloading to the Hurd.
* gnu/packages/aux-files/guile-launcher.c (no_warnings)[__GNU__]: New
function.
(main)[__GNU__]: Use it to silence libgc warnings.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>.
Change-Id: I8f30732d192ce46144da4a1a081813a104a5f376
Since the switch to Guile 3.0.7 using mini-GMP, we can leave
'scm_install_gmp_memory_functions' to its default value, which is to use
custom memory allocators; there is no interference with users of GMP
such as GnuTLS/Nettle.
* gnu/packages/aux-files/guile-launcher.c (main) [!SCM_ENABLE_MINI_GMP]:
Leave 'scm_install_gmp_memory_functions' unchanged.
When starting the 'guix' command, this ensures Guile modules are
immediately found instead of being search for in other directories.
This reduces the number of 'stat' calls during startup when
GUILE_LOAD_PATH is set to (almost) that of "env -i $(type -P guix)".
* gnu/packages/aux-files/guile-launcher.c (load_path)
(load_compiled_path): New variables.
(inner_main): Restore GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH and
set %load-path and %load-compiled-path accordingly.
(main): Save GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH and unset them.
Since commit ba48895899, selected UTF-8
locales are bundled. However, because 'guix-command' is itself a Guile
script, users would still see Guile's warning, particularly on foreign
distros:
$ LC_ALL=sdf guix foo
guile: warning: failed to install locale
hint: Consider installing the `glibc-utf8-locales' [...]
User commands would print that warning, but more importantly, each
invocation of 'guix substitute' would print it, even though
'guix-daemon.service' explicitly chooses "en_US.utf8", which is in
'glibc-utf8-locales'. This leads to confusion since users would keep
seeing this message unless/until they realize they also need to install
'glibc-utf8-locales' in root's profile.
This patch gets rid of "guile: warning: ..." for a guix-pulled 'guix'
command.
* guix/self.scm (specification->package): Add "gcc-toolchain".
(quiet-guile): New procedure.
(guix-command): Use it.
* gnu/packages/aux-files/guile-launcher.c: New file.
* Makefile.am (AUX_FILES): Add it.