SteveMacenski / spatio_temporal_voxel_layer

A new voxel layer leveraging modern 3D graphics tools to modernize navigation environmental representations
http://wiki.ros.org/spatio_temporal_voxel_layer
GNU Lesser General Public License v2.1
647 stars 190 forks source link

Impossible to build for Ubuntu Jammy 22.04 / Humble (probably because of OpenVDB / TBB) #232

Closed doisyg closed 9 months ago

doisyg commented 2 years ago

Hello, FYI and to track the issue: In preparation for the Humble release I tried to build STVL under Humble beta with Ubuntu 22.04 and the blocking point seems to be, surprise, the version of the OpenVDB package released in Ubuntu. My quick analysis of the cause:

OpenVDB seems to already have a version (v8.2) compatible with TBB 2021.5 since november : https://github.com/AcademySoftwareFoundation/openvdb/releases/tag/v8.2.0. My guess is that releasing v8.2 instead of v8.1 to Ubuntu 22.04/jammy would solve the issue. I will try to file a bug report on launchpad hoping that it will be faster than https://bugs.launchpad.net/ubuntu/+source/openvdb/+bug/1882998 (remember https://github.com/SteveMacenski/spatio_temporal_voxel_layer/issues/167).

(Side note, looking at OpenVDB release page: https://github.com/AcademySoftwareFoundation/openvdb/releases, I noticed the release of v9.0 with

Official release of NanoVDB, which for the first time offers GPU support for static sparse volumes in OpenVDB.

It is GPU agnotic, more info: https://academysoftwarefoundation.github.io/openvdb/NanoVDB_FAQ.html @SteveMacenski, did you follow ? Maybe that's interesting to look at for STVL and voxels in nav2)

SteveMacenski commented 7 months ago

I'm trying humble and seeing if the vendorization works, then I'll follow up with Iron https://github.com/ros/rosdistro/pull/40797

SteveMacenski commented 7 months ago

@Timple @agoeckner @nachovizzo we fail: https://build.ros2.org/job/Hbin_ujv8_uJv8__openvdb_vendor__ubuntu_jammy_arm64__binary/1/console


12:02:41 -- ----------------------------------------------------
12:02:41 -- ------------- Configuring OpenVDBCore --------------
12:02:41 -- ----------------------------------------------------
12:02:41 CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package):
12:02:41   Could not find a package configuration file provided by "boost_iostreams"
12:02:41   (requested version 1.74.0) with any of the following names:
12:02:41 
12:02:41     boost_iostreamsConfig.cmake
12:02:41     boost_iostreams-config.cmake
12:02:41 
12:02:41   Add the installation prefix of "boost_iostreams" to CMAKE_PREFIX_PATH or
12:02:41   set "boost_iostreams_DIR" to a directory containing one of the above files.
12:02:41   If "boost_iostreams" provides a separate development package or SDK, be
12:02:41   sure it has been installed.
12:02:41 Call Stack (most recent call first):
12:02:41   /usr/lib/aarch64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
12:02:41   /usr/share/cmake-3.22/Modules/FindBoost.cmake:594 (find_package)
12:02:41   openvdb/openvdb/CMakeLists.txt:121 (find_package)

Missing dependency!

But, a good sign is that the source builds turn over https://build.ros2.org/job/Hsrc_uJ__spatio_temporal_voxel_layer__ubuntu_jammy__source/ so its just the details of getting the missing package.xml dependencies. Can you look into the OpenVDB build and identify what else might be missing? I can run another release quickly

Timple commented 7 months ago

Strangely enough it works fine in a dockerfile:

FROM ros:humble
SHELL [ "/bin/bash", "-c" ]
RUN apt-get update -qq && apt-get install -qqy python3-colcon-core
RUN mkdir -p /ws/src
WORKDIR /ws
RUN git clone https://github.com/SteveMacenski/spatio_temporal_voxel_layer /ws/src/spatio_temporal_voxel_layer
RUN rosdep update && rosdep install --from-paths src --ignore-src -y
RUN source /opt/ros/iron/setup.bash && colcon build

But it seems it is required indeed. I'm a bit at the edge of my cmake knowledge here, but from why I can reproduce from this missing dependency, it seems the only missing dependency? grep _DIR-ADVANCED build/openvdb_vendor/openvdb_vendor-prefix/src/openvdb_vendor-build/CMakeCache.txt

So added it now.

Timple commented 7 months ago

Ah, hold on. I need to isolate the openvdb_vendor package from the stvl. Because the dependencies come in indirectly.

SteveMacenski commented 7 months ago

Because the STVL layer is being built in the same workspace, so you're pulling in deps from the layer that might satisfy this. The vendor/layer are built completely isolated in the build farm

nachovizzo commented 7 months ago

Ho lord! what a mesh... Getting closer anyways guys. I'm sorry I didn't see this coming, I do have this also as a 3rdparty dependency in vdbfusion, and for whatever reason, it didn't make it to my original PR . Sorry!

grusel-opi commented 2 months ago

I quickly tried to build vdbfusion on Ubuntu 22.04 and the OpenVDB build was working and linking correctly to the application. There was a new compiler error (GCC 11 on ubuntu 22.04) for the TBB build but I managed to disable it from the compiler flags.

Greetings @nachovizzo, i am trying to build the humble branch on Ubuntu 22.04 using GCC 11. openvdb_vendor builds fine but for the spatio_temporal_voxel_layer i am getting

/usr/include/openvdb/tools/VolumeToMesh.h:21:10: fatal error: tbb/task_scheduler_init.h: No such file or directory

and also

/usr/include/oneapi/tbb/parallel_reduce.h:379:52: error: reference to ‘split’ is ambiguous
...
/usr/include/oneapi/tbb/detail/_range_common.h:36:7: note: candidates are: ‘class tbb::detail::d0::split’
...
/usr/include/openvdb/math/Coord.h:16:23: note:                 ‘class tbb::split’
...
/usr/include/oneapi/tbb/parallel_reduce.h:379:52: error: ‘tbb::split’ has not been declared

are these the errors you were able to get rid of using compiler flags?

Thanks!

nachovizzo commented 2 months ago

I quickly tried to build vdbfusion on Ubuntu 22.04 and the OpenVDB build was working and linking correctly to the application. There was a new compiler error (GCC 11 on ubuntu 22.04) for the TBB build but I managed to disable it from the compiler flags.

Greetings @nachovizzo, i am trying to build the humble branch on Ubuntu 22.04 using GCC 11. openvdb_vendor builds fine but for the spatio_temporal_voxel_layer i am getting

/usr/include/openvdb/tools/VolumeToMesh.h:21:10: fatal error: tbb/task_scheduler_init.h: No such file or directory

and also

/usr/include/oneapi/tbb/parallel_reduce.h:379:52: error: reference to ‘split’ is ambiguous
...
/usr/include/oneapi/tbb/detail/_range_common.h:36:7: note: candidates are: ‘class tbb::detail::d0::split’
...
/usr/include/openvdb/math/Coord.h:16:23: note:                 ‘class tbb::split’
...
/usr/include/oneapi/tbb/parallel_reduce.h:379:52: error: ‘tbb::split’ has not been declared

are these the errors you were able to get rid of using compiler flags?

Thanks!

@grusel-opi Sorry, but after two years of course, I forgot about it :) So I don't know.

In any case, the build should be working since https://github.com/SteveMacenski/spatio_temporal_voxel_layer/pull/281 If you can't build it is likely due a system-wide installed TBB that mismatches with the requirements of the openvdb_vendor

grusel-opi commented 2 months ago

@nachovizzo Understandable :D Thanks for the quick reply anyways. Guess then i only have to find out what version of TBB is required and how to include it without breaking the system version.