Open hugosenari opened 1 year ago
Describe the problem Some compiling tools set interpreter to nix store
Some users may compile with nix tooling and run on Linux LSB FHS
:sob: fail to run :grinning: Happy
To Reproduce
cc hello.c -o hello ldd hello # /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007f2a584be000)
Copy to machine without Nix store
./hello exec: Failed to execute process './hello.a': The file exists and is executable. Check the interpreter or linker?
Then apply patchelf
cp hello hellow patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 hellow
Copy to a machine without Nix store
./hellow Hello, World!
Related: #145
Would this entail static compilation?
I'm a newbie on this topic. I don't know what would be the best solution. Options
Describe the problem Some compiling tools set interpreter to nix store
Some users may compile with nix tooling and run on Linux LSB FHS
:sob: fail to run :grinning: Happy
To Reproduce
Copy to machine without Nix store
Then apply patchelf
Copy to a machine without Nix store
Related: #145