Erstellen mit CMake in der Conda-Umgebung

529
Misguided

Ich habe eine ressourcenbeschränkte Labormaschine (die nicht von mir gesteuert wird), die mir grundsätzlich nur das Schreiben auf eine externe Festplatte ermöglicht.

Ich muss mein Klassenprojekt mit boost und pcl kompilieren. Mein Verfahren bestand darin, eine Conda-Umgebung in der externen Festplatte zu erstellen, und dann conda install -c conda-forge boost pcl.

Dies funktioniert soweit, dass die Pakete installiert werden. Wenn ich kompilieren muss, verwende ich die folgende CMake-Toolchain-Datei:

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) 

Dadurch wird der Kompiliervorgang erledigt, wenn cmake und make ausgeführt werden. Das Problem beginnt, wenn Sie versuchen, eine Verknüpfung herzustellen. Ich bekomme:

/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 

Meines Wissens ist es so, dass die Boost-Abhängigkeit von pcl während der Verbindungszeit nicht richtig aufgelöst wird. Gibt es eine Möglichkeit, CMake bei der Lösung dieses Problems zu helfen?

1
Wo ist `libboost_system.so.1.66.0`? Tomasz Jakub Rup vor 5 Jahren 0
Auch hier gepostet: https://stackoverflow.com/questions/51991978/building-using-cmake-withinconda-environment sigvaldm vor 5 Jahren 0

0 Antworten auf die Frage