Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve the problems when it runs on Ubuntu20.04 #4

Open
Curry2Puff opened this issue Dec 15, 2022 · 14 comments
Open

solve the problems when it runs on Ubuntu20.04 #4

Curry2Puff opened this issue Dec 15, 2022 · 14 comments

Comments

@Curry2Puff
Copy link

I use ubuntu20.04 and ros noetic to run the code,but it doesnot work。
I use the command “catkin_make”. and then it will report the problem :

/usr/bin/ld: warning: libboost_system.so.1.65.1, needed by /home/ran/catkin_ws/src/Fast-tracker/src/plan_manage/lib/libOptraj.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /home/ran/catkin_ws/src/Fast-tracker/src/plan_manage/lib/libOptraj.so: undefined reference to boost::system::system_category()' /usr/bin/ld: /home/ran/catkin_ws/src/Fast-tracker/src/plan_manage/lib/libOptraj.so: undefined reference to boost::system::generic_category()'
collect2: error: ld returned 1 exit status
make[2]: *** [Fast-tracker/src/plan_manage/CMakeFiles/tracking_fsm_node.dir/build.make:520:/home/ran/catkin_ws/devel/lib/plan_manage/tracking_fsm_node] 错误 1
make[1]: *** [CMakeFiles/Makefile2:4059:Fast-tracker/src/plan_manage/CMakeFiles/tracking_fsm_node.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
Invoking "make -j16 -l16" failed

The main problem is that the libOptraj.so requires libboost_system.so.1.65.1, but Ubuntu20.04 use libboost_system.so.1.71.0,
So how to deal with libOptraj.so to make it compatible with Ubuntu20.04?

@liuholin
Copy link

maybe U can resolve it by run :sudo apt-get install libboost1.65-dev, but it's dangerous cuz it will uninsintall la lot packages of ROS, and maybe U need reinstall ROS?

@liuholin
Copy link

maybe U can resolve it by run :sudo apt-get install libboost1.65-dev, but it's dangerous cuz it will uninsintall la lot packages of ROS, and maybe U need reinstall ROS?

I tried it and failed, sorry to tell a wrong solution T_T

@yaozhuojiang
Copy link

最后有解决方法了???

@Curry2Puff
Copy link
Author

最后有解决方法了???

ubuntu20.04 下的libboost 1.71.0的安装目录和ubuntu 18.04下libboost 1.65.1 的安装目录不相同,我手动下载了libboost 1.65.1,将其安装到ubuntu 18.04的安装位置,是/usr/lib文件夹下。libboost 1.65.1 版本只有一个.so文件。

@yaozhuojiang
Copy link

yaozhuojiang commented Apr 21, 2023 via email

@ALongni
Copy link

ALongni commented May 8, 2023

最后有解决方法了???

ubuntu20.04 下的libboost 1.71.0的安装目录和ubuntu 18.04下libboost 1.65.1 的安装目录不相同,我手动下载了libboost 1.65.1,将其安装到ubuntu 18.04的安装位置,是/usr/lib文件夹下。libboost 1.65.1 版本只有一个.so文件。

具体是怎么做的啊

@Curry2Puff
Copy link
Author

Curry2Puff commented May 8, 2023 via email

@Curry2Puff
Copy link
Author

补充一下,在catkin_make时加一个命令 -DBoost_LIBRARY_DIR_RELEASE=/usr/lib/x86_64-linux-gnu

@kintzhao
Copy link

using find_package(Boost REQUIRED) to replace find_package(Boost REQUIRED COMPONENTS system filesystem)

git diff
diff --git a/src/car_planner/CMakeLists.txt b/src/car_planner/CMakeLists.txt
index 92444a0..7a04afe 100755
--- a/src/car_planner/CMakeLists.txt
+++ b/src/car_planner/CMakeLists.txt
@@ -12,7 +12,8 @@ find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL 1.7 REQUIRED)
find_package(ompl REQUIRED)
-find_package(Boost REQUIRED COMPONENTS system filesystem)
+#find_package(Boost REQUIRED COMPONENTS system filesystem)
+find_package(Boost REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp
roslib
diff --git a/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt b/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt
robot@robot:~/my_pj/track/fast_track_ws/src/Fast-tracker/src/plan_manage/lib$ gti diff
diff --git a/src/car_planner/CMakeLists.txt b/src/car_planner/CMakeLists.txt
index 92444a0..7a04afe 100755
--- a/src/car_planner/CMakeLists.txt
+++ b/src/car_planner/CMakeLists.txt
@@ -12,7 +12,8 @@ find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL 1.7 REQUIRED)
find_package(ompl REQUIRED)
-find_package(Boost REQUIRED COMPONENTS system filesystem)
+#find_package(Boost REQUIRED COMPONENTS system filesystem)
+find_package(Boost REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp
roslib
diff --git a/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt b/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt
index fca896c..5505196 100644
--- a/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt
+++ b/src/common_utils/uav_simulator/local_sensing/CMakeLists.txt
@@ -25,8 +25,8 @@ if(ENABLE_CUDA)

find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)

  • find_package(Boost REQUIRED COMPONENTS system filesystem)
  • #find_package(Boost REQUIRED COMPONENTS system filesystem)
  • find_package(Boost REQUIRED)
    find_package(catkin REQUIRED COMPONENTS
    roscpp roslib cmake_modules cv_bridge image_transport pcl_ros sensor_msgs geometry_msgs nav_msgs quadrotor_msgs dynamic_reconfigure)
    generate_dynamic_reconfigure_options(
    diff --git a/src/tracking_utils/target_detection/CMakeLists.txt b/src/tracking_utils/target_detection/CMakeLists.txt
    index 036e99d..3f450b5 100755
    --- a/src/tracking_utils/target_detection/CMakeLists.txt
    +++ b/src/tracking_utils/target_detection/CMakeLists.txt
    @@ -11,7 +11,8 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
    find_package(OpenCV REQUIRED)
    find_package(Eigen3 REQUIRED)
    find_package(PCL 1.7 REQUIRED)
    -find_package(Boost REQUIRED COMPONENTS system filesystem)
    +#find_package(Boost REQUIRED COMPONENTS system filesystem)
    +find_package(Boost REQUIRED)
    find_package(catkin REQUIRED COMPONENTS
    roscpp
    roslib

@Curry2Puff
Copy link
Author

Curry2Puff commented Jun 26, 2023 via email

@wzya112
Copy link

wzya112 commented Jan 16, 2024

最后有解决方法了???

ubuntu20.04 下的libboost 1.71.0的安装目录和ubuntu 18.04下libboost 1.65.1 的安装目录不相同,我手动下载了libboost 1.65.1,将其安装到ubuntu 18.04的安装位置,是/usr/lib文件夹下。libboost 1.65.1 版本只有一个.so文件。

具体是怎么做的啊

这个链接的安装步骤亲测有效:https://blog.csdn.net/chen411120086/article/details/122618226
执行到第6步就行,把安装位置换为/usr/lib。最后有可能安装好的路径是在/usr/lib/lib中,把里面的libboost_system.so.1.65.1文件复制到/usr/lib下就好,然后重新catkin_make

@Curry2Puff
Copy link
Author

Curry2Puff commented Jan 16, 2024 via email

@Thinler
Copy link

Thinler commented Dec 19, 2024

本地已经装了1.71,按照楼主的方法手动安装了1.65.1,编译成功通过啦,但是没有在工作空间生成./simulation,请问这个问题有人遇到过吗

@Curry2Puff
Copy link
Author

Curry2Puff commented Dec 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants