nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
712 stars 80 forks source link

Doesn't run on nix nixos-20.09 #183

Closed yakimant closed 1 month ago

yakimant commented 1 month ago
$ nix run --override-input nixpkgs nixpkgs/nixos-20.09 --impure github:nix-community/nixGL -- program
...
error: builder for '/nix/store/1nd00kp9fs6afpa3ylhb49ghy04jhbnr-intel-gmmlib-20.2.5.drv' failed with exit code 2;
       last 10 log lines:
       > [ 98%] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmULT.cpp.o
       > cc1plus: warning: '-Werror=' argument '-Werror=implicit-function-declaration' is not valid for C++
       > [100%] Linking CXX executable GMMULT
       > [100%] Built target GMMULT
       > Scanning dependencies of target Run_ULT
       > running ULTs
       > Illegal instruction
       > make[2]: *** [Source/GmmLib/ULT/CMakeFiles/Run_ULT.dir/build.make:81: Run_ULT] Error 1
       > make[1]: *** [CMakeFiles/Makefile2:190: Source/GmmLib/ULT/CMakeFiles/Run_ULT.dir/all] Error 2
       > make: *** [Makefile:171: all] Error 2

We need old nixpkgs with old glibc to run a program on old Linux distributions.

Probably nixGL worked before, will bisect.

yakimant commented 1 month ago

Related issue: https://github.com/nix-community/nixGL/issues/123

yakimant commented 1 month ago

This works: https://github.com/nix-community/nixGL/commit/643e730efb981ffaf8478f441ec9b9aeea1c89f5

The next commit doesn't: https://github.com/nix-community/nixGL/commit/cd2ec2116075abca891e90839d94840b26f28c5d

SuperSandro2000 commented 1 month ago

NixOS 20.09 is EOL since years. You should probably update to a newer version.

yakimant commented 1 month ago

We need to use that one due to glibc compatibility.

SuperSandro2000 commented 1 month ago

Then you probably want to upgrade your base distro.

nixGL is certainly not supporting a NixOS version that old.

yakimant commented 1 month ago

The thing is we want to build an app with old glibc so it can run on most distros. Currently the oldest supported Ubuntu LTS is 20.04, that's why we are stuck with building with nixpkgs 20.09. So people could run our app on Ubuntu LTS 20.04.

I was pretty sure you will not fix the issue. But still usefull to document the workaround.

Pinning https://github.com/nix-community/nixGL/commit/643e730efb981ffaf8478f441ec9b9aeea1c89f5 works with nixpkgs 20.09.

You can close the issue.

SuperSandro2000 commented 1 month ago

What you are doing is unsupported by NixOS upstream and inherently insecure as 20.09 didn't receive an security update in 3.5 years. There are probably many high targeted CVEs since then. You are putting your users at risk with such a prebuilt binary.

I also don't think we should document such an old nixpkgs version. People should not use it anymore.

PS I can't close issues here.

yakimant commented 1 month ago

That's a good point, thank you! So it will be compatibility vs security.