Compiling on Linux
Posted: Thu Feb 01, 2018 11:34 am
@Dade
After recent embree findmodule changes i found the keywords should be in other order else
an precedence of systemwide libs vs. repo libs happens.
My working diff:
Sidenote: be aware the embree 2.17.ff now depends on libtbbmalloc too, so it should be distributed ( but must not linked to luxcore ).
This especially is relevant for the script.
If you wonder about the pathes: i typically do "patchelf --set-rpath '$ORIGIN' libembree.so.2" to assure embree does NOT use system libs.
Such makes a preload bash-script obsolete in case.
One can also cover both actual structures we have ( example ) :
This will look in runpath first, then runpath/../lib, then system. Could be used in the SET(CMAKE_INSTALL_RPATH "bla:blubb")
EDIT: cp/paste typo
Away from this tested just both script or direct make is pretty straightforward on linux as is.
Jens
After recent embree findmodule changes i found the keywords should be in other order else
an precedence of systemwide libs vs. repo libs happens.
My working diff:
Code: Select all
+++ b/cmake/Packages/FindEmbree.cmake
@@ -23,7 +23,7 @@ IF (NOT EMBREE_INCLUDE_PATH)
/opt/local/include)
ENDIF()
-FIND_LIBRARY(EMBREE_LIBRARY NAMES embree libembree.so.2 PATHS
+FIND_LIBRARY(EMBREE_LIBRARY NAMES libembree.so.2 embree PATHS
${EMBREE_ROOT}/lib/x64
${EMBREE_ROOT}/lib
${EMBREE_ROOT}/build
@@ -37,7 +37,7 @@ IF (NOT EMBREE_LIBRARY)
ENDIF()
# Embree requires Intel TBB library
-FIND_LIBRARY(TBB_LIBRARY NAMES tbb libtbb.so.2 PATHS
+FIND_LIBRARY(TBB_LIBRARY NAMES libtbb.so.2 tbb PATHS
${EMBREE_ROOT}/lib/x64
${EMBREE_ROOT}/lib
${EMBREE_ROOT}/build
This especially is relevant for the
Code: Select all
./build-64-sse2 LuxCore-opencl 5
Code: Select all
ldd libembree.so.2
linux-vdso.so.1 => (0x00007ffcb23fc000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc6c1c23000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc6c1a1f000)
libtbb.so.2 => /media/Workdata3/Development/Lux_dev/linux_reboot/BlendLuxCore/bin/./libtbb.so.2 (0x00007fc6c17c8000)
libtbbmalloc.so.2 => /media/Workdata3/Development/Lux_dev/linux_reboot/BlendLuxCore/bin/./libtbbmalloc.so.2 (0x00007fc6c1574000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc6c1270000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc6c0f6a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc6c0d54000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc6c098b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc6c43b1000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc6c0783000)
Such makes a preload bash-script obsolete in case.
One can also cover both actual structures we have ( example ) :
Code: Select all
patchelf --set-rpath '$ORIGIN:$ORIGIN/../lib' luxcoreui
EDIT: cp/paste typo
Away from this tested just both script or direct make is pretty straightforward on linux as is.
Jens