!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

298 Members
https://github.com/nix-community/poetry2nix | Poetry2nix is unmaintained https://github.com/nix-community/poetry2nix/issues/186553 Servers

Load older messages


SenderMessageTime
23 Mar 2024
@leonardp:matrix.orgleonardpalso reading this issue more carefully helped: https://github.com/nix-community/poetry2nix/issues/147118:34:46
@leonardp:matrix.orgleonardp The template project passes the flake self to projectDir, which seems weird to me. 18:34:58
@leonardp:matrix.orgleonardp replacing self with ./. fixed the issue 18:35:25
@reckenrode:matrix.org@reckenrode:matrix.orgRedacted or Malformed Event20:05:25
24 Mar 2024
@latenighticecream:matrix.orglatenighticecream Hey, I'm back with mitsuba problems. My devshell builds fine but when I try to import the module in python, I get this (actually very nice) warning:
WARNING:root:The `mitsuba` package relies on `drjit`
and needs it to be installed at a specific location. 
Currently, `drjit` is located at 
"/nix/store/d0a6r1bz06sd6p5y7cy7dkai9qi8n79w-python3.10-drjit-0.4.4/lib/python3.10/site-packages/drjit"
when it is expected to be at
"/nix/store/9i58bxc70ya01jgq1x1k7843jgv5mjvw-python3.10-mitsuba-3.5.0/lib/python3.10/site-packages/drjit".
This can happen when both packages are not installed in the same Python environment.
You will very likely experience linking issues if you do not fix this.
Which later produces the error:
ImportError: The 'mitsuba' native modules could not be imported.
You're likely trying to use Mitsuba within a Python binary
(/nix/store/0raqv2didf2vabgx1rq6s2qrl9jwp004-python3-3.10.13-env/bin/python3.10)
that is different from the one for which the native module was compiled (/opt/python/cp310-cp310/bin/python).
So drjit is supposed to be over at the mitsuba derivation but it of course has its own. Is there any way to fix this?
Maybe the second output is not even related to this problem?
This is my current override:
overrides = poetry2nix.overrides.withDefaults (final: prev: {

  mitsuba = prev.mitsuba.overridePythonAttrs (old: {
    nativeBuildInputs = (old.buildInputs or [ ]) ++ [ final.drjit ];
    buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libllvm ];
  });
...
10:21:42
@latenighticecream:matrix.orglatenighticecream Ok, so I managed to kick out the first warning by doing this ugly stuff (just for debugging):
postFixup = pkgs.lib.strings.concatStrings [
  (old.postFixup or "")
  "\n"
  "ln -s ${final.drjit}/lib/python3.10/site-packages/drjit $out/lib/python3.10/site-packages/drjit"
];
so it is unrelated to the ImportError I mentioned previously. But then how can I fix the ImportError?
11:56:21
@leonardp:matrix.orgleonardp latenighticecream: not sure if that helps. but can you build drjit as a seperate package and then use it as a "normal" buildinput for mitsuba? 12:29:21
@leonardp:matrix.orgleonardpdo you have a github repo to share? i might be able to also take a look at it today12:30:21
@leonardp:matrix.orgleonardpi am very much interested in using mitsuba myself :)12:30:32
@latenighticecream:matrix.orglatenighticecream Thanks, I will try that out !
I don't have a repo for this, but i will create a temporary one for this. Currently, this is for my masters thesis which is a private repo for the time I work on it. The stupid thing is, I don't really want to use any of mitsuba - I am just trying to get a shell with sionna which requires this package, but only for things that I dont even need xD
12:51:12
@cloudcomputer:matrix.orgcloudcomputer joined the room.13:18:41
@cloudcomputer:matrix.orgcloudcomputerI am trying to update poetry2nix to work with a more recent nixpkgs, and I need some help with the darwin builds. I don't have access to a mac.13:19:51
@cloudcomputer:matrix.orgcloudcomputerhttps://github.com/nix-community/poetry2nix/pull/1559 is the PR13:20:16
@cloudcomputer:matrix.orgcloudcomputerIt looks like there's some issues with function pointer signatures with lxml, scipy and matplotlib (or some transitive dependency thereof)13:21:20
@leonardp:matrix.orgleonardp latenighticecream: welcome to dependency hell 🫠
if you can provide a minimal example repo (i.e. flake with drjit+mitsuba packages) i'd be willing to help
but i only have time to work on such projects on weekends
13:37:14
@leonardp:matrix.orgleonardpi wanted to try out mitsuba for photogrammetry13:37:35
@cloudcomputer:matrix.orgcloudcomputerRelated to this, all the cloud providers I've tried to use, including Scaleway and MacStadium seem to prohibit me from doing anything without first undergoing an account review. I'm using masked email address via fastmail, and I'm guessing they flag that or something.13:43:44
@cloudcomputer:matrix.orgcloudcomputer * Related to this, all the cloud providers I've tried to use, including Scaleway and MacStadium seem to prohibit me from doing anything without first undergoing an account review. I'm using masked email addresses via fastmail, and I'm guessing they flag that or something. 13:44:02
@cloudcomputer:matrix.orgcloudcomputerScaleway in particular was horrendous. They locked my account after I spun up an instance and continued to charge me for the instance after locking my account.13:45:13
@latenighticecream:matrix.orglatenighticecream
In reply to@leonardp:matrix.org
latenighticecream: welcome to dependency hell 🫠
if you can provide a minimal example repo (i.e. flake with drjit+mitsuba packages) i'd be willing to help
but i only have time to work on such projects on weekends
here it is: https://github.com/LateNightIceCream/poetry2nix-mitsuba
13:51:41
@leonardp:matrix.orgleonardpcool i'll look into it13:57:07
@latenighticecream:matrix.orglatenighticecream
In reply to@leonardp:matrix.org
cool i'll look into it
thank you !!
13:58:37
@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

Show newer messages


Back to Room ListRoom Version: 6