1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-16 20:10:39 +02:00
Commit graph

7 commits

Author SHA1 Message Date
Ludovic Courtès
d7c8a5ff3c
guile-launcher: Avoid the “C” locale and try “C.UTF-8”.
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
2025-01-04 23:35:40 +01:00
Janneke Nieuwenhuizen
832ef198f7
guile: Silence GC warnings on the Hurd, part II.
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
2024-12-10 13:41:38 +01:00
Janneke Nieuwenhuizen
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 (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
2024-11-18 08:41:51 +01:00
Ludovic Courtès
d92ee0a8bd
guile: Leave 'scm_install_gmp_memory_functions' unchanged.
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.
2021-05-25 22:17:38 +02:00
Ludovic Courtès
a53f711422
guile: Do not install Guile/libgc allocators for GMP.
Fixes <https://bugs.gnu.org/46330>.

* gnu/packages/aux-files/guile-launcher.c (main): Clear
'scm_install_gmp_memory_functions'.
2021-02-07 22:28:55 +01:00
Ludovic Courtès
d20665ecbf
guix: 'guile' executable ignores GUILE_LOAD_PATH during startup.
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.
2020-12-11 19:06:53 +01:00
Ludovic Courtès
1d4ab335b2
self: Use a 'guile' that doesn't complain about locales.
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.
2020-10-05 23:19:19 +02:00