flevet / PoCA

https://poca-smlm.github.io/
18 stars 2 forks source link

Fails to build on Linux due to issues with TBB #3

Closed IAmSuyogJadhav closed 9 months ago

IAmSuyogJadhav commented 9 months ago

Hi, Thank you for PoCA software. I have used it on Windows and it works really well. For the past week, I have been trying to get it working on my Linux system. While trying to run cmake (running cmake . from PoCA/src). I have tried installing onetbb==2021.10 (latest version currently), and also with onetbb==2020.3 (from ubuntu apt repository, package name is libtbb2-dev). In both the cases, CMake succesfully manages to find TBB's cmake files but fails to locate the release and debug libraries. I also tried by downloading the 2020.3 release from oneTBB's Github repo and providing its path in the CMAKE_PREFIX_PATH environment variable while running cmake .. Again, cmake manages to find the cmake directory succesfully, but fails to locate the release and debug libraries and fails.

More details: "cmake manages to find the cmake directory" == The variable TBB_DIR is set correctly in the generated CMakeCache.txt. "fails to locate the release and debug libraries" == The variables TBB_tbb_LIBRARY_DEBUG, TBB_tbbmalloc_LIBRARY_DEBUG, TBB_tbb_LIBRARY_RELEASE, TBB_tbbmalloc_LIBRARY_RELEASE, and TBB_INCLUDE_DIRS remain unset after find_package(TBB COMPONENTS tbb tbbmalloc) is run (verified by printing to the console).

Any pointers to what might be causing the issue will be helpful. Thanks!

flevet commented 9 months ago

Hi,

If I remember correctly, I think I had the same issue, CMake finding TBB_DIR but failing for all the other variables. For this, I downloaded the binaries of TBB and manually defined each of the variables (TBB_tbb_LIBRARY_DEBUG, TBB_tbb_LIBRARY_RELEASE, TBB_tbbmalloc_LIBRARY_DEBUG, TBB_tbbmalloc_LIBRARY_RELEASE) with cmake-gui.

In fact, I had to manually define quite a few variables as CMake failed to fill them all.

IAmSuyogJadhav commented 9 months ago

Thanks for the reply. I will try again and let you know if I manage to get a successful build!

IAmSuyogJadhav commented 9 months ago

I just reverted to using the pre-built Windows release on a Windows machine. Closing this issue from my side.