编译boost python模块遇到的错误:../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal ...

本文介绍了解决Boost.Python模块编译过程中出现的错误方法。主要原因是缺少python-dev依赖,通过使用sudo apt-get install python-dev命令进行安装即可解决。此外,还提到了使用Boost自带的b2工具进行正确编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

就是遇到类似标题上面的错误。

 

原因是没有安装对应python的python-dev依赖,不然编译到boost python模块的时候就会出错。

 

所以解决方案是sudo apt-get install python-dev就行了

 

然后用boost自带的b2工具编译boost python模块的时候就不会出错了

 

注意好好看以下文档,官方文档很重要。

 

 

 

references:

http://stackoverflow.com/questions/6782071/boostbuild-patchlevel-h-does-not-exist

http://stackoverflow.com/questions/15136671/unable-to-build-boost-python

http://stackoverflow.com/questions/1771063/no-such-file-or-directory-error-with-boost-python

http://www.boost.org/doc/libs/1_56_0/libs/python/doc/building.html

http://www.boost.org/doc/libs/1_56_0/more/getting_started/unix-variants.html

转载于:https://www.cnblogs.com/foohack/p/3988402.html

FAILED: CMakeFiles/gazebo_aruco_plugin.dir/src/gazebo_aruco_plugin.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_TEST_DYN_LINK -DBOOST_THREAD_DYN_LINK -DLIBBULLET_VERSION=3.05 -DLIBBULLET_VERSION_GT_282 -Dgazebo_aruco_plugin_EXPORTS -I/home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/include -I/home/yxz/PX4_Firmware/build/px4_sitl_default/build_gazebo-classic -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-11/gazebo/msgs -I/home/yxz/PX4_Firmware/build/px4_sitl_default/mavlink -I/home/yxz/PX4_Firmware/build/px4_sitl_default/mavlink/mavlink/v2.0 -I/home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/external/OpticalFlow/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gazebo-11 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-9.7 -isystem /usr/include/ignition/math6 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport8 -isystem /usr/include/ignition/msgs5 -isystem /usr/include/ignition/common3 -isystem /usr/include/ignition/fuel_tools4 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/eigen3 -isystem /usr/local/include/opencv4 -isystem /usr/include/sdformat-9.7/sdf/.. -isystem /usr/include/ignition/cmake2 -isystem /usr/include/uuid -O2 -g -DNDEBUG -fPIC -Wno-deprecated-declarations -Wno-address-of-packed-member -I/usr/include/uuid -MD -MT CMakeFiles/gazebo_aruco_plugin.dir/src/gazebo_aruco_plugin.cpp.o -MF CMakeFiles/gazebo_aruco_plugin.dir/src/gazebo_aruco_plugin.cpp.o.d -o CMakeFiles/gazebo_aruco_plugin.dir/src/gazebo_aruco_plugin.cpp.o -c /home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/src/gazebo_aruco_plugin.cpp In file included from /home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/src/gazebo_aruco_plugin.cpp:31: /home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/include/gazebo_aruco_plugin.h:41: fatal error: opencv2/aruco.hpp: No such file or directory 41 | #include <opencv2/aruco.hpp> | compilation terminated. [72/142] Building CXX object CMakeFile...erface.dir/src/mavlink_interface.cpp.o In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22, from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23, from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14, from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42, from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25, from /usr/include/boost/smart_ptr/shared_ptr.hpp:29, from /usr/include/boost/shared_ptr.hpp:17, from /usr/include/boost/date_time/time_clock.hpp:17, from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10, from /usr/include/boost/asio/time_traits.hpp:23, from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22, from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29, from /usr/include/boost/asio/basic_deadline_timer.hpp:25, from /usr/include/boost/asio.hpp:25, from /home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/include/mavlink_interface.h:36, from /home/yxz/PX4_Firmware/Tools/simulation/gazebo-classic/sitl_gazebo-classic/src/mavlink_interface.cpp:1: /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^~~~~~~~~~~~~~~~~~~~ [77/142] Building CXX object CMakeFile...src/gazebo_camera_manager_plugin.cpp.o ninja: build stopped: subcommand failed. [899/903] Linking CXX executable bin/px4 FAILED: external/Stamp/sitl_gazebo-classic/sitl_gazebo-classic-build /home/yxz/PX4_Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo-classic/sitl_gazebo-classic-build cd /home/yxz/PX4_Firmware/build/px4_sitl_default/build_gazebo-classic && /usr/bin/cmake --build /home/yxz/PX4_Firmware/build/px4_sitl_default/build_gazebo-classic -- -j 7 ninja: build stopped: subcommand failed. make: *** [Makefile:227: px4_sitl_default] Error 1
07-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值