Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2024.09.04] ndt_scan_matcher fails to build #96

Open
esteve opened this issue Sep 10, 2024 · 5 comments
Open

[2024.09.04] ndt_scan_matcher fails to build #96

esteve opened this issue Sep 10, 2024 · 5 comments

Comments

@esteve
Copy link
Collaborator

esteve commented Sep 10, 2024

CMake can't seem to find the OpenMP::OpenMP_CXX target:

2024-09-05T02:58:23.8351351Z CMake Error at /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_library.cmake:66 (add_library):
2024-09-05T02:58:23.8352566Z   Target "ndt_scan_matcher" links to target "OpenMP::OpenMP_CXX" but the
2024-09-05T02:58:23.8353445Z   target was not found.  Perhaps a find_package() call is missing for an
2024-09-05T02:58:23.8354168Z   IMPORTED target, or an ALIAS target is missing?
2024-09-05T02:58:23.8364491Z Call Stack (most recent call first):
2024-09-05T02:58:23.8365142Z   CMakeLists.txt:28 (ament_auto_add_library)
2024-09-05T02:58:23.8365513Z
2024-09-05T02:58:23.8365522Z
2024-09-05T02:58:23.8374791Z CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:50 (add_executable):
2024-09-05T02:58:23.8376822Z   Target "standard_sequence_for_initial_pose_estimation" links to target
2024-09-05T02:58:23.8378554Z   "OpenMP::OpenMP_CXX" but the target was not found.  Perhaps a
2024-09-05T02:58:23.8380196Z   find_package() call is missing for an IMPORTED target, or an ALIAS target
2024-09-05T02:58:23.8381522Z   is missing?
2024-09-05T02:58:23.8381864Z Call Stack (most recent call first):
2024-09-05T02:58:23.8382823Z   /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:37 (_ament_add_gtest_executable)
2024-09-05T02:58:23.8384204Z   /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_gtest.cmake:71 (ament_add_gtest_executable)
2024-09-05T02:58:23.8385131Z   CMakeLists.txt:50 (ament_auto_add_gtest)
2024-09-05T02:58:23.8385482Z
2024-09-05T02:58:23.8385489Z
2024-09-05T02:58:23.8386159Z CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:50 (add_executable):
2024-09-05T02:58:23.8387316Z   Target "once_initialize_at_out_of_map_then_initialize_correctly" links to
2024-09-05T02:58:23.8388410Z   target "OpenMP::OpenMP_CXX" but the target was not found.  Perhaps a
2024-09-05T02:58:23.8389365Z   find_package() call is missing for an IMPORTED target, or an ALIAS target
2024-09-05T02:58:23.8390021Z   is missing?
2024-09-05T02:58:23.8390351Z Call Stack (most recent call first):
2024-09-05T02:58:23.8391302Z   /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake:37 (_ament_add_gtest_executable)
2024-09-05T02:58:23.8394487Z   /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_gtest.cmake:71 (ament_add_gtest_executable)
2024-09-05T02:58:23.8395420Z   CMakeLists.txt:53 (ament_auto_add_gtest)
@esteve
Copy link
Collaborator Author

esteve commented Sep 11, 2024

Adding find_package(OpenMP) to the ndt_scan_matcher CMakeLists.txt file fixes this specific issue, however then the following issue breaks the build:

[ 50%] Built target gtest_main
In file included from /<<BUILDDIR>>package/include/ndt_scan_matcher/map_update_module.hpp:20,
                 from /<<BUILDDIR>>package/src/map_update_module.cpp:15:
/<<BUILDDIR>>package/include/ndt_scan_matcher/hyper_parameters.hpp:20:10: fatal error: multigrid_pclomp/multigrid_ndt_omp.h: No such file or directory
   20 | #include <multigrid_pclomp/multigrid_ndt_omp.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [CMakeFiles/ndt_scan_matcher.dir/build.make:79: CMakeFiles/ndt_scan_matcher.dir/src/map_update_module.cpp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from /<<BUILDDIR>>package/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp:22,
                 from /<<BUILDDIR>>package/src/ndt_scan_matcher_core.cpp:15:
/<<BUILDDIR>>package/include/ndt_scan_matcher/hyper_parameters.hpp:20:10: fatal error: multigrid_pclomp/multigrid_ndt_omp.h: No such file or directory
   20 | #include <multigrid_pclomp/multigrid_ndt_omp.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [CMakeFiles/ndt_scan_matcher.dir/build.make:93: CMakeFiles/ndt_scan_matcher.dir/src/ndt_scan_matcher_core.cpp.o] Error 1
[ 57%] Linking CXX executable ndt_scan_matcher_node
/usr/bin/cmake -E cmake_link_script CMakeFiles/ndt_scan_matcher_node.dir/link.txt --verbose=1
/usr/lib/ccache/c++ -g -O2 -ffile-prefix-map=/<<BUILDDIR>>package=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 CMakeFiles/ndt_scan_matcher_node.dir/rclcpp_components/node_main_ndt_scan_matcher_node.cpp.o -o ndt_scan_matcher_node  -Wl,-rpath,/opt/ros/humble/lib: /opt/ros/humble/lib/libcomponent_manager.so /opt/ros/humble/lib/librclcpp.so /opt/ros/humble/lib/liblibstatistics_collector.so /opt/ros/humble/lib/librcl.so /opt/ros/humble/lib/librmw_implementation.so /opt/ros/humble/lib/librcl_logging_spdlog.so /opt/ros/humble/lib/librcl_logging_interface.so /opt/ros/humble/lib/librcl_yaml_param_parser.so /opt/ros/humble/lib/libyaml.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libtracetools.so /opt/ros/humble/lib/libclass_loader.so /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.1.0 /opt/ros/humble/lib/libament_index_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librmw.so /opt/ros/humble/lib/libfastcdr.so.1.0.24 /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosidl_typesupport_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librosidl_typesupport_c.so /opt/ros/humble/lib/librcpputils.so /opt/ros/humble/lib/librosidl_runtime_c.so /opt/ros/humble/lib/librcutils.so -ldl /usr/lib/x86_64-linux-gnu/libpython3.10.so
make[4]: Leaving directory '/<<BUILDDIR>>package/obj-x86_64-linux-gnu'
[ 57%] Built target ndt_scan_matcher_node
make[4]: Leaving directory '/<<BUILDDIR>>package/obj-x86_64-linux-gnu'
make[3]: *** [CMakeFiles/Makefile2:164: CMakeFiles/ndt_scan_matcher.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
[ 64%] Linking CXX static library libgtest.a
cd /<<BUILDDIR>>package/obj-x86_64-linux-gnu/gtest && /usr/bin/cmake -P CMakeFiles/gtest.dir/cmake_clean_target.cmake
cd /<<BUILDDIR>>package/obj-x86_64-linux-gnu/gtest && /usr/bin/cmake -E cmake_link_script CMakeFiles/gtest.dir/link.txt --verbose=1
/usr/bin/ar qc libgtest.a CMakeFiles/gtest.dir/src/gtest-all.cc.o
/usr/bin/ranlib libgtest.a
make[4]: Leaving directory '/<<BUILDDIR>>package/obj-x86_64-linux-gnu'
[ 64%] Built target gtest
make[3]: Leaving directory '/<<BUILDDIR>>package/obj-x86_64-linux-gnu'
make[2]: *** [Makefile:149: all] Error 2
make[2]: Leaving directory '/<<BUILDDIR>>package/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j16 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make[1]: *** [debian/rules:38: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<BUILDDIR>>package'
make: *** [debian/rules:22: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

@esteve
Copy link
Collaborator Author

esteve commented Sep 11, 2024

The root cause for this issue is that the ndt_omp package in Autoware was forked from https://github.com/koide3/ndt_omp, which exists in the ROS package index (see https://index.ros.org/p/ndt_omp/github-koide3-ndt_omp/#humble), but hasn't been renamed to include the autoware_ prefix yet. Therefore, when our build farm installs the dependencies for ndt_scan_matcher, rosdep installs the version of ndt_omp from the ROS repositories, instead of the version that was built by locally.

@esteve
Copy link
Collaborator Author

esteve commented Sep 11, 2024

@SakodaShintaro @YamatoAndo please enable the issues tab for https://github.com/tier4/ndt_omp so I can track this issue there. Thanks.

image

@SakodaShintaro
Copy link

I'm sorry, I couldn't find that setting. It might be because I don't have the necessary permissions.

Screenshot from 2024-09-12 09-58-04
Screenshot from 2024-09-12 09-58-47

@YamatoAndo
Could you change the setting?

@YamatoAndo
Copy link

@esteve Hi, I have enabled the issues tab. Thank you.

esteve added a commit that referenced this issue Oct 29, 2024
esteve added a commit that referenced this issue Oct 29, 2024
esteve added a commit that referenced this issue Oct 29, 2024
esteve added a commit that referenced this issue Oct 29, 2024
Skip ndt_omp and autoware_ndt_scan_matcher until #96 is fixed

Signed-off-by: Esteve Fernandez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants