Compiling Luxcore Blender

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Compiling Luxcore Blender

Post by mroy »

Okay, I recently scored a RTX 3070 after a six month wait and excited as I was to have it, I find it has been trouble for me with Blender. I need Blender version 2.92 to support my RTX 3070 with CUDA 11.2. Luxcore v2.4 installs in Blender 2.92 but doesn't enable CUDA for some reason but OpenCL works fine except for the memory leak which means I can't render animations in Luxcore (and ILuxcore is SO MUCH BETTER so I don't want to go back to Cycles). Luxcore 2.5_rc1 doesn't install in Blender 2.92 at all (and even if it did it seems you can do material animations). So I thought I'd grab the recent LuxBlender source to compile it. Then back port the OpenCL memory fix as the fix is quite easy in the code.

I get two issues and unfortunately I am not a cmake wizard though I have be a C developer for 20 years.


-- Could NOT find Boost (missing: python numpy) (found suitable version "1.74.0", minimum required is "1.56.0")

I have boot 1.74.0 install with numpy
/usr/lib64/libboost_numpy38.so.1.74.0
/usr/lib64/libboost_numpy38.so
/usr/lib64/libboost_numpy38-mt.so


I have python boost and numpy installed
/usr/lib64/python3.8/site-packages/mesonbuild/dependencies/boost.py

/usr/lib64/python3.8/site-packages/numpy
/usr/lib64/python3.8/site-packages/numpy/core/include/numpy
/usr/lib64/python3.8/site-packages/numpy/core/include/numpy/_numpyconfig.h
/usr/lib64/python3.8/site-packages/numpy/core/include/numpy/numpyconfig.h
/usr/lib64/python3.8/site-packages/numpy/core/generate_numpy_api.py


What does it mean it can't find python numpy. What am I missing?

Last is this. How do I set it to choose LIBGLVND instead of legacy?

CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:305 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/libGLX.so

TIA for any help in advance.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compiling Luxcore Blender

Post by Dade »

mroy wrote: Fri Apr 09, 2021 1:59 pm -- Could NOT find Boost (missing: python numpy) (found suitable version "1.74.0", minimum required is "1.56.0")
v2.5rc1 works with Blender v2.92 (it doesn't with v2.93alpha because Blender has changed Python version) so it is probably simpler to go back and find why it doesn't work for you.

Anyway, you are following the procedure at https://github.com/LuxCoreRender/LinuxCompile, right ? Check the "Requirements" section. You probably need to install numpy(-dev) on your system and recompile everything (Boost was compiled without numpy in your case). "LinuxCompile" uses its private version of Boost (v1.71), not the system one (v1.74 in your case).
Support LuxCoreRender project with salts and bounties
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Re: Compiling Luxcore Blender

Post by mroy »

Thanks, Dade.

I tried following https://github.com/LuxCoreRender/LinuxCompile but there is no first_run.sh script there so I am assuming that is for the LexCoreRender standalone, not the Blender Add-in.

I'll focus on why 2.5_rc1 doesn't work in 2.92. Do texture keyframes work in Blender 2.92 + LuxCore 2.5_rc1?
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Re: Compiling Luxcore Blender

Post by mroy »

Here's the error message after installing LuxCore Blender 2.5_rc1 in Blender 2.92 (which I know isn't supported). If this doesn't pop absolutely obvious to you then don't worry about it. I'm a persistent person, I'll eventually figure it out.

Traceback (most recent call last):
File "/home/mroy/temp/blender-2.92.0-linux64/2.92/scripts/modules/addon_utils.py", line 330, in enable
importlib.reload(mod)
File "/home/mroy/temp/blender-2.92.0-linux64/2.92/python/lib/python3.7/importlib/__init__.py", line 169, in reload
_bootstrap._exec(spec, module)
File "<frozen importlib._bootstrap>", line 630, in _exec
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/mroy/.config/blender/2.92/scripts/addons/BlendLuxCore/__init__.py", line 79, in <module>
auto_load.init()
File "/home/mroy/.config/blender/2.92/scripts/addons/BlendLuxCore/auto_load.py", line 25, in init
File "/home/mroy/.config/blender/2.92/scripts/addons/BlendLuxCore/auto_load.py", line 53, in get_all_submodules
def get_all_submodules(directory):
File "/home/mroy/.config/blender/2.92/scripts/addons/BlendLuxCore/auto_load.py", line 57, in iter_submodules
for name in sorted(iter_submodule_names(path)):
File "/home/mroy/temp/blender-2.92.0-linux64/2.92/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit_libnvrtc)
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Re: Compiling Luxcore Blender

Post by mroy »

So one last bit that is part of this. I swear before the RTX 3060 there was an option to choose CUDA or OpenCL in BlednerLuxCore 2.4. Now it seems I can only use OpenCL which doesn't work for animations.

Am I wrong? Wasn't there an option in Addons menu for CUDA/OpenCL?

I sudden;y have no way to render animations in LuxCore because of the newer GPU.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compiling Luxcore Blender

Post by Dade »

The error seems related to NVRTC (Nvidia Run Time Compiler). I have never seen it before. Are you sure your Nvidia driver is working ? Does Cycles work ? LuxMark ?
Support LuxCoreRender project with salts and bounties
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Re: Compiling Luxcore Blender

Post by mroy »

Yes, Cycles works fine. Other CUDA test programs work. I'll try Luxmark next week and see what happens.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Compiling Luxcore Blender

Post by Dade »

You should have a libnvrtc.so under ~/.config/blender/2.92/scripts/addons/BlendLuxCore/bin directory:

Code: Select all

david@Desktop-3900x:~/projects/luxcorerender/LuxCore$ ls -l ~/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so
-rwxr-xr-x 1 david david 22293896 Nov 21 11:36 /home/david/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so
Try to run this to check the dependencies:

Code: Select all

david@Desktop-3900x:~/projects/luxcorerender/LuxCore$ ldd ~/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so
	linux-vdso.so.1 (0x00007ffe507cb000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fef28a57000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fef28a4c000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fef28a46000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fef288f7000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fef28705000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fef2a282000)
Support LuxCoreRender project with salts and bounties
mroy
Posts: 18
Joined: Mon Mar 29, 2021 12:48 pm

Re: Compiling Luxcore Blender

Post by mroy »

So there it is

mroy@orionspace ~/temp/blender-2.92.0-linux64 $ ldd ~/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so
ldd: warning: you do not have execution permission for `/home/mroy/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so'
linux-vdso.so.1 (0x00007fff70110000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcfa07d7000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcfa07cd000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcfa07c8000)
libm.so.6 => /lib64/libm.so.6 (0x00007fcfa068f000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcfa04cf000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcfa2027000)


I did:

chmod 750 ~/.config/blender/2.92/scripts/addons/BlendLuxCore/bin/libnvrtc.so

Started Blender 2.92 and enabled BlenderLuxCore. No problems . Chose CUDA, rendered a few blends, and tested the emission.blend from the post about Shading key frames not working, and all is well, including the material animation. Maybe that's wrong in the dist file. Not sure. I'll uninstall and reinstall later to check.

Thanks!
Post Reply