Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The init needs to fall back to C locale in Nix environment #4503

Closed
wenzeslaus opened this issue Oct 12, 2024 · 3 comments · Fixed by #4540
Closed

[Bug] The init needs to fall back to C locale in Nix environment #4503

wenzeslaus opened this issue Oct 12, 2024 · 3 comments · Fixed by #4540
Labels
bug Something isn't working
Milestone

Comments

@wenzeslaus
Copy link
Member

Describe the bug

Running ./app/bin/grass in Nix shell build from our dev environment reports issues with locale.

To reproduce

Follow the Nix setup and then:

./app/bin/grass --tmp-project XY --exec g.region -p

The same command (including ./app/bin/grass) runs for me without any warnings outside of Nix shell.

Expected behavior

Run without locale warnings or document better what to do.

Screenshots

> ./app/bin/grass --tmp-project XY --exec g.region -p
System locale is not usable (LC_ALL variable not defined). Most likely it indicates misconfigured environment.
Reported error message: unsupported locale setting
Default locale settings are missing. GRASS running with C locale.
Default locale settings are missing. GRASS running with C locale.

There are the two same messages because the same message is used at two different places.

System description

  • main (GRASS GIS 8.5.0dev 573d54a)
  • Our Nix environment
  • Pop!_OS 22.04 LTS (Ubuntu 22.04 jammy)
@wenzeslaus wenzeslaus added the bug Something isn't working label Oct 12, 2024
@marisn
Copy link
Contributor

marisn commented Oct 16, 2024

Could this be related to:
NixOS/nix#4829

@imincik thoughts?

@imincik
Copy link
Contributor

imincik commented Oct 16, 2024

Can you try this patch

git --no-pager diff
diff --git a/flake.nix b/flake.nix
index 51174e1da7..a105607417 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,6 +34,8 @@
                 pytest
               ];

+            LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
+
             shellHook = ''
               function dev-help {
                 echo -e "\nWelcome to a GRASS development environment !"

@wenzeslaus
Copy link
Member Author

That works for me. I no longer get the warning. Can you please do a PR and describe the change?

imincik added a commit to imincik/grass that referenced this issue Oct 17, 2024
@neteler neteler added this to the 8.5.0 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants