Issues in recent versions with unicode support + clang

Hi there,

We are the creators of the Crystal programming language, and we use nix to run our CI (:heart:). Long story short, when we upgraded one of the macOS images in our GH Actions infra, we noted that one spec was failing—one that attempted to build an executable with unicode characters.

The details can be seen in this issue, but the best way to describe the problem is to note that running the following command in a nix-shell generates a wrong filename:

echo 'int main(void){}' > test.c && clang -o ×‽😂 test.c

The file it generates is $×‽360237230202 (among other things, the emoji is written with its codepoints in octal).

Tested with nix 2.11.0

I bet this deserves to open a ticket, but I wanted to run it first here. Thanks for your time!


Hi, as both a huge fan of crystal and nix, let’s get this sorted!

Interestingly this seems to be a clang issue as it works fine with GCC:

echo 'int main(void){}' > test.c
clang -o clang_×‽😂 test.c
gcc -o gcc_×‽😂 test.c
install -Dm444 -t $out/foo *
tree ./result/
└── foo
    ├── $clang_303227342200275360237230202
    ├── env-vars
    ├── gcc_×‽😂
    └── test.c

This is admittedly in a sandboxed NixOS build environment and not nix-shell.

Will need to poke around this a bit to see what might be the cause.

1 Like