LuxCoreRender / BlendLuxCore

Blender Integration for LuxCore
GNU General Public License v3.0
733 stars 92 forks source link

Unable to activate addon #114

Closed mageaster closed 6 years ago

mageaster commented 6 years ago

System Information

Ubuntu MATE 16.04.4, Nvidia GeForce GTX 550Ti, driver version 384.111

Software Version

Error message from Blender console

Traceback (most recent call last):
  File "/usr/share/blender/2.79/scripts/modules/addon_utils.py", line 331, in enable
    mod = __import__(module_name)
  File "~/.config/blender/2.79/scripts/addons/BlendLuxCore/__init__.py", line 2, in <module>
    from .bin import pyluxcore
ImportError: ~/.config/blender/2.79/scripts/addons/BlendLuxCore/bin/libembree.so.2: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE

Short description of error

Addon installs, but unable to activate

Exact steps for others to reproduce the error

Launch Blender, install addon, try to activate.

Blender 2.79 official works nice.

leso-kn commented 6 years ago

okay, interesting! I'm using the same blender version on Ubuntu 16.04.5 (forgot to mention that in the specs) Did you change your setup since your last try?

mageaster commented 6 years ago

Everything except OS and driver's version is the same: hardware, locale etc.

leso-kn commented 6 years ago

Maybe it's related to the os then. I guess it's not necessarily been tried on 16.04..

leso-kn commented 6 years ago

As this is probably not hardware related, but because of linking, can we re-open the issue? @Dade916

mageaster commented 6 years ago

:~$ Downloads/blender-2.79b-linux-glibc219-x86_64/blender Read prefs: ~/.config/blender/2.79/config/userpref.blend found bundled python: ~/Downloads/blender-2.79b-linux-glibc219-x86_64/2.79/python Registered Animation Nodes with 497 modules. pyluxcore version: 2.0 Updating OpenCL device list [Exporter] Init Недопустимая инструкция (стек памяти сброшен на диск) (Illegal instruction (core dumped))

AndrewSmart commented 6 years ago

@leso-kn The problem is hardware related, our hardware doesn't support certain instructions. Dade916 can deploy this software with whatever optimizations his heart desires, and is wise to set those optimizations to best help the most people. I'd much rather he spend his expertise working on stuff far beyond my comprehension than this. Forum post.

I'm working through the Linux compilation. One solution could be to instead of statically linking against Boost (which is deployed with BlendLuxCore & LuxCore), it would be dynamically linked against, and the libboost.so built deployed with BlendLuxCore alongside the other three shared libraries (e.g. libtbb.so). In our circumstance, the distributed libboost.so could be just renamed/deleted, so that the system's libboost is used instead (e.g. libboost-chrono1.67.0 Debian package). This solution would result in affected end users (e.g. AMD Phenom II) not having to compile anything. Debian package policy strictly forbids CPU specific optimizations (unless both optimized & non are deployed), so there shouldn't be any problem with Debian's libboost (if there is it's a bug against that package).

I'll try to put in a pull request with this solution.

Stuff showing I'm also affected:

$ ./luxcoreui scenes/cornell/cornell.cfg
LuxCoreUI v2.0beta2 (LuxCore demo: http://www.luxcorerender.org)
[LuxCore][0.000] Configuration: 
[LuxCore][0.001]   film.width = "512"
[LuxCore][0.001]   film.height = "512"
[LuxCore][0.001]   image.filename = "cornell.png"
[LuxCore][0.001]   scene.file = "scenes/cornell/cornell.scn"
[SDL][0.001] Reading scene: scenes/cornell/cornell.scn
[SDL][0.001] Material definition: Khaki
Illegal instruction

And using gdb:

$ gdb ./luxcoreui
[...snip...]
Program received signal SIGILL, Illegal instruction.
0x0000000000984a2c in boost::uuids::detail::seed_rng::sha1_random_digest_() ()
(gdb) bt
#0  0x0000000000984a2c in boost::uuids::detail::seed_rng::sha1_random_digest_() ()
#1  0x00000000009815ca in luxrays::NamedObject::GetUniqueName(std::string const&) ()
#2  0x00000000007d4816 in slg::Scene::GetTexture(luxrays::Property const&) ()
#3  0x00000000007c9bd1 in slg::Scene::CreateMaterial(unsigned int, std::string const&, luxrays::Properties const&) ()
#4  0x00000000007d2a85 in slg::Scene::ParseMaterials(luxrays::Properties const&) ()
#5  0x00000000007273f2 in slg::Scene::Parse(luxrays::Properties const&) ()
#6  0x000000000072a653 in slg::Scene::Scene(luxrays::Properties const&, float) ()
#7  0x0000000000745c41 in slg::RenderConfig::RenderConfig(luxrays::Properties const&, slg::Scene*) ()
#8  0x0000000000639e9a in luxcore::detail::RenderConfigImpl::RenderConfigImpl(luxrays::Properties const&, luxcore::detail::SceneImpl*) ()
#9  0x0000000000630af2 in luxcore::RenderConfig::Create(luxrays::Properties const&, luxcore::Scene*) ()
#10 0x000000000051526b in main ()
$ cat /proc/cpuinfo
model name  : AMD Phenom(tm) II X6 1100T Processor
leso-kn commented 6 years ago

@AndrewSmart Thank you for this solution approach! I could run a test with your patches on my hardware if you want. Did you upload a patched version of the source already?

AndrewSmart commented 6 years ago

@leso-kn Thinking on this more I think using Debian package management would be better/broader solution than what I mentioned earlier... leaving their static Linux build alone.

I'll look into making a script to build a Debian "BlendLuxCore" package... essentially this but with appropriate dependencies. Resultant package can be installed with dpkg -i blender-luxcorerenderer_2.0.deb, and dpkg would install necessary blender, libboost, python, etc package versions.

EDIT: Related... requested Debian package. EDIT2: I believe I can do this all within CMakeLists.txt (cmake).

leso-kn commented 6 years ago

@AndrewSmart Sounds good too! Having a debian package would cover a lot of advantages. But i guess it's a bit more time consuming than just linking libboost dynamically. Maybe we can start off with that and ship the dynamically linked version with future debian packages when that task is taken on

Dade916 commented 6 years ago

If you find a way to modify the Boost building options (https://github.com/LuxCoreRender/LinuxCompile/blob/2d200db4982ea36f6d4decb0991a7d58da007eb0/build#L221) without SSS3 instructions, we can just use it as default procedure.

I'm pretty sure that the lack of SSS3 instruction will not have any impact on performance. It is just the default way Boost seems to be compiled.

AndrewSmart commented 6 years ago

If you find a way to modify the Boost building options without SSS3 instructions, we can just use it as default procedure.

@Dade916 Yes, '-mtune=generic -mno-ssse3' would work, but I've found LuxCore would still have ssse3 due to cmake/PlatformSpecific.cmake.

Proof with CMAKE_BUILD_TYPE=Release:

~/dev/LuxCoreRender/LuxCore$ gdb ./build/bin/luxcoreui
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
[...snip...]
(gdb) r scenes/cornell/cornell.cfg
Starting program: /media/crunchbang/nvidia1/dev/LuxCoreRender/LuxCore/build/bin/luxcoreui scenes/cornell/cornell.cfg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd5a00700 (LWP 11946)]
LuxCoreUI v2.1alpha4 (LuxCore demo: http://www.luxcorerender.org)
[LuxCore][0.001] Configuration: 
[LuxCore][0.001]   film.width = "512"
[LuxCore][0.001]   film.height = "512"
[LuxCore][0.001]   scene.file = "scenes/cornell/cornell.scn"
[LuxCore][0.001]   film.imagepipelines.0.0.type = "GAMMA_CORRECTION"
[LuxCore][0.001]   film.imagepipelines.0.0.value = "2.2"
[LuxCore][0.001]   film.outputs.2.type = "MATERIAL_ID_COLOR"
[LuxCore][0.001]   film.outputs.2.filename = "cornell_MATERIAL_ID_COLOR.png"
[SDL][0.001] Reading scene: scenes/cornell/cornell.scn
[SDL][0.001] Material definition: Khaki
[SDL][0.002] Material definition: HalveRed
[SDL][0.002] Material definition: DarkGreen
[SDL][0.002] Material definition: Light
[SDL][0.002] WARNING: deprecated property scene.camera.lookat
[SDL][0.002] Camera type: perspective
[SDL][0.002] Camera position: Point[-2.78, -8, 2.73]
[SDL][0.002] Camera target: Point[-2.78, 2, 2.73]
[SDL][0.002] Camera clipping plane disabled
[SDL][0.003] The Grey object is a light sources with 2 triangles
[SDL][0.003] Scene objects count: 4
[SDL][0.309] Camera type: perspective
[SDL][0.309] Camera position: Point[-2.78, -8, 2.73]
[SDL][0.309] Camera target: Point[-2.78, 2, 2.73]
[SDL][0.309] Camera clipping plane disabled
Film size adjusted: 512x512 (Frame buffer size: 512x512)
[LuxCore][0.309] Film resolution: 512x512
[SDL][0.316] Film output definition: RGB_IMAGEPIPELINE [image.png]
[SDL][0.317] Image pipeline: film.imagepipelines.0
[SDL][0.317] Image pipeline step 0: GAMMA_CORRECTION
[SDL][0.317] Film output definition: MATERIAL_ID_COLOR [cornell_MATERIAL_ID_COLOR.png]
[LuxRays][1.412] OpenCL Platform 0: Advanced Micro Devices, Inc.
[LuxRays][1.413] Device 0 name: NativeThread
[LuxRays][1.413] Device 0 type: NATIVE_THREAD
[LuxRays][1.413] Device 0 compute units: 1
[LuxRays][1.413] Device 0 preferred float vector width: 4
[LuxRays][1.413] Device 0 max allocable memory: 0MBytes
[LuxRays][1.413] Device 0 max allocable memory block size: 0MBytes
[LuxRays][1.413] Device 1 name: AMD Phenom(tm) II X6 1100T Processor
[LuxRays][1.413] Device 1 type: OPENCL_CPU
[LuxRays][1.413] Device 1 compute units: 6
[LuxRays][1.413] Device 1 preferred float vector width: 4
[LuxRays][1.413] Device 1 max allocable memory: 7966MBytes
[LuxRays][1.413] Device 1 max allocable memory block size: 2048MBytes
[LuxRays][1.413] Creating 6 intersection device(s)
[LuxRays][1.413] Allocating intersection device 0: NativeThread (Type = NATIVE_THREAD)
[LuxRays][1.413] Allocating intersection device 1: NativeThread (Type = NATIVE_THREAD)
[LuxRays][1.413] Allocating intersection device 2: NativeThread (Type = NATIVE_THREAD)
[LuxRays][1.413] Allocating intersection device 3: NativeThread (Type = NATIVE_THREAD)
[LuxRays][1.414] Allocating intersection device 4: NativeThread (Type = NATIVE_THREAD)
[LuxRays][1.414] Allocating intersection device 5: NativeThread (Type = NATIVE_THREAD)
[LuxCore][1.414] Configuring 6 CPU render threads
[LuxRays][1.414] Preprocessing DataSet
[LuxRays][1.414] Total vertex count: 64
[LuxRays][1.414] Total triangle count: 32
[LuxRays][1.414] Preprocessing DataSet done
[LuxRays][1.414] Adding DataSet accelerator: EMBREE
[LuxRays][1.414] Total vertex count: 64
[LuxRays][1.414] Total triangle count: 32
[New Thread 0x7fffc4a56700 (LWP 11949)]
[New Thread 0x7fffbffff700 (LWP 11950)]
[New Thread 0x7fffc4655700 (LWP 11951)]
[New Thread 0x7fffbfbfe700 (LWP 11952)]
[New Thread 0x7fffbf7fd700 (LWP 11953)]
[LuxRays][1.434] EmbreeAccel build time: 17ms
[New Thread 0x7fffbe3f8700 (LWP 11954)]
[New Thread 0x7fffbdbf7700 (LWP 11955)]
[New Thread 0x7fffbd3f6700 (LWP 11956)]
[New Thread 0x7fffbcbf5700 (LWP 11957)]
[New Thread 0x7fff9ffff700 (LWP 11958)]
[New Thread 0x7fff9f7fe700 (LWP 11959)]
[LuxCore][1.465] Film OpenCL image pipeline
[New Thread 0x7fff9effd700 (LWP 11960)]
[New Thread 0x7fff9e7fc700 (LWP 11961)]
[New Thread 0x7fff9dffb700 (LWP 11962)]
[New Thread 0x7fff9d7fa700 (LWP 11963)]
[New Thread 0x7fff9cff9700 (LWP 11964)]

Program received signal SIGILL, Illegal instruction.
0x000055555584da42 in ImDrawList::AddConvexPolyFilled(ImVec2 const*, int, unsigned int, bool) ()
(gdb) display/i $pc
1: x/i $pc
=> 0x55555584da42 <_ZN10ImDrawList19AddConvexPolyFilledEPK6ImVec2ijb+242>:  pshufb 0x756635(%rip),%xmm5        # 0x555555fa4080

To solve said problem, I propose two release CMAKE_BUILD_TYPE types, which I have implemented:

See an example difference in instruction sets here.

AndrewSmart commented 6 years ago

I'm thinking 3 packages:

For sure, you would know far better than I how everything should be organized, and what all should be included. It is the cmake 'install' clauses which dictate what is put into which package.

Here is my packaging progress so far, all generated from CMake:

$ dpkg-deb -I luxcorerender2.1alpha4.deb 
 new debian package, version 2.0.
 size 33883306 bytes: control archive=1278 bytes.
    2016 bytes,    17 lines      control              
     360 bytes,     6 lines      md5sums              
 Package: luxcorerender-unspecified
 Version: 2.1alpha4.0
 Section: graphics
 Priority: optional
 Architecture: amd64
 Depends: libblosc1, embree3-lib, libatk1.0-0 (>= 1.12.4), libboost-atomic1.67.0, libboost-chrono1.67.0, libboost-date-time1.67.0, libboost-filesystem1.67.0, libboost-iostreams1.67.0, libboost-numpy1.67.0, libboost-program-options1.67.0, libboost-python1.67.0, libboost-regex1.67.0, libboost-serialization1.67.0, libboost-system1.67.0, libboost-thread1.67.0, libc6 (>= 2.17), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgcc1 (>= 1:3.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.16.0), libglu1-mesa | libglu1, libgomp1 (>= 4.9), libgtk-3-0 (>= 3.0.0), libilmbase12 (>= 2.2.0), libjpeg62-turbo (>= 1.3.1), libopenexr22, libopenimageio1.6, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpng16-16 (>= 1.6.2-1), libpython3.5 (>= 3.5.0~b1), libstdc++6 (>= 5.2), libtbb2, libtiff5 (>= 4.0.3), libx11-6 (>= 2:1.2.99.901), libxcursor1 (>> 1.1.2), libxi6 (>= 2:1.2.99.4), libxinerama1, libxrandr2 (>= 2:1.2.99.3), libxxf86vm1, ocl-icd-libopencl1 | libopencl1, ocl-icd-libopencl1 (>= 1.0) | libopencl-1.1-1, ocl-icd-libopencl1 (>= 1.0) | libopencl-1.2-1, zlib1g (>= 1:1.2.0)
 Recommends: luxcorerender-scenes
 Homepage: https://github.com/LuxCoreRender/LuxCore
 Installed-Size: 114363
 Maintainer: nobody@nobody.com
 Description: LuxCoreRender is a physically correct, unbiased rendering engine. It is built on physically based equations that model the transportation of light. This allows it to accurately capture a wide range of phenomena which most other rendering programs are simply unable to reproduce.
    You can find more information about at https://www.luxcorerender.org

    LuxCore library is the new LuxCoreRender v2.x C++ and Python API. It is released under Apache Public License v2.0 and can be freely used in open source and commercial applications.

    You can find more information about the API at https://wiki.luxcorerender.org/LuxCore_API
$ dpkg-deb -I luxcorerender-scenes2.1alpha4.deb
 new debian package, version 2.0.
 size 39448034 bytes: control archive=11433 bytes.
     317 bytes,    12 lines      control              
   35758 bytes,   395 lines      md5sums              
 Package: luxcorerender-scenes
 Version: 2.1alpha4.0
 Section: graphics
 Priority: optional
 Architecture: amd64
 Depends: libblosc1
 Homepage: https://github.com/LuxCoreRender/LuxCore
 Enhances: luxcorerender
 Installed-Size: 118052
 Maintainer: nobody@nobody.com
 Description: Contains sample scenes usable by luxcorerender.

I don't have a blender-luxcorerender prototype yet. The dependencies do need some tuning, like allowing the NVIDIA/AMD ocl-icd-libopencl1 counterparts. Note I have set luxcorerender to 'recommends' luxcorerender-scenes, and luxcorerender-scenes to 'enhances' luxcorerender. And for reference, let's look at the 'blender' package:

$ dpkg-deb -I /tmp/blender_2.79.b+dfsg0-1_deb9u1_arm64.deb 
 new debian package, version 2.0.
 size 21968312 bytes: control archive=1763 bytes.
    2069 bytes,    18 lines      control              
     457 bytes,     7 lines      md5sums              
     166 bytes,     9 lines   *  postinst             #!/bin/sh
     389 bytes,    12 lines   *  prerm                #!/bin/sh
 Package: blender
 Version: 2.79.b+dfsg0-1~deb9u1
 Architecture: arm64
 Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
 Installed-Size: 86285
 Depends: blender-data (= 2.79.b+dfsg0-1~deb9u1), fonts-dejavu, python3:any (>= 3.3.2-2~), libavcodec57 (>= 7:3.2.11) | libavcodec-extra57 (>= 7:3.2.11), libavdevice57 (>= 7:3.2.11), libavformat57 (>= 7:3.2.11), libavutil55 (>= 7:3.2.11), libboost-atomic1.62.0, libboost-chrono1.62.0, libboost-date-time1.62.0, libboost-filesystem1.62.0, libboost-locale1.62.0, libboost-regex1.62.0, libboost-system1.62.0, libboost-thread1.62.0, libc6 (>= 2.17), libfftw3-double3 (>= 3.3.5), libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:3.4), libgl1-mesa-glx | libgl1, libglew2.0 (>= 1.12.0), libglu1-mesa | libglu1, libgomp1 (>= 4.9), libilmbase12 (>= 2.2.0), libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125, libjemalloc1 (>= 2.1.1), libjpeg62-turbo (>= 1.3.1), libopenal1 (>= 1.14), libopencolorio1v5, libopenexr22, libopenimageio1.6, libopenjp2-7 (>= 2.0.0), libpcre3, libpng16-16 (>= 1.6.2-1), libpython3.5 (>= 3.5.0~b1), libsndfile1 (>= 1.0.20), libspnav0 (>= 0.2.2), libstdc++6 (>= 5.2), libswscale4 (>= 7:3.2.11), libtiff5 (>= 4.0.3), libx11-6, libxfixes3 (>= 1:4.0.1), libxi6 (>= 2:1.2.99.4), libxml2 (>= 2.7.4), libxxf86vm1, zlib1g (>= 1:1.2.3.4)
 Section: graphics
 Priority: optional
 Homepage: http://www.blender.org/
 Description: Very fast and versatile 3D modeller/renderer
  Blender is an integrated 3d suite for modelling, animation, rendering,
  post-production, interactive creation and playback (games). Blender has its
  own particular user interface, which is implemented entirely in OpenGL and
  designed with speed in mind. Python bindings are available for scripting;
  import/export features for popular file formats like 3D Studio and Wavefront
  Obj are implemented as scripts by the community. Stills, animations, models
  for games or other third party engines and interactive content in the form of
  a standalone binary are common products of Blender use.

Now a peek at the files:

$ dpkg-deb -c luxcorerender2.1alpha4.deb 
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/bin/
-rwxr-xr-x root/root  22820568 2018-10-08 05:17 ./usr/bin/luxcoreconsole
-rwxr-xr-x root/root  22825272 2018-10-08 05:17 ./usr/bin/luxcoredemo
-rwxr-xr-x root/root  22845096 2018-10-08 05:17 ./usr/bin/luxcorescenedemo
-rwxr-xr-x root/root  24523752 2018-10-08 05:55 ./usr/bin/luxcoreui
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/lib/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root  24052888 2018-10-08 05:18 ./usr/lib/x86_64-linux-gnu/pyluxcore.so
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/doc/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/doc/LuxRays/
-rw-r--r-- root/root     11358 2018-09-30 15:28 ./usr/share/doc/LuxRays/copyright
$ dpkg-deb -c luxcorerender-scenes2.1alpha4.deb
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/doc/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/doc/LuxRays/
-rw-r--r-- root/root     11358 2018-09-30 15:28 ./usr/share/doc/LuxRays/copyright
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/luxcorerender/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/luxcorerender/scenes/
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/luxcorerender/scenes/alloy/
-rw-r--r-- root/root    665012 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/alloy.blend
-rw-r--r-- root/root       305 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/alloy.cfg
-rw-r--r-- root/root      1418 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/alloy.scn
-rw-r--r-- root/root      1710 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/mat_alloy.ply
-rw-r--r-- root/root      1719 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/mat_metal.ply
-rw-r--r-- root/root    182366 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/alloy/mat_red.ply
drwxr-xr-x root/root         0 2018-10-08 22:39 ./usr/share/luxcorerender/scenes/bigmonkey/
[...snip...]
-rw-r--r-- root/root     53728 2018-09-30 15:28 ./usr/share/luxcorerender/scenes/studiotest/white.ply

Some warnings on libraries that don't appear to be used (FYI, IDK if important):

dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libjpeg.so.62 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libatk-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libIlmThread-2_2.so.12 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libgio-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libcairo.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libpng16.so.16 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libgdk-3.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libboost_atomic.so.1.67.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libcairo-gobject.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libImath-2_2.so.12 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libtiff.so.5 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libgdk_pixbuf-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libpango-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libpangocairo-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libboost_date_time.so.1.67.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/bin/luxcoreui was not linked against libGLU.so.1 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libboost_program_options.so.1.67.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libIex-2_2.so.12 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if ./usr/lib/x86_64-linux-gnu/pyluxcore.so ./usr/bin/luxcoreconsole ./usr/bin/luxcoredemo ./usr/bin/luxcorescenedemo ./usr/bin/luxcoreui were not linked against libIlmImf-2_2.so.22 (they use none of the library's symbols)

I have some plumbing in there for Ubuntu packaging, and rpm packaging, but I don't have the capacity/interest to test/validate those. But that is more a wishlist item anyway, those users do have the capacity to install Debian debs. CPack may improve distribution onto APPLE/Windows computers as well, with the relevant package generators.

Once the Debian packages are made, maybe Mr. Matteo F. Vescovi may be of help, as he appears to maintain the Debian blender and openimageio packages. But problems would need to be addressed first, like libembree packaging.

Also, I propose:

Both of which are distributed via Debian packages. If they are not found on the system, then cmake would include those sources from the source tree, e.g. add_subdirectory(deps/glfw-3.1.1). By doing this the binary size of the luxcorerender2.1alpha4.deb would be substantially reduced. I am quite tight on space, as is Mr. stig-atle.

Perhaps the scenes could be deployed compressed on a per scene basis? 120.8 MB -> 27.1MB via .tar.lzma, e.g.

/usr/share/luxcorerender/scenes/alloy.tar.lzma
/usr/share/luxcorerender/scenes/bigmonkey.tar.lzma
[...snip...]
/usr/share/luxcorerender/scenes/studiotest.tar.lzma

I thought I'd get your feedback before progressing more.

EDIT: You can check out my branch to inspect/try the .deb packages if you wish. mkdir LuxCoreBuild && cd LuxCoreBuild && cmake-gui ../LuxCore && make && make package. Make sure to select CPACK_BINARY_DEB. I installed an embree release via the following:

sudo alien embree3-devel-3.2.1-1.noarch.rpm
sudo alien embree-lib-3.2.1-1.x86_64.rpm --scripts
sudo dpkg -i embree3-devel_3.2.1-2_all.deb
sudo dpkg -i embree3-lib_3.2.1-2_amd64.deb

And I call luxcore via LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/ ./luxcoreui.

leso-kn commented 6 years ago

@AndrewSmart Thank you for providing your deb packages! I will try them out now and tell you the results as soon as possible

leso-kn commented 6 years ago

Okay i tried serval things now but cmake doesn't seem to find boost. I'm on Ubuntu 16.04.5 64bit and my boost version is 1.58.0.1

Is there any option to specify the boost location? So far everything looks good inside the makefiles

AndrewSmart commented 6 years ago

@leso-kn You need boost 1.67, as it is the first one distributed on Debian/Ubuntu with libboost_numpy3. It needs libc6 (>= 2.17), same as boost 1.58, so I think you're good. Upgrading libc6 due to a package in a newer release can break things, in this case you don't have to upgrade libc6.

I don't use Ubuntu, but I'm guessing you need to add universe from cosmic if you had not already:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu cosmic universe"

Then

sudo apt-get install libboost-atomic1.67-dev libboost-atomic1.67.0 libboost-chrono1.67-dev libboost-chrono1.67.0 libboost-date-time1.67-dev libboost-date-time1.67.0 libboost-filesystem1.67-dev libboost-filesystem1.67.0 libboost-iostreams1.67-dev libboost-iostreams1.67.0 libboost-numpy1.67-dev libboost-numpy1.67.0 libboost-program-options1.67-dev libboost-program-options1.67.0 libboost-python1.67-dev libboost-python1.67.0 libboost-regex1.67-dev libboost-regex1.67.0 libboost-serialization1.67-dev libboost-serialization1.67.0 libboost-system1.67-dev libboost-system1.67.0 libboost-thread1.67-dev libboost-thread1.67.0 libboost1.67-dev
leso-kn commented 6 years ago

oof.. That seems like a lot of libraries. Also i think it may cause dependency issues with other packages. Maybe i'll just go for installing all these libraries on version 1.58, the makefiles say minimum version requirement is 1.56

AndrewSmart commented 6 years ago

seems like a lot of libraries

The -dev ones include the .a static libraries, for static linkage. the .0 ones contain the .so shared libraries for dynamic linkage, and the libboost1.67-dev contains the header files. I suppose you could not install the static library ones.

it may cause dependency issues with other packages.

Shouldn't. 1.58 can be installed alongside 1.67, and must be the case as libopenimageio1.6 requires boost 1.58. It all works fine on my system... and the boost devs made sure to mangle the symbol names between versions so there won't be any conflicts.

An important detail I forgot to mention earlier is apt-pinning after adding cosmic universe, so that you don't encounter issues updating other packages. If you do add the cosmic repo, pin cosmic packages at something like 50, so that they're not installed instead of your 16.04 release:

Create and edit a new file in /etc/apt/preferences.d/ directory:

[ /etc/apt/preferences.d/cosmic-pin-50 ]
Package: *
Pin: release a=cosmic
Pin-Priority: 50

Then you'll see cosmic packages pinned at 50, and your release at 500:

$ apt-cache policy libopenimageio-dev
libopenimageio-dev:
  Installed: 1.6.11~dfsg0-1ubuntu1
  Candidate: 1.6.11~dfsg0-1ubuntu1
  Version table:
     1.7.17~dfsg0-1ubuntu4
         50 https://ubuntu-repo/cosmic cosmic/main amd64 Packages
 *** 1.6.11~dfsg0-1ubuntu1 500
        500 https://ubuntu-repo/xenial xenial/main amd64 Packages
        100 /var/lib/dpkg/status

So apt-get install libopenimageio-dev would resolve to the one pinned at 500, unless you specified apt-get install libopenimageio-dev -t=cosmic or apt-get install libopenimageio-dev=1.7.17~dfsg0-1ubuntu4.

But anyways, do whatever you want, figure out what works for you.

leso-kn commented 6 years ago

@AndrewSmart Alright, so it works with the boost 1.67 libraries from cosmic. I had to uninstall my old boost libraries, but nothing depended on them so i guess it's fine. I'll install embree now and see if it works

Dade916 commented 6 years ago

@AndrewSmart Thanks, I have added a "-mno-ssse3" to any place where "-mtune=generic" is used in LinuxCompile repository. So the next builds should work on old CPU too. In my tests, there is no measurable performance difference between using "-mno-ssse3" or not (as expected given the scope of SSSE3 instruction).

leso-kn commented 6 years ago

@Dade916 Thank you! :+1: As it's morning arround here, i didn't test the changes on my hardware yet, but i compiled the changes overnight and will test everything within the next hour

leso-kn commented 6 years ago

As i'm still having trouble compiling the renderer due to some boost library issues (there are some conflicts with my version and the new one) i'll just wait for the new release. I'll upgrade this machine at some point anyways. Thanks everyone for the support, looking forward to see this in the next version!