NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.67k stars 13.12k forks source link

Build failure: arrayfire with CUDA support #288621

Open tmplt opened 5 months ago

tmplt commented 5 months ago

Steps To Reproduce

Build arrayfire.override { cudaSupport = true }.

Build log

<snip>

rrayfire>   error: #error -- unsupported GNU version! gcc versions later than 12 are
arrayfire>   not supported! The nvcc flag '-allow-unsupported-compiler' can be used to
arrayfire>   override this version check; however, using an unsupported host compiler
arrayfire>   may cause compilation failure or incorrect run time execution.  Use at your
arrayfire>   own risk.
arrayfire>     143 | #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
arrayfire>         |  ^~~~~
arrayfire>   # --error 0x1 --
arrayfire> Call Stack (most recent call first):
arrayfire>   /nix/store/hkhmxs4n1agpdpyamlh2b78pm9wch0br-cmake-3.27.9/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
arrayfire>   /nix/store/hkhmxs4n1agpdpyamlh2b78pm9wch0br-cmake-3.27.9/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
arrayfire>   /nix/store/hkhmxs4n1agpdpyamlh2b78pm9wch0br-cmake-3.27.9/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
arrayfire>   CMakeLists.txt:185 (enable_language)
arrayfire> 
arrayfire> -- Configuring incomplete, errors occurred!

Additional context

This is on 876deff81cd4a4d38da277fbfd7aee722a6a8322 (unstable).

Notify maintainers

@chessai @twesterhout

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.3, NixOS, 23.11 (Tapir), 23.11.20231201.0f9a196`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

tmplt commented 3 months ago

Present on today's HEAD, 29e4c2ef170e66021e31b3612cc4516c1abf940a:

NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_INSECURE=1 nix build --impure --expr 'with builtins.getFlake "nixpkgs/29e4c2ef170e66021e31b3612cc4516c1abf940a"; with legacyPackages.x86_64-linux; arrayfire.override { cudaSupport = true; }'

Related: https://github.com/NixOS/nixpkgs/issues/305686.