NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.64k forks source link

"bash: export: `RANLİB=ranlib': not a valid identifier" error on any nix-shell operation #203914

Open Dines97 opened 1 year ago

Dines97 commented 1 year ago

Describe the bug

Pretty much all information in the title. Any nix-shell operation produce this error "bash: export: `RANLİB=ranlib': not a valid identifier"

Steps To Reproduce

  1. nix-shell -p neofetch
  2. See error in console

Expected behavior

Nix shell with with given package

Screenshots

image

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Funny thing i can't run this command this way :D. It also didn't work

➜  ~ nix-shell -p nix-info --run "nix-info -m"
/nix/store/1d6ian3r8kdzspw8hacjhl3xkp40g1lj-binutils-wrapper-2.39/nix-support/setup-hook: line 134: export: `RANLİB=ranlib': not a valid identifier
➜  ~ nix-shell -p nix-info
bash: export: `RANLİB=ranlib': not a valid identifier
# Added nix-info to list of packages
➜  ~ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.80, NixOS, 22.11 (Raccoon), 22.11.20221130.596a8e8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(denis): `""`
 - channels(root): `"nixos-22.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
philiptaron commented 1 year ago

Just a note: that's a Turkish upper-case dotted I in the variable definition: https://en.wikipedia.org/wiki/%C4%B0 and https://en.wikipedia.org/wiki/Dotted_and_dotless_I_in_computing

It needs to be the ASCII upper-case I. (U+0049)

Artturin commented 1 year ago

ranlib is exported at https://github.com/NixOS/nixpkgs/blob/6796675202b8d32e151a31ec71218cff04b2447a/pkgs/build-support/bintools-wrapper/setup-hook.sh#L57-L65

it's made uppercase with ^^

cmd=ranlib
echo "${cmd^^}"

what does the echo output on your system @Dines97

10null01 commented 1 week ago

@Artturin sorry for bothering but i have same error and this is my output cmd=ranlib echo "${cmd^^}" RANLİB how can i solve this

10null01 commented 1 week ago

@Dines97 sorunu çözebildin mi çözdüysen anlatabilir misin?

Artturin commented 1 week ago

@Artturin sorry for bothering but i have same error and this is my output cmd=ranlib echo "${cmd^^}" RANLİB how can i solve this

Maybe LC_ALL=en_US.UTF-8 *nix command*

10null01 commented 1 week ago

@Artturin sorry for bothering but i have same error and this is my output cmd=ranlib echo "${cmd^^}" RANLİB how can i solve this

Maybe LC_ALL=en_US.UTF-8 *nix command*

it worked thank you so much