RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.02k stars 186 forks source link

FindTBB.cmake problems #103

Closed yurivict closed 7 years ago

yurivict commented 8 years ago

It should look for libtbbmalloc.so, not libtbbmalloc.so.2. On my OS it's libtbbmalloc.so.4 Please drop the numeric suffix.

Also you shouldn't require tbb_debug.so libs by default. I tried -DTBB_LIBRARY_DEBUG:BOOL=OFF, it passed config stage and later failed:

-- Installing: /usr/ports/science/ospray/work/stage/usr/local/lib/libtbbmalloc.so
CMake Error at builddir/ospray/intel64/cmake_install.cmake:31 (file):
  file INSTALL cannot find
  "/usr/ports/science/ospray/work/OSPRay-087dc8a/ospray/TBB_LIBRARY_DEBUG-NOTFOUND".
Call Stack (most recent call first):
  cmake_install.cmake:61 (include)
johguenther commented 8 years ago

A fix is difficult:

yurivict commented 8 years ago

cmake-modules uses their macro CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE) from share/cmake/Modules/CheckLibraryExists.cmake, and checks for libraries in this fashion: CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA) without ever mentioning their numeric suffix.

Maybe you can add dependency on cmake-modules and just use this macro?

johguenther commented 8 years ago

Well, maybe. The need to search for suffix .2 is actually only for the redistribution in the binary packages, not for building and running OSPRay. Changing this is on our TODO list anyway, so this issues may go away in conjunction.

Still, where does libtbbmalloc.so.4 come from? A custom build of TBB? It's a very unusual case. So, I'll leave it open, but it is low prio.

yurivict commented 8 years ago

For some reason, suffix 4 is hardcoded in the FreeBSD port, devel/tbb. For some reason, tbb doesn't build the suffixed library, and the port code assigns the suffix.

johguenther commented 8 years ago

The so suffix signifies the API version of the library, which is often (but not necessarily, as in the case with TBB) identical to the major version. So it seems that the FreeBSD port code should be changed to use a hardcoded suffix 2.

yurivict commented 8 years ago

Ok, I created the bug report for this for the FreeBSD port.

johguenther commented 8 years ago

Thank you. Also for reporting all the other issues and thus helping OSPRay to become more mature.

yurivict commented 8 years ago

you're welcome!

favreau commented 7 years ago

Hi, I am not quite sure if this is totally related to this issue, but I am wandering why OSPRay is installing the tbb libraries. In other words, I had to remove from ospray/CMakeLists.txt the following lines from to avoid conflicts my Ubuntu system installation of TBB: INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} ${TBB_LIBRARY_DEBUG} ${TBB_LIBRARY_MALLOC_DEBUG} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib) # /intel64? Do we want OSPRay to install those libraries or should OSPRay rely on pre-requeries such as embree and TBB? Cheers, Cyrille

johguenther commented 7 years ago

You are right. In the current devel branch (and coming release) this behavior is already changed: 3rd-party dependencies are not installed per default anymore (only when OSPRAY_INSTALL_DEPENDENCIES is set).

favreau commented 7 years ago

Ok, thanks!