Open oshiteku opened 2 weeks ago
Thanks for reporting the issue. It seems FindGTSAM.cmake tries to find TBB regardless of the option. I'll soon fix it to make this package installable without TBB.
I just opened a PR to make TBB optional https://github.com/koide3/gtsam_points/pull/34
When building the project on Ubuntu 22.04, the CMake configuration fails if TBB is not installed.
cmake output
``` CMake Debug Log at cmake/FindGTSAM.cmake:3 (find_path): find_path called with the following settings: VAR: GTSAM_INCLUDE_DIRS NAMES: "gtsam/inference/FactorGraph.h" Documentation: GTSAM include directories Framework Only Search Frameworks: 0 Search Frameworks Last: 0 Search Frameworks First: 0 AppBundle Only Search AppBundle: 0 Search AppBundle Last: 0 Search AppBundle First: 0 CMAKE_FIND_USE_CMAKE_PATH: 1 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 find_path considered the following locations: The item was found at /usr/local/include/gtsam/inference/FactorGraph.h Call Stack (most recent call first): CMakeLists.txt:31 (find_package) CMake Debug Log at cmake/FindGTSAM.cmake:7 (find_library): find_library called with the following settings: VAR: GTSAM_LIB NAMES: "gtsam" Documentation: GTSAM libraries Framework Only Search Frameworks: 0 Search Frameworks Last: 0 Search Frameworks First: 0 AppBundle Only Search AppBundle: 0 Search AppBundle Last: 0 Search AppBundle First: 0 CMAKE_FIND_USE_CMAKE_PATH: 1 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 find_library considered the following locations: The item was found at /usr/local/lib/libgtsam.so Call Stack (most recent call first): CMakeLists.txt:31 (find_package) CMake Debug Log at cmake/FindGTSAM.cmake:11 (find_library): find_library called with the following settings: VAR: GTSAM_UNSTABLE_LIB NAMES: "gtsam_unstable" Documentation: GTSAM_UNSTABLE libraries Framework Only Search Frameworks: 0 Search Frameworks Last: 0 Search Frameworks First: 0 AppBundle Only Search AppBundle: 0 Search AppBundle Last: 0 Search AppBundle First: 0 CMAKE_FIND_USE_CMAKE_PATH: 1 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 find_library considered the following locations: The item was found at /usr/local/lib/libgtsam_unstable.so Call Stack (most recent call first): CMakeLists.txt:31 (find_package) CMake Debug Log at cmake/FindGTSAM.cmake:15 (find_library): find_library called with the following settings: VAR: TBB_LIB NAMES: "tbb" Documentation: TBB libraries Framework Only Search Frameworks: 0 Search Frameworks Last: 0 Search Frameworks First: 0 AppBundle Only Search AppBundle: 0 Search AppBundle Last: 0 Search AppBundle First: 0 CMAKE_FIND_USE_CMAKE_PATH: 1 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 find_library considered the following locations: /usr/local/lib/(lib)tbb(\.so|\.a) /usr/lib/(lib)tbb(\.so|\.a) /home/deck/bin/(lib)tbb(\.so|\.a) /usr/local/sbin/(lib)tbb(\.so|\.a) /usr/local/bin/(lib)tbb(\.so|\.a) /usr/bin/(lib)tbb(\.so|\.a) /var/lib/flatpak/exports/bin/(lib)tbb(\.so|\.a) /usr/bin/site_perl/(lib)tbb(\.so|\.a) /usr/bin/vendor_perl/(lib)tbb(\.so|\.a) /usr/bin/core_perl/(lib)tbb(\.so|\.a) /usr/sbin/(lib)tbb(\.so|\.a) /sbin/(lib)tbb(\.so|\.a) /bin/(lib)tbb(\.so|\.a) /usr/local/lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /usr/local/(lib)tbb(\.so|\.a) /usr/lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /usr/(lib)tbb(\.so|\.a) /lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /lib/(lib)tbb(\.so|\.a) /usr/X11R6/lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /usr/X11R6/lib/(lib)tbb(\.so|\.a) /usr/X11R6/(lib)tbb(\.so|\.a) /usr/pkg/lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /usr/pkg/lib/(lib)tbb(\.so|\.a) /usr/pkg/(lib)tbb(\.so|\.a) /opt/lib/x86_64-linux-gnu/(lib)tbb(\.so|\.a) /opt/lib/(lib)tbb(\.so|\.a) /opt/(lib)tbb(\.so|\.a) /usr/lib/X11/(lib)tbb(\.so|\.a) The item was not found. Call Stack (most recent call first): CMakeLists.txt:31 (find_package) CMake Debug Log at cmake/FindGTSAM.cmake:19 (find_library): find_library called with the following settings: VAR: TBB_MALLOC_LIB NAMES: "tbbmalloc" Documentation: TBB malloc libraries Framework Only Search Frameworks: 0 Search Frameworks Last: 0 Search Frameworks First: 0 AppBundle Only Search AppBundle: 0 Search AppBundle Last: 0 Search AppBundle First: 0 CMAKE_FIND_USE_CMAKE_PATH: 1 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1 find_library considered the following locations: /usr/local/lib/(lib)tbbmalloc(\.so|\.a) /usr/lib/(lib)tbbmalloc(\.so|\.a) /home/deck/bin/(lib)tbbmalloc(\.so|\.a) /usr/local/sbin/(lib)tbbmalloc(\.so|\.a) /usr/local/bin/(lib)tbbmalloc(\.so|\.a) /usr/bin/(lib)tbbmalloc(\.so|\.a) /var/lib/flatpak/exports/bin/(lib)tbbmalloc(\.so|\.a) /usr/bin/site_perl/(lib)tbbmalloc(\.so|\.a) /usr/bin/vendor_perl/(lib)tbbmalloc(\.so|\.a) /usr/bin/core_perl/(lib)tbbmalloc(\.so|\.a) /usr/sbin/(lib)tbbmalloc(\.so|\.a) /sbin/(lib)tbbmalloc(\.so|\.a) /bin/(lib)tbbmalloc(\.so|\.a) /usr/local/lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /usr/local/(lib)tbbmalloc(\.so|\.a) /usr/lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /usr/(lib)tbbmalloc(\.so|\.a) /lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /lib/(lib)tbbmalloc(\.so|\.a) /usr/X11R6/lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /usr/X11R6/lib/(lib)tbbmalloc(\.so|\.a) /usr/X11R6/(lib)tbbmalloc(\.so|\.a) /usr/pkg/lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /usr/pkg/lib/(lib)tbbmalloc(\.so|\.a) /usr/pkg/(lib)tbbmalloc(\.so|\.a) /opt/lib/x86_64-linux-gnu/(lib)tbbmalloc(\.so|\.a) /opt/lib/(lib)tbbmalloc(\.so|\.a) /opt/(lib)tbbmalloc(\.so|\.a) /usr/lib/X11/(lib)tbbmalloc(\.so|\.a) The item was not found. Call Stack (most recent call first): CMakeLists.txt:31 (find_package) CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find GTSAM (missing: GTSAM_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) cmake/FindGTSAM.cmake:33 (find_package_handle_standard_args) CMakeLists.txt:31 (find_package) CMake Debug Log at CMakeLists.txt:31 (find_package): find_package considered the following paths for GTSAM.cmake /usr/share/cmake-3.22/Modules/FindGTSAM.cmake The file was found at /home/deck/src/gtsam_points/cmake/FindGTSAM.cmake -- Configuring incomplete, errors occurred! ```
After installing TBB, the build completes successfully.