| 8 Nov 2023 |
adisbladis | They do source builds https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/development/python-modules/openai-triton/default.nix#L57-L62 | 22:29:33 |
adisbladis | So it's correct for them to have cmake | 22:29:38 |
matthewcroughan | right, so I do need cmake, and I need to fix cmake | 22:29:55 |
adisbladis | No, you don't | 22:30:12 |
adisbladis | Cmake is something you need when building from source | 22:30:19 |
matthewcroughan | and in this case I have a dist but it is still trying to use cmake, and I'm trying to get rid of cmake | 22:30:36 |
adisbladis | Upstream has some buggy dependency definitions, like all other crappy "data science" packages | 22:30:44 |
matthewcroughan | it's not in the propagatedBuildInputs, and I can't remove it from native because something in the list doesn't have pname | 22:30:51 |
adisbladis | The thing in the list that doesn't have pname is probably cmake which you just set to null | 22:31:18 |
adisbladis | matthewcroughan - nix.how: I think you'd benefit from calming down a bit and try and understand why the dependencies exist | 22:31:52 |
matthewcroughan | I'm not angry? Lol | 22:31:58 |
adisbladis | No, but very hurried | 22:32:04 |
matthewcroughan | Do you blame me? Is Python calming for you? | 22:32:31 |
matthewcroughan | I had this thing working, then I found out about poetry groups, now I have 10 more overrides to make :D | 22:33:00 |
adisbladis | I think the dependency relations here are fairly obvious, and so is the fix | 22:33:00 |
matthewcroughan | you can't set cmake to null because then it makes the filter function fail in the poetry overrides, this is a tricky one for me | 22:36:25 |
matthewcroughan | cmake = null;
triton = super.triton.overridePythonAttrs
(
old: {
propagatedBuildInputs = builtins.filter (e: e != null) old.propagatedBuildInputs;
dontUseCmakeConfigure = true;
}
);
| 22:36:44 |
adisbladis | That will fail with the same error message because of the bundled poetry2nix overrides | 22:37:26 |
matthewcroughan | that's what I am suggesting | 22:37:35 |
adisbladis | Remove cmake = null & do:
propagatedBuildInputs = builtins.filter (e: e.pname != "cmake") old.propagatedBuildInputs;
| 22:38:20 |
matthewcroughan | Oh, that's what I originally did | 22:38:45 |
matthewcroughan | In reply to @matthewcroughan:defenestrate.it guess it's not in propagated, native maybe I was saying here that it didn't work, maybe it's in both native and propagated, I need to get the nix debugger out | 22:39:07 |
matthewcroughan | error: builder for '/nix/store/1kf280p1mh03w4g82a5vr77yzmgs13sl-python3.11-cmake-3.27.7.drv' failed with exit code 2;
last 10 log lines:
> File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
> File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'setuptools'
>
>
For full logs, run 'nix log /nix/store/1kf280p1mh03w4g82a5vr77yzmgs13sl-python3.11-cmake-3.27.7.drv'.
error: 1 dependencies of derivation '/nix/store/55kkq5vpl67cra471pn2d4dxrcamyi8v-python3.11-llama-cpp-python-0.2.13.drv' failed to build
| 22:40:12 |
matthewcroughan | if I read that, does it mean that llama-cpp-python depends on cmake? | 22:40:33 |
matthewcroughan | error: 1 dependencies of derivation '/nix/store/55kkq5vpl67cra471pn2d4dxrcamyi8v-python3.11-llama-cpp-python-0.2.13.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qn5mh0b6ji41c1kkmignsmr2097vnvzw-python3.11-pybind11-2.11.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/adx39f490pi607q9c8x1nsd5v8dgax30-python3.11-triton-2.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nlpanilzzlhnrlk96dq4r7van66ld16q-python3.11-contourpy-1.2.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vbgsgrmbr96gyk5dzj3jqrk55lc8mg2f-python3.11-scipy-1.11.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/imm7lh350jabxp5vnh8fr9mg01rxxb70-python3.11-torch-2.0.0.drv' failed to build
error: 2 dependencies of derivation '/nix/store/qlvyfl87wwpqv44mqqk6xasrds4irh09-python3.11-matplotlib-3.8.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sp3viv34zk4xdhkvp4kx9hllknk5c3h2-python3.11-scikit-learn-1.3.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pmc273f198zjg0k9hz66ld8rw7y0w18v-python3.11-torchvision-0.15.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rxf4m1grj3m67lb4dvxims5iynm90svp-python3.11-gradio-3.50.2.drv' failed to build
error: 4 dependencies of derivation '/nix/store/319dhdc5d7rqm1r041mvsgmg531wlly6-python3.11-sentence-transformers-2.2.2.drv' failed to build
error: 12 dependencies of derivation '/nix/store/ry31z7w9nrxiz8bfpm454mx70a9wiwj3-python3-3.11.5-env.drv' failed to build
| 22:41:16 |
matthewcroughan | hmm.. tricky, I now need to figure out what else is depending on cmake | 22:44:10 |
matthewcroughan | nix-tree can probably tell me, though I don't have to do this that often | 22:44:24 |
matthewcroughan | adisbladis: https://github.com/nix-community/poetry2nix/blob/master/overrides/default.nix#L2997-L3000 | 22:56:46 |
matthewcroughan | I ran into this case just now where I had to set the preConfigure for scipy to "", because it doesn't work with the newer version, is that a common thing that has to be done? | 22:57:10 |
matthewcroughan | Without saying if version x then do x else y, that's going to be unavoidable, like is done for the Linux kernel in Nixpkgs | 22:57:59 |