-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
glibc 2.27 breaks locale support #38991
Comments
I am getting the following warning when I run any GTK application from master.
Possibly something to do with recent glibc bump? |
Are the failing programs also compiled against glibc 2.27 or are they using the old glibc? I wonder if glibc made an incompatible change to the locale file format again? |
According to
Ping @shlevy. |
|
Bah... Looks like |
Ah! Figured it out. If you have
|
@peti thoughts? |
Trying to work this through. Adding my observations. I have a machine using 2.27. When connecting via
When ssh'ing to a machine using 2.27 I see:
Which, in that case, has a Does Figuring it might be perl specific I tried
I also recall seeing messages during a |
@coreyoconnor Hmm, do you get the bug with |
(e.g. if you run |
I see the error messages using just |
Strange... Are you connecting to an old screen session or something? Or maybe |
Indeed! uninstalling and including in system environment worked as expected. |
Ref: #38738 |
OK, my current thoughts are:
So, concretely this would mean:
Since this is a somewhat sweeping change, I'd appreciate some additional thoughts on this. @peti @edolstra thoughts? |
My understanding is that this issue will disappear when As far as the versioned variable suggestion goes, I think it sounds good, but I haven't really thought about it and therefore don't feel like I have a qualified opinion on the matter. |
@peti It will still exist for anyone running |
One aspect of this will resolve once unstable catches up with the master branch. The other aspect of this is similar to the "qt version mismatch" issue: A users profile may contain software incompatible with the services provided by the OS. |
Changing the environment variable name sounds a bit annoying. What about changing the locale archive patch to instead try loading from |
@dezgeg Why wouldn't the controversial piece be needed on that model? We still wouldn't have a new locale archive version available to programs, so someone running current stable NixOS but testing master after a bump will see locale issues. |
(it's also not clear to me why a separate extension is better or worse than a separtae env var) |
Right, I didn't think it through completely. Yes that needs to be done.
Because there are several places in Nixpkgs that for some reason or another do stuff like:
If you got rid of the plain |
There'd be no need to get rid of the old one, and we already have the version specific one. |
Just
|
I'm on a fresh 18.09 NixOS system with a 122M locale-archive for glibc-locales-2.27 and yet applications like Firefox and gkrellm claim that 'locale not supported by C library' even after setting LOCALE_ARCHIVE_2_27 in a bash session. |
@vandenoever: on 18.09 you have 2.27 locale. If you want to support older ones on there, you need _2_11 with glibc version e.g. from 18.03 (2.26). |
I have been scratching my head on this all day. I have nothing against setting an env variable (but it is not clear where to do it properly, and it makes things ugly for non-specialist user), but this is not the only problem: you are not even sure the right version of glibc-locale is even installed in nix (if you are on a non-nixos box). IMO, this goes against the philosophy of nix where dependencies should be automatically fetched. I know the wrapper solution is not ideal because it increases the closure size, but at least it is safe and works out-of-the-box without users having to manually tweak their environment. Otherwise, if e.g. I want to use perl, I must manually install glibc-locale and set the env var. Too much trouble. I agree with @timbertson that I would prefer a larger closure size to all this mess. |
And as a side note, while upgrading mixxx (#a847dcc), I also messed up my database (happy I had a backup...) because of the mismatch between nixos-18.03 and master. Again, the wrapper was the cleanest way to solve the problem. |
Shouldn't this have been a release critical error?
when I set When you suggest a work around can you please be specific as to where you apply the workaround? |
Why are two different versions of glibc in the output below on NixOS-18.09?
|
I figured it out myself: The solution is to remove old programs that use older glibc versions that have been installed via nix-env from your profile (via I do think it's a bug that previously installed programs break regardless of what the glibc maintainers did or did not do. |
I would like to close this chapter, er, bug. I realize some people still have open questions about the stae of affairs, but from a Nixpkgs development POV there's nothing left to do. A grand sweeping solution that solves all problems does clearly not exist and even if it did then I am unaware of anyone actively pursuing it. Therefore, I don't consider this problem an "open issue" that's actively being worked on and am happy to lay it at rest. Obviously, this ticket remains open for people to comment and/or ask questions. |
For those coming to this thread later: One workaround for non-NixOS is described here: #38991 (comment) (and a gist here: https://gist.github.com/peti/2c818d6cb49b0b0f2fd7c300f8386bc3) So if you want to fix your Travis CI setup: sudo: required
dist: trusty
language: nix
script:
- glibcLocales=$(nix-build --no-out-link "<nixpkgs>" -A glibcLocales)
- echo $glibcLocales
- export LOCALE_ARCHIVE_2_27="${glibcLocales}/lib/locale/locale-archive"
- # other things you do in your script |
For ubuntu, I added the following to my .bashrc:
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/conflict-between-glibc-and-glibclocales-workaround-inside/7608/1 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/bad-locale-support-perl-warning-setting-locale-failed/8261/1 |
* fixes error: bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) * reference: NixOS/nixpkgs#38991
I recently updated to the latest version of
master
@ 546696e, and now myperl
binary emits the following errors when I run non-trivial scripts (likemosh
ormr
):I have
properly configured (as per
nixos-unstable
@ ea145b6).The text was updated successfully, but these errors were encountered: