NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.48k stars 13.67k forks source link

Build failure: bitsandbytes 0.43.1 #342458

Open ovitus opened 5 days ago

ovitus commented 5 days ago

I'm on the following nixpkg commit: 4f807e8940284ad7925ebd0a0993d2a1791acb2f

The patch for this derivation isn't relevant to the newer versions of bitsandbytes and the build fails:

[wright@nixos:~/nixos]$ nix log /nix/store/zh5x0w37nhmp7qlj57710fjdpq7bsljj-python3.12-bitsandbytes-0.43.1.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/zh5x0w37nhmp7qlj57710fjdpq7bsljj-python3.12-bitsandbytes-0.43.1.drv^*'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing setup-cuda-hook
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/742rqjwycc77jkai3czrkx8515vapzld-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tests/test_triton.py
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
substitute(): ERROR: file 'Makefile' does not exist

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/bitsandbytes/default.nix

https://github.com/bitsandbytes-foundation/bitsandbytes/tree/0.43.1

The newest version of bitsandbytes is 0.43.3.

dotlambda commented 5 days ago

Nobody is going to help you if you don't ping the maintainers.

ovitus commented 5 days ago

@mweinelt

mweinelt commented 5 days ago

Try again. The maintainer is @bcdarwin.

ovitus commented 7 hours ago

I got the latest package installed:

{ buildPythonPackage
, cmake
, cudaPackages
, fetchFromGitHub
}:
with cudaPackages;
buildPythonPackage 
{ buildInputs = 
  [ libcublas
    libcusparse
  ];
  nativeBuildInputs =
  [ cmake
    cuda_nvcc
  ];
  pname = "bitsandbytes";
  preBuild = ''
    cd ..
    export NVCC_APPEND_FLAGS="-I${lib.getDev cuda_cccl}/include -I${lib.getDev cuda_cudart}/include -L${lib.getLib cuda_cudart}/lib -L${lib.getStatic cuda_cudart}/lib"
    cmake -DCMAKE_CXX_FLAGS="-I${lib.getDev cuda_cccl}/include -I${lib.getDev cuda_cudart}/include" -DCOMPUTE_BACKEND=cuda -B build . && cmake --build build
  '';
  src = fetchFromGitHub
  { owner = "TimDettmers";
    repo = "bitsandbytes";
    rev = "main";
    hash = "sha256-YOvbMEpRVrbie5mo+mHV9mkfVIbPGgIggR10GLveBgM=";
  };
  version = "0.44.0.dev0";
}