2

I have a resource constrained lab machine (thats not controlled by me), which basically only allows me to write to an external hdd.

I need to compile my class project using boost and pcl. My procedure has been to create a conda environment inside the external hdd, and then conda install -c conda-forge boost pcl.

This works as far as getting the packages installed. When I need to compile, I use the following CMake toolchain file:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(CMAKE_C_COMPILER   /XXX/bin/clang)
SET(CMAKE_CXX_COMPILER /XXX/bin/clang++)

SET(CMAKE_FIND_ROOT_PATH  /YYY/conda/envs/thesis-env /XXX/llvm)

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

This gets the compiling job done when running cmake and make. The problem begins when you try to link; I get:

/usr/bin/ld: warning: libboost_system.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_filesystem.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_date_time.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_iostreams.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_chrono.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_atomic.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_regex.so.1.66.0, needed by /media/libre/jbayardo/conda/envs/thesis-env/lib/libpcl_common.so, not found (try using -rpath or -rpath-link)
CMakeFiles/nch.dir/main.cpp.o: En la función `boost::system::generic_category()':
main.cpp:(.text._ZN5boost6system16generic_categoryEv[_ZN5boost6system16generic_categoryEv]+0x6): referencia a `boost::system::detail::generic_category_instance' sin definir

My understanding is that pcl's boost dependency is not being correctly resolved during link time. Is there any way I can help CMake resolve this?

Misguided
  • 165

0 Answers0