Build package with Boost 1.53 on ROS noetic in Ubuntu 20.04(Default Boost 1.71)
Hi,
We are using ROS noetic on Ubuntu 20.04, and we have a ROS package(Slamtec's mapper) that was developed and tested on previous ROS distribution and required a boost library version of 1.53 to function properly. The package includes precompiled static linked libraries(boost, eigen, json, and rpos). The program will give 'Segfault' it is linked to Boost 1.71 in the system of Ubuntu20.04. But whenever I build the package, the executable is always linked to the system library(1.71) instead of the libraries provided in the package.
I am wondering why this is the case, how could I solve it? I have attached my CMakeLists for the package. Thanks in advance!
add_library(${PROJECT_NAME} STATIC
src/client/slamware_ros_sdk_client.cpp
)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp)
add_executable(slamware_ros_sdk_server_node
src/server/msg_convert.cpp
src/server/server_params.cpp
src/server/server_map_holder.cpp
src/server/server_work_data.cpp
src/server/server_worker_base.cpp
src/server/server_workers.cpp
src/server/slamware_ros_sdk_server_node.cpp
src/server/slamware_ros_sdk_server.cpp
)
add_dependencies(slamware_ros_sdk_server_node ${PROJECT_NAME}_generate_messages_cpp)
target_include_directories(slamware_ros_sdk_server_node
PRIVATE ${SLTC_SDK_INC_DIR}
)
target_compile_options(slamware_ros_sdk_server_node
PRIVATE -Wno-deprecated-declarations
)
target_link_libraries(slamware_ros_sdk_server_node
${catkin_LIBRARIES}
${SLTC_SDK_LIB_DIR}/librpos_robotplatforms_rpslamware.a
${SLTC_SDK_LIB_DIR}/librpos_framework.a
${SLTC_SDK_LIB_DIR}/libbase64.a
${SLTC_SDK_LIB_DIR}/librlelib.a
${SLTC_SDK_LIB_DIR}/libjsoncpp.a
${SLTC_SDK_LIB_DIR}/libcurl.a
${SLTC_SDK_LIB_DIR}/libssl.a
${SLTC_SDK_LIB_DIR}/libcrypto.a
${SLTC_SDK_LIB_DIR}/libboost_atomic.a
${SLTC_SDK_LIB_DIR}/libboost_chrono.a
${SLTC_SDK_LIB_DIR}/libboost_date_time.a
${SLTC_SDK_LIB_DIR}/libboost_regex.a
${SLTC_SDK_LIB_DIR}/libboost_filesystem.a
${SLTC_SDK_LIB_DIR}/libboost_system.a
${SLTC_SDK_LIB_DIR}/libboost_thread.a
${SLTC_SDK_LIB_DIR}/libboost_random.a
pthread
dl
rt
)