Replies: 1 comment 1 reply
-
The problem is almost certainly that you are compiling Abseil in C++17 mode, but another project in your build with another C++ standard. https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#how-to-i-set-the-c-dialect-used-to-build-abseil This is probably the most commonly reported issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the issue
I am trying to compile ROS Cartographer, and it requires Lib Absl lts_20211102 specifically (I tried a different version, however that did not work with Cartographer's compilation). Whenever I try to compile it, I get the same issue everytime.
Here is the exact error:
FAILED: cartographer_pbstream
: && /usr/bin/c++ -O3 -DNDEBUG -latomic -rdynamic CMakeFiles/cartographer_pbstream.dir/cartographer/io/pbstream_main.cc.o -o cartographer_pbstream -Wl,-rpath,/usr/local/lib: libcartographer.a /usr/local/lib/libceres.a /usr/local/lib/libglog.so.0.7.0 -lspqr -ltbb -lcholmod -lccolamd -lcamd -lcolamd -lamd -llapack -lblas -lf77blas -latlas -lsuitesparseconfig -lrt -lmetis -lcxsparse -llapack -lblas -lf77blas -latlas -lsuitesparseconfig -lrt -lmetis -lcxsparse -llua5.2 -lm /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.71.0 -lglog /usr/local/lib/libgflags_nothreads.a -lcairo /usr/local/lib/libprotobuf.a /usr/local/lib/libabsl_leak_check.a /usr/local/lib/libabsl_cord.a /usr/local/lib/libabsl_cordz_info.a /usr/local/lib/libabsl_cord_internal.a /usr/local/lib/libabsl_cordz_functions.a /usr/local/lib/libabsl_cordz_handle.a /usr/local/lib/libabsl_hash.a /usr/local/lib/libabsl_city.a /usr/local/lib/libabsl_bad_variant_access.a /usr/local/lib/libabsl_low_level_hash.a /usr/local/lib/libabsl_raw_hash_set.a /usr/local/lib/libabsl_bad_optional_access.a /usr/local/lib/libabsl_hashtablez_sampler.a /usr/local/lib/libabsl_exponential_biased.a /usr/local/lib/libabsl_str_format_internal.a /usr/local/lib/libabsl_synchronization.a /usr/local/lib/libabsl_stacktrace.a /usr/local/lib/libabsl_graphcycles_internal.a /usr/local/lib/libabsl_symbolize.a /usr/local/lib/libabsl_malloc_internal.a /usr/local/lib/libabsl_debugging_internal.a /usr/local/lib/libabsl_demangle_internal.a /usr/local/lib/libabsl_time.a /usr/local/lib/libabsl_strings.a /usr/local/lib/libabsl_strings_internal.a /usr/local/lib/libabsl_base.a -lpthread /usr/local/lib/libabsl_spinlock_wait.a -lrt /usr/local/lib/libabsl_throw_delegate.a /usr/local/lib/libabsl_raw_logging_internal.a /usr/local/lib/libabsl_log_severity.a /usr/local/lib/libabsl_int128.a /usr/local/lib/libabsl_civil_time.a /usr/local/lib/libabsl_time_zone.a -lpthread && :
/usr/bin/ld: libcartographer.a(histogram.cc.o): in function
cartographer::common::Histogram::ToString[abi:cxx11](int) const': histogram.cc:(.text+0x43f): undefined reference to
absl::lts_20211102::strings_internal::CatPiecesabi:cxx11'/usr/bin/ld: histogram.cc:(.text+0x965): undefined reference to `absl::lts_20211102::strings_internal::AppendPieces(std::__cxx11::basic_string<char, std::char_traits, std::allocator >*, std::initializer_listabsl::lts_20211102::string_view)'
collect2: error: ld returned 1 exit status
[116/281] Building CXX object CMakeFil...th/compute_relations_metrics_main.cc.o
Steps to reproduce the problem
Use the provided SH file to download and install absiel provided in the offical ROS cartographer installation steps: https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html
If that does not work (i.e a newer version of absiel is installed, or the branch is not found), then you can use my custom SH scripts right here:
Firstly, try to install absiel with this script:
If there are errors being shown, then navigate to the stow path, and find the file stow_output.txt. In that path, copy this script below and execute it:
Then once all the previous dependenices are removed, Re-run the first script again.
Following that, follow all the steps (except for the install_absiel part) in the ros_cartographer repository.
What version of Abseil are you using?
20211102
What operating system and version are you using?
Ubuntu 20.04
What compiler and version are you using?
G++ 17
What build system are you using?
cmake version 3.28.0
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions