Installing rviz on Gentoo -- Unidentified reference to YAML when linking librviz.so

asked 2021-08-06 11:25:43 -0600

fishandmicrochips gravatar image

OS: Gentoo Attempted package: ros-meta/desktop_full.

Here is where the build failed.

/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::detail::node_data::mark_defined()'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::Emitter::Write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::detail::memory::create_node()'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `vtable for YAML::InvalidNode'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `typeinfo for YAML::InvalidNode'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `typeinfo for YAML::ParserException'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::Load(std::istream&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::detail::node_data::begin()'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::Null'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::Emitter::Emitter()'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../devel/lib64/librviz.so: undefined reference to `YAML::Emitter::Write(YAML::_Null const&)'
...
make[2]: *** [src/rviz/CMakeFiles/executable.dir/build.make:199: devel/libexec/rviz/rviz] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-ros/rviz-1.14.8/work/rviz-1.14.8_build'
Filename: None. Size: 10kb. View raw,
, hex, or download this file.

In short, librviz.so: undefined reference to 'YAML::<INSERT THING HERE>' for a bunch of functions, classes, and variables.

It looks like librviz is trying to call YAML functions that aren't linked. Here's what I get when I lddtree the .so file:

librviz.so => /var/tmp/portage/dev-ros/rviz-1.14.8/work/rviz-1.14.8_build/devel/lib64/librviz.so (interpreter => none)
libboost_filesystem.so.1.76.0 => /usr/lib64/libboost_filesystem.so.1.76.0
    librt.so.1 => /lib64/librt.so.1
libboost_program_options.so.1.76.0 => /usr/lib64/libboost_program_options.so.1.76.0
libboost_thread.so.1.76.0 => /usr/lib64/libboost_thread.so.1.76.0
libimage_transport.so => /usr/lib64/libimage_transport.so
libresource_retriever.so => /usr/lib64/libresource_retriever.so
    libcurl.so.4 => /usr/lib64/libcurl.so.4
        libnghttp2.so.14 => /usr/lib64/libnghttp2.so.14
        libssl.so.1.1 => /usr/lib64/libssl.so.1.1
        libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
            libdl.so.2 => /lib64/libdl.so.2
                ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libz.so.1 => /lib64/libz.so.1
libtf2_ros.so => /usr/lib64/libtf2_ros.so
    libactionlib.so => /usr/lib64/libactionlib.so
libmessage_filters.so => /usr ...
(more)
edit retag flag offensive close merge delete