点云技术相关产学研社区

 找回密码
 立即注册加入PCL中国点云技术相关产学研社区

扫一扫,访问微社区

查看: 6191|回复: 6

ubuntu12.04编译PCL1.6.0出错

[复制链接]
发表于 2013-3-7 15:17:14 | 显示全部楼层 |阅读模式
       我使用的boost库是最新的1.53.0的,也是通过源码编译安装。在编译代码过程中出现如下错误:

[ 41%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_grabber.cpp.o
In file included from /home/hcx/download/PCL-1.6.0-Source/common/include/pcl/point_types.h:301:0,
                 from /home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:43:
/home/hcx/download/PCL-1.6.0-Source/common/include/pcl/impl/point_types.hpp:1009:68: warning: ‘SHOT’ is deprecated [-Wdeprecated-declarations]
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘pcl:ointCloud<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >:tr pcl::OpenNIGrabber::convertToEigenPointCloud(const boost::shared_ptr<openni_wrapper::Image>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:738:57: error: no matching function for call to ‘boost::shared_array<unsigned char>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:738:57: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = unsigned char]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<unsigned char>::shared_array(const boost::shared_array<unsigned char>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note:   no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<unsigned char>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:768:63: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:768:63: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note:   no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘pcl:ointCloud<pcl:ointXYZI>:tr pcl::OpenNIGrabber::convertToXYZIPointCloud(const boost::shared_ptr<openni_wrapper::IRImage>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:849:63: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:849:63: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note:   no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:850:60: error: no matching function for call to ‘boost::shared_array<short unsigned int>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:850:60: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)
/usr/local/include/boost/smart_ptr/shared_array.hpp:83:41: note: template<class Y, class D, class A> boost::shared_array::shared_array(Y*, D, A)
/usr/local/include/boost/smart_ptr/shared_array.hpp:76:32: note: template<class Y, class D> boost::shared_array::shared_array(Y*, D)
/usr/local/include/boost/smart_ptr/shared_array.hpp:65:14: note: template<class Y> boost::shared_array::shared_array(Y*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note: boost::shared_array<T>::shared_array() [with T = short unsigned int]
/usr/local/include/boost/smart_ptr/shared_array.hpp:60:5: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note: boost::shared_array<short unsigned int>::shared_array(const boost::shared_array<short unsigned int>&)
/usr/local/include/boost/smart_ptr/shared_array.hpp:48:25: note:   no known conversion for argument 1 from ‘int’ to ‘const boost::shared_array<short unsigned int>&’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp: In member function ‘typename pcl:ointCloud<T>:tr pcl::OpenNIGrabber::convertToXYZRGBPointCloud(const boost::shared_ptr<openni_wrapper::Image>&, const boost::shared_ptr<openni_wrapper:epthImage>&) const [with PointT = pcl:ointXYZRGB, typename pcl:ointCloud<T>:tr = boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >]’:
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:514:104:   instantiated from here
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:621:57: error: no matching function for call to ‘boost::shared_array<unsigned char>::shared_array(int)’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:621:57: note: candidates are:
/usr/local/include/boost/smart_ptr/shared_array.hpp:126:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, boost::shared_array<T>::element_type*)
/usr/local/include/boost/smart_ptr/shared_array.hpp:111:5: note: template<class Y> boost::shared_array::shared_array(const boost::shared_array<Y>&, typename boost::detail::sp_enable_if_convertible<Y [], T []>::type)

.........

........
/usr/local/include/boost/smart_ptr/shared_ptr.hpp: In function ‘void boost::detail::sp_assert_convertible() [with Y = int [], T = short unsigned int []]’:
/usr/local/include/boost/smart_ptr/shared_array.hpp:67:9:   instantiated from ‘boost::shared_array<T>::shared_array(Y*) [with Y = int, T = short unsigned int]’
/home/hcx/download/PCL-1.6.0-Source/io/src/openni_grabber.cpp:576:69:   instantiated from here
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:261:18: error: size of array is negative
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/openni_grabber.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
     请问哪位在Ubuntu12.04上成功编译了PCL?这个问题是boost库的问题么?

回复

使用道具 举报

发表于 2013-3-7 18:56:24 | 显示全部楼层
你的boost版本也太新了吧,你试一试1.49,这个问题我好像看到过,还是最近的。
回复 支持 反对

使用道具 举报

发表于 2013-3-7 19:02:49 | 显示全部楼层
能否写个在ubuntu下详细的编译过程,与大家分享。官方提供的比较简单,多半人问题都是ros上的。搭建一次环境挺不容易的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-8 16:47:50 | 显示全部楼层
admin 发表于 2013-3-7 18:56
你的boost版本也太新了吧,你试一试1.49,这个问题我好像看到过,还是最近的。
...

确实是boost库的问题,我换了1.46.1的就可以编译通过了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-3-8 16:50:54 | 显示全部楼层
admin 发表于 2013-3-7 19:02
能否写个在ubuntu下详细的编译过程,与大家分享。官方提供的比较简单,多半人问题都是ros上的。搭建一次环 ...

好的,我总结一下
回复 支持 反对

使用道具 举报

发表于 2013-3-10 09:11:27 | 显示全部楼层
古♂月 发表于 2013-3-8 16:47
确实是boost库的问题,我换了1.46.1的就可以编译通过了

O(∩_∩)O~,版本挺重要的。
本来还想更新下库的版本,算了,再延迟。
回复 支持 反对

使用道具 举报

发表于 2014-3-11 10:41:11 | 显示全部楼层
你好,我是直接apt-get就成功了,不过发现生成的是PCL1.7版本的,里面有一些声明和之前用的1.6版本有些差别,请问该怎样处理?
回复 支持 反对

使用道具 举报

本版积分规则

QQ|小黑屋|点云技术相关产学研社区 ( 陕ICP备13001629号 )

GMT+8, 2024-5-20 02:43 , Processed in 1.296651 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表