open3d_slam icon indicating copy to clipboard operation
open3d_slam copied to clipboard

fmt compilation error

Open braca51e opened this issue 1 year ago • 3 comments

Hello,

Seems like the conversions library is using fmt but I'm getting the following error:

Errors     << open3d_slam_ros:make /home/luis-usb/open3d_ws/logs/open3d_slam_ros/build.make.002.log                                
/usr/bin/ld: /home/luis-usb/open3d_ws/devel/.private/open3d_conversions/lib/libopen3d_conversions.so: undefined reference to `fmt::v9::vformat[abi:cxx11](fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mapping_node.dir/build.make:180: /home/luis-usb/open3d_ws/devel/.private/open3d_slam_ros/lib/open3d_slam_ros/mapping_node] Error 1
make[1]: *** [CMakeFiles/Makefile2:1835: CMakeFiles/mapping_node.dir/all] Error 2

braca51e avatar Jul 19 '22 01:07 braca51e

Hi @braca51e, Did you install open3d from source, or used the given ppa? When following the installation instructions in open3d_catkin (https://github.com/leggedrobotics/open3d_slam/blob/master/open3d_catkin/README.md) the ./install_deps.sh script includes libfmt-dev. When using the ppa, this should not be needed, but we can check again on our end.

nubertj avatar Jul 19 '22 08:07 nubertj

I did not install from source! I was able to compile successfully after I added fmt packakge in the cmakefile for open3d_conversions. I guess my fmt version was not compatible

braca51e avatar Jul 20 '22 21:07 braca51e

Okay, thanks a lot for your follow-up e-mail. We will test the implications and potentially include it in the next release. Until then we will leave this issue open, in case somebody else encounters the same issue.

nubertj avatar Jul 25 '22 10:07 nubertj

Hi, when i use EXPERT WAY: Build Open3d from source, i meet the same error

 fatal error: fmt/core.h: No such file or directory #include <fmt/core.h>

i think we should add ${Open3D_INCLUDE_DIRS}/open3d/3rdparty in the open3d_catkin

catkin_package(
INCLUDE_DIRS
${Open3D_INCLUDE_DIRS}
 ${Open3D_INCLUDE_DIRS}/open3d/3rdparty
)

mengchongxi avatar Aug 20 '22 09:08 mengchongxi

Hi @mengchongxi, Thanks a lot for your message. I tried to make the documentation a bit clearer in this PR: https://github.com/leggedrobotics/open3d_slam/pull/37

I tried all three scenarios and for me as well as in a docker it works. Feel free to reopen the issue, if the problem still persists

nubertj avatar Aug 24 '22 16:08 nubertj

@mengchongxi okay we also improved the open3d_catkin package :) maybe you can give it a try again and let us know? Best, Julian

nubertj avatar Aug 25 '22 13:08 nubertj