Might be that some CMake files under our build_deps aren’t forcing enough not to use libraries from system. I’ll investigate this more later.
For distribution packaging, using the static version does not actually change the restrictions regarding configuration - have to link libembree with a specific configuration, no matter what.
Even the official blender builds could use a dynamically linked libembree version, the only requirement is a bundled libembree comes first in the search path. Or you could change the SONAME to e.g. libembree_blender (CMake option EMBREE_LIBRARY_NAME
), to avoid a potential mixup.
Preferably, blender would just link to a shared libembree from the distribution, with some runtime checks to query libembree configuration features.
Btw, what are the actual required options for libembree to be compatible with blender?
Just browsed the embree documentation, isn’t rtcGetDeviceProperty exactly the API necessary to check compatibility?
This is an old topic, I think the issues mentioned here have been long resolved? Linux distribution packages dynamically link to Embree, while releases on download.blender.org ship with all libraries bundled.
The required options are:
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF