!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

323 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
24 Mar 2024
@leonardp:matrix.orgleonardp latenighticecream: i think your problems go deeper 15:11:13
@leonardp:matrix.orgleonardp:/15:11:18
@leonardp:matrix.orgleonardpi do not think the dependencies are built correctly at all15:11:55
@leonardp:matrix.orgleonardp

id basically did:

nix develop
cd src
poetry add drjit
poetry remove mitsuba
15:12:37
@leonardp:matrix.orgleonardpan the tried an example from: https://drjit.readthedocs.io/en/latest/firststeps-py.html#signed-distance-functions-and-sphere-tracing15:12:59
@leonardp:matrix.orgleonardpeverything seems to be fine (i.e. importing) until you execute some function15:13:44
@leonardp:matrix.orgleonardp RuntimeError: jit_init_thread_state(): the LLVM backend is inactive because the LLVM shared library ("libLLVM.so") could not be found! Set the DRJIT_LIBLLVM_PATH environment variable to specify its path.
then you will see some errors like this
15:14:12
@leonardp:matrix.orgleonardp

which also kind of happens when trying to use mitsuba from your example:

Python 3.10.13 (main, Aug 24 2023, 12:59:26) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mitsuba
Traceback (most recent call last):
  File "/nix/store/l5r75mhpmmnw4d02mb4gcl9s19qz5da7-python3-3.10.13-env/lib/python3.10/site-packages/mitsuba/__init__.py", line 39, in <module>
    _import('mitsuba.mitsuba_ext')
  File "/nix/store/50kabpj0s79040a42b7jj2dxn85wmbfd-python3-3.10.13/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1176, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: libz.so.1: cannot open shared object file: No such file or directory

15:14:50
@leonardp:matrix.orgleonardpi think you will have to build some dependencies by hand15:18:45
@leonardp:matrix.orgleonardpi would start by trying to build drjit15:20:58
@leonardp:matrix.orgleonardpfor example you can look at: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/h3/default.nix and https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/blosc2/default.nix15:21:23
@leonardp:matrix.orgleonardpand maybe: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/lightgbm/default.nix15:22:33
@latenighticecream:matrix.orglatenighticecream
In reply to@leonardp:matrix.org
RuntimeError: jit_init_thread_state(): the LLVM backend is inactive because the LLVM shared library ("libLLVM.so") could not be found! Set the DRJIT_LIBLLVM_PATH environment variable to specify its path.
then you will see some errors like this
ahh I had this error before, as well.. I don't remember how I resolved it though.. Anyways, I will try building it by hand. I already built drjit before by hand, which worked on its own (although I also only tested importing). Mitsuba should then also not be too bloated as its only real dependency is drjit.
Thank you for your help! I will let you know when I made some progress :)
15:24:37
@latenighticecream:matrix.orglatenighticecreamI am wondering though if this "hybrid" approach will work with poetry2nix? Do I just put the python packages inside the packages of my shell? Since they wont be listed in my pyproject.toml15:26:45
@leonardp:matrix.orgleonardpnot so sure about that aswell, but i haven't done too much with poetry2nix you said that you don't really need the packages so you might get away with it15:28:28
@leonardp:matrix.orgleonardpdepending on how little you actually need the packages.. but i suspect only passing the import test will not suffice -.-15:30:23
@leonardp:matrix.orgleonardpbest of luck :)15:31:02
@latenighticecream:matrix.orglatenighticecreamthank you ! I will need that :D15:31:39
@latenighticecream:matrix.orglatenighticecreamSoo.. I'm kind of giving up. In the end I received the same LLVM library error as you showed before and am unable to get rid of it. drjit on its own works when built by hand, even with the sdf example you provided (mitsuba still produces the same error). But when I try to import sionna (the thing I actually need) said error appears. Unfortunately, it has already eaten way too much time without producing anything useful. But I learned a lot of nix on the way :) So I'm now going back to the impure versions with pip + venvs inside a shell18:26:03
@latenighticecream:matrix.orglatenighticecreamand thank you for your help nevertheless!18:28:02
@latenighticecream:matrix.orglatenighticecream* Soo.. I'm kind of giving up. In the end I received the same LLVM library error as you showed before and am unable to get rid of it. drjit on its own works when built by hand, even with the sdf example you provided (mitsuba still produces the same error). But when I try to import sionna (the thing I actually need) said error appears. Unfortunately, it already ate way too much time without producing anything useful. But I learned a lot of nix on the way :) So I'm now going back to the impure versions with pip + venvs inside a shell18:33:07
26 Mar 2024
@gsaurel:laas.frnim65s Hi there !
I have a question about https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md#modulenotfounderror-no-module-named-packagename.
Why do we have to add eg. poetry-core in overrides/build-systems.json (or in a overridePythonAttrs / buildInputs) as dependency of a package which has [build-system] \n requires = ["poetry-core"] in its pyproject.toml ? Couldn't we autodetect that ?
10:43:23
@k900:0upti.meK900 Because we can't read pyproject.toml at eval time 10:43:45
@k900:0upti.meK900Well, we can10:43:53
@k900:0upti.meK900But it would then mean we have to fetch the sources of the package at eval time10:44:04
@k900:0upti.meK900 * But it would then mean we have to fetch the sources of the package at eval time10:44:07
@k900:0upti.meK900Which will slow down evaluation massively and is probably a bad idea10:44:16
@gsaurel:laas.frnim65sok, for now we only get metadata from pypi ?10:44:18
@k900:0upti.meK900We don't get metadata from anywhere10:44:58
@k900:0upti.meK900Except poetry2nix itself and nixpkgs10:45:02

Show newer messages


Back to Room ListRoom Version: 6