Linux Compiling LuxCore

Use this forum for general user support and related questions.
Fox
Posts: 380
Joined: Sat Mar 31, 2018 11:17 am

Linux Compiling LuxCore

Post by Fox » Mon Feb 10, 2020 2:45 pm

I'm stuck with compiling on Linux with gcc at Boost failing to find Python.
Python3 and Python3 dev are installed and i have edited the build script at PYTHON_INCLUDE=`find /usr/include to correct location in kUbuntu 19.10

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

Re: Linux Compiling LuxCore

Post by Dade » Mon Feb 10, 2020 3:02 pm

You can use something like:

Code: Select all

cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m .
What error do you get ?
Support LuxCoreRender project with salts and bounties

Fox
Posts: 380
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox » Mon Feb 10, 2020 3:37 pm

Error log:

Code: Select all

./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/list.o" "libs/python/src/list.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/list.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/dict.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/dict.hpp:8,
                 from libs/python/src/dict.cpp:4:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/dict.o" "libs/python/src/dict.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/dict.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/long.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/long.hpp:8,
                 from libs/python/src/long.cpp:5:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/long.o" "libs/python/src/long.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/long.o...
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/util/gregorian.o
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/tuple.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/tuple.hpp:8,
                 from libs/python/src/tuple.cpp:5:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/tuple.o" "libs/python/src/tuple.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/tuple.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/module.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/scope.hpp:8,
                 from libs/python/src/module.cpp:9:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/module.o" "libs/python/src/module.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/module.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/import.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/ssize_t.hpp:9,
                 from ./boost/python/object.hpp:8,
                 from ./boost/python/import.hpp:8,
                 from libs/python/src/import.cpp:6:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/import.o" "libs/python/src/import.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/import.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/object_protocol.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/object_protocol.hpp:8,
                 from libs/python/src/object_protocol.cpp:6:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -w -mtune=generic -mno-ssse3 -std=gnu++98 -mmmx -msse -msse2 -O2 -pipe -mfpmath=sse -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/local/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/object_protocol.o" "libs/python/src/object_protocol.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-9.2.1/release/link-static/threading-multi/object_protocol.o...
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/std/std_backend.o
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/shared/mo_lambda.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/winmain.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/split.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/config_file.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/variables_map.o
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/shared/message.o
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/std/numeric.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/options_description.o
gcc.compile.c++ bin.v2/libs/locale/build/gcc-9.2.1/release/link-static/threading-multi/posix/numeric.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/parsers.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/cmdline.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-9.2.1/release/link-static/threading-multi/value_semantic.o
...failed updating 7 targets...
...updated 6642 targets...
 !!! Boost compilation failed
human@human:~/LinuxCompile$ 

Where do i insert the cmake code line?

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

Re: Linux Compiling LuxCore

Post by Dade » Mon Feb 10, 2020 4:31 pm

Fox wrote:
Mon Feb 10, 2020 3:37 pm
Where do i insert the cmake code line?
They are additional parameters for when you call cmake. Important: erase CMakeCache.txt file if you are not starting from a fresh copy. Just try to do this after you get the error:

Code: Select all

cd LuxCore
rm CMakeCache.txt
cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m .
make -j 24
* /usr/lib/x86_64-linux-gnu/libpython3.7m.so and /usr/include/python3.7m are the path to python stuff
* 24 is the number of threads to use for the compilation.

It should work.
Support LuxCoreRender project with salts and bounties

Fox
Posts: 380
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox » Mon Feb 10, 2020 5:08 pm

I removed the CMakeCache.txt and target folder and run:
cd LinuxCompile
./build-64-sse2 cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m . make -j 16

Another error:

Code: Select all

human@human:~$ cd LinuxCompile
human@human:~/LinuxCompile$ ./build-64-sse2 cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m . make -j 16
 *** BUILDING FOR X86-64 (SSE2) ***
 * LuxCore static enabled
 * OpenCL enabled
 * Using GCC compiler
 * Checking distfiles
boost_1_67_0.tar.gz
bzip2-1.0.6.tar.gz
c-blosc-1.17.1-bin.tgz
embree-3.2.4.x86_64.linux.tar.gz
freetype-2.4.11.tar.bz2
ilmbase-2.2.0.tar.gz
jpegsrc.v6b.tar.gz
libpng-1.5.26.tar.xz
oidn-1.0.0.x86_64.linux.tar.gz
oiio-Release-1.8.11.tar.gz
openexr-2.2.0.tar.gz
qt-5.12.2.tar.gz
tbb2018_20180312oss_lin.tgz
tiff-4.0.3.tar.gz
xz-5.0.5.tar.xz
zlib-1.2.8.tar.gz
 * Done checking distfiles
 * Checking target tree
 * Target tree is absent, populating
mkdir: created directory '/home/human/LinuxCompile/target-64-sse2'
mkdir: created directory '/home/human/LinuxCompile/target-64-sse2/bin'
mkdir: created directory '/home/human/LinuxCompile/target-64-sse2/include'
mkdir: created directory '/home/human/LinuxCompile/target-64-sse2/lib'
mkdir: created directory '/home/human/LinuxCompile/target-64-sse2/share'
 * Done creating target tree
 * Checking libstdc++
 * Library symlink is missing, attempting to figure out the proper location
 * Found at /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a
 * Updating symlink
'/home/human/LinuxCompile/target-64-sse2/lib/libstdc++.a' -> '/usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a'
 * Done checking libstdc++
 * Checking python
 * Library symlink is missing, attempting to figure out the proper location
 * Found at /usr/lib/x86_64-linux-gnu/libpython3.7m.a
 * Updating symlink
'/home/human/LinuxCompile/target-64-sse2/lib/libpython3.7.a' -> '/usr/lib/x86_64-linux-gnu/libpython3.7m.a'
 * Done checking python
 * Checking LuxMark scenes
 * Done LuxMark scenes
 * Prechecks completed

 * Using Python library path: /home/human/LinuxCompile/target-64-sse2/lib/libpython3.7.a
 * Using Python include path: /usr/include/x86_64-linux-gnu/python3.7m


 * Installing STANDALONE version at /home/human/LinuxCompile/target-64-sse2/cmake
cp: cannot stat 'cmake/lib/pyluxcoretools.zip': No such file or directory
cp: cannot stat 'cmake/bin/luxcoreui': No such file or directory
cp: cannot stat 'cmake/lib/*.so': No such file or directory
cp: cannot stat '/home/human/LinuxCompile/target-64-sse2/lib/libOpenImageDenoise.so.0': No such file or directory
cp: cannot stat '/home/human/LinuxCompile/target-64-sse2/lib/libembree3.so.3': No such file or directory
cp: cannot stat '/home/human/LinuxCompile/target-64-sse2/lib/libtbb.so.2': No such file or directory
cp: cannot stat '/home/human/LinuxCompile/target-64-sse2/lib/libtbbmalloc.so.2': No such file or directory
cp: cannot stat 'cmake/README.md': No such file or directory
cp: cannot stat 'cmake/COPYING.txt': No such file or directory
cp: cannot stat 'cmake/AUTHORS.txt': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/cornell.cfg': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/cornell.scn': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/Khaki.ply': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/HalveRed.ply': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/DarkGreen.ply': No such file or directory
cp: cannot stat 'cmake/scenes/cornell/Grey.ply': No such file or directory
cmake/
cmake/scenes/
cmake/scenes/cornell/

 * Installed successfully to /home/human/LinuxCompile/target-64-sse2/cmake
 * DONE
human@human:~/LinuxCompile$ 


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

Re: Linux Compiling LuxCore

Post by Dade » Mon Feb 10, 2020 7:37 pm

Uh ? No, you run:

Code: Select all

cd LinuxCompile
./build-64-sse2 <name of the LuxCore directory>
[you get an error]
cd <name of the LuxCore directory>
rm CMakeCache.txt
cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m .
make -j 24
Support LuxCoreRender project with salts and bounties

Fox
Posts: 380
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox » Mon Feb 10, 2020 9:22 pm

:roll:

Code: Select all

 !!! Boost compilation failed
human@human:~/LinuxCompile$ cd opencl
human@human:~/LinuxCompile/opencl$ rm CMakeCache.txt
rm: cannot remove 'CMakeCache.txt': No such file or directory
human@human:~/LinuxCompile/opencl$ cmake -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m .
CMake Error: The source directory "/home/human/LinuxCompile/opencl" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
human@human:~/LinuxCompile/opencl$ make -j 16
make: *** No targets specified and no makefile found.  Stop.

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

Re: Linux Compiling LuxCore

Post by Dade » Mon Feb 10, 2020 9:39 pm

I have the feeling you have never used Linux/Unix command line :?:
Support LuxCoreRender project with salts and bounties

Fox
Posts: 380
Joined: Sat Mar 31, 2018 11:17 am

Re: Linux Compiling LuxCore

Post by Fox » Mon Feb 10, 2020 9:43 pm

Dade wrote:
Mon Feb 10, 2020 9:39 pm
I have the feeling you have never used Linux/Unix command line :?:
Yes :)

User avatar
u3dreal
Developer
Posts: 230
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: Linux Compiling LuxCore

Post by u3dreal » Mon Feb 10, 2020 10:58 pm

Fox wrote:
Mon Feb 10, 2020 9:43 pm
Dade wrote:
Mon Feb 10, 2020 9:39 pm
I have the feeling you have never used Linux/Unix command line :?:
Yes :)
Why do you bother to compile it when there is a nightly build almost every day ?

I decided to get azurepipeline going for macos since i was tiered of compiling every day :)

You will get a highly optimized build for linux ! just by downloading. :)

If you want to learn it you have to dive into how the terminal works first. It would be so much easier to help you then.

This way we can only guess which is hard to follow. Try to find some basic tutorial.

Don't get me wrong you are more then welcome here. :!:
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - High Sierra
Xeon X5650@4Ghz, 2x GTX 770 Phantom - High Sierra, Windows 10, Ubuntu 18.04

Post Reply