Linux Compiling LuxCore

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.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

I did manual numpy build as shared lib and renamed it to static lib without the 37 end,
got everything compiled, maybe.

Windows has this extra 2, OpenImageIO.dll pyluxcore.pyd
Are they not needed for Linux?

I have the libOpenImageIOBase.a and few smaller files.

How do i run the luxcore tools?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Linux Compiling LuxCore

Post by Dade »

Fox wrote: Fri Feb 14, 2020 5:00 am How do i run the luxcore tools?
"python3 lib/pyluxcoretools.zip help"
Support LuxCoreRender project with salts and bounties
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

Dade wrote: Fri Feb 14, 2020 9:48 am "python3 lib/pyluxcoretools.zip help"
It's small file, not sure how to run the network node.
The entire LuxCore-opencl.tar.bz2 is only 70 MB, same like Azure auto build.
pyluxcoretools.zip file.png
The cornell.scn is missing too
Unable to parse PLY file './Khaki.ply'
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Linux Compiling LuxCore

Post by Dade »

Fox wrote: Fri Feb 14, 2020 2:35 pm
Dade wrote: Fri Feb 14, 2020 9:48 am "python3 lib/pyluxcoretools.zip help"
It's small file, not sure how to run the network node.
Run "python3 pyluxcoretools.zip help" and it will print an help: just run "python3 pyluxcoretools.zip netnode" for a network node.
Support LuxCoreRender project with salts and bounties
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

Dade wrote: Fri Feb 14, 2020 2:56 pm Run "python3 pyluxcoretools.zip help" and it will print an help: just run "python3 pyluxcoretools.zip netnode" for a network node.

Code: Select all

human@human:~/Documents/LuxCore-opencl$ python3 pyluxcoretools.zip help
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "pyluxcoretools.zip/__main__.py", line 40, in <module>
  File "pyluxcoretools.zip/pyluxcoretools/pyluxcoreconsole/cmd.py", line 26, in <module>
    The `default' method may be overridden to intercept commands for which there
ImportError: libboost_numpy37.so.1.67.0: cannot open shared object file: No such file or directory
Hmmm, libboost_numpy37.so.1.67.0 was the one that i renamed to libboost_numpy.a, when i did manual numpy build as static lib gives error:

Code: Select all

relocation R_X86_64_PC32 against symbol `BOOST_NUMPY_ARRAY_API'
Recompile with -fPICl disabled or something
I guess i can not rename it, and should compile again.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

Error output with static libboost_numpy.a + shared libboost_numpy37.so.1.67.0 both together in lib folder.

Code: Select all

[ 98%] Built target luxcoreui
[ 99%] Linking CXX shared module ../../lib/pyluxcore.so
/usr/bin/ld: /home/human/LinuxCompile/target-64-sse2/lib/libboost_numpy.a(dtype.o): relocation R_X86_64_PC32 against symbol `BOOST_NUMPY_ARRAY_API' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/luxcore/CMakeFiles/pyluxcore.dir/build.make:229: lib/pyluxcore.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:579: src/luxcore/CMakeFiles/pyluxcore.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
 !!! luxrays luxcore pyluxcore luxcoreui compilation failed
human@human:~/LinuxCompile$ 
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

I changed the build script little, for boost.

Code: Select all

	if ! ./bootstrap.sh --with-toolset=$TOOLSET --without-icu --prefix=$TARGET/boost \
	--with-python-version=3.7 ; then
		echo " * Miauuuuuuuu"
		exit 1
	fi
	sleep $PAUSE
	if ./b2.......................
For python i have:

Code: Select all

PYTHON_LIB=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a
PYTHON_INCLUDE=/usr/include/python3.7m/
Now boost builds the python and numpy libs with no errors. Build goes from stage 1 to 5 with no issues.

Python3 console part works, but ui not. I get PySide2 errors with QT.

Code: Select all

human@human:~$ cd /home/human/Documents/LuxCore-opencl/
human@human:~/Documents/LuxCore-opencl$ python3 pyluxcoretools.zip help
usage: pyluxcoretools.zip [commandToExecute]

PyLuxCoreTool

positional arguments:
  commandToExecute  help, console, merge, netconsole, netconsoleui, netnode or
                    netnodeui
human@human:~/Documents/LuxCore-opencl$ python3 pyluxcoretools.zip netconsole
[MainThread][2020-02-15 02:01:56,096] LuxCore 2.3beta1
usage: pyluxcoretools.zip [-s SECS] [-f SECS] [-n IPADDRESS [IPADDRESS ...]]
                          [-d] [-h]

PyLuxCoreNetConsole

optional arguments:
  -s SECS, --stats-period SECS
                        node statistics print period
  -f SECS, --film-period SECS
                        node film update period
  -n IPADDRESS [IPADDRESS ...], --nodes IPADDRESS [IPADDRESS ...]
                        rendering nodes ip addresses
  -d, --disable-auto-discover
                        disable node auto-discover
  -h, --help            Show this help message and exit
usage: pyluxcoretools.zip [-p SAMPLES_PER_PIXEL] [-t SECS]
                          [-n IPADDRESS [IPADDRESS ...]]
                          fileToRender

Render configuration options

positional arguments:
  fileToRender          .bcf file to render

optional arguments:
  -p SAMPLES_PER_PIXEL, --halt-spp SAMPLES_PER_PIXEL
                        samples/pixel halt condition
  -t SECS, --halt-time SECS
                        time halt condition
  -n IPADDRESS [IPADDRESS ...], --nodes IPADDRESS [IPADDRESS ...]
                        rendering nodes ip addresses
                        
                        
                        
                        
                        
human@human:~/Documents/LuxCore-opencl$ python3 pyluxcoretools.zip netconsoleui
FIXME Subscripted generics cannot be used with class and instance checks
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "pyluxcoretools.zip/__main__.py", line 66, in <module>
  File "pyluxcoretools.zip/pyluxcoretools/pyluxcorenetconsole/ui.py", line 462, in main
  File "pyluxcoretools.zip/pyluxcoretools/pyluxcorenetconsole/ui.py", line 453, in ui
  File "pyluxcoretools.zip/pyluxcoretools/pyluxcorenetconsole/ui.py", line 172, in __init__
  File "pyluxcoretools.zip/pyluxcoretools/pyluxcorenetconsole/mainwindow.py", line 17, in setupUi
TypeError: 'PySide2.QtWidgets.QWidget' called with wrong argument types:
  PySide2.QtWidgets.QWidget(MainApp)
Supported signatures:
  PySide2.QtWidgets.QWidget(typing.Union[PySide2.QtWidgets.QWidget, NoneType] = None, PySide2.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags))
human@human:~/Documents/LuxCore-opencl$ 

User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Linux Compiling LuxCore

Post by Dade »

Fox wrote: Sat Feb 15, 2020 12:04 am Python3 console part works, but ui not. I get PySide2 errors with QT.
It looks like a problem in the PySide2 version you have installed: you may need something older or newer, it depends on what you have installed.
Support LuxCoreRender project with salts and bounties
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

Dade wrote: Sat Feb 15, 2020 12:33 pm It looks like a problem in the PySide2 version you have installed: you may need something older or newer, it depends on what you have installed.
It's the latest pyside2 5.14.1
I will check the older versions.
Pyside2 version.png
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox »

I went to the pyside2 version that worked in Windows (5.12.3).
Still same error:
TypeError: 'PySide2.QtWidgets.QWidget' called with wrong argument types: PySide2.QtWidgets.QWidget(MainApp)
Post Reply