Quantcast

PCL 1.7 Compilation Problems

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PCL 1.7 Compilation Problems

BadR0b1t
This post was updated on .
I am having a problem with compiling PCL 1.7 on Ubuntu 12.04 I have installed all of the required libraries and they are all as up to date as I can get them. I have attached the command line output from the build:

badrobot@Shadow:build {(pcl-1.7.0rc2.1)} $ make
[  4%] Built target pcl_common
[  4%] Built target pcl_kdtree
[  4%] Built target pcl_octree
[  5%] Built target pcl_search
[  8%] Built target pcl_sample_consensus
[ 14%] Built target pcl_filters
[ 15%] Built target pcl_io_ply
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp: In function ‘int pcl::io::saveVTKFile(const string&, const PolygonMesh&, unsigned int)’:
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: error: no matching function for call to ‘getFieldIndex(const _cloud_type&, const char [4])’
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: note: candidates are:
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note: int pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note:   no known conversion for argument 1 from ‘const _cloud_type {aka const sensor_msgs::PointCloud2_<std::allocator<void> >}’ to ‘const pcl::PCLPointCloud2&’
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:49:1: note: template<class PointT> int pcl::getFieldIndex(const pcl::PointCloud<PointT>&, const string&, std::vector<pcl::PCLPointField>&)
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:64:1: note: template<class PointT> int pcl::getFieldIndex(const string&, std::vector<pcl::PCLPointField>&)
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

andersgb1
I've had the same problem.

It happened because I had a ROS PCL installation in my include paths, which apparently is searched before the local PCL include paths. So I had to remove all build files and first clear the environment variables CPATH and CMAKE_PREFIX_PATH which contained pointers to the ROS installation. Then I had to install FLANN also, since PCL found that in the ROS directory before.

I wonder why the PCL build searches system paths before its own paths for headers..?

-Anders


On 30 July 2013 15:24, BadR0b1t <[hidden email]> wrote:
I am having a problem with compiling PCL 1.7 on Ubuntu 12.04 I have installed
all of the required libraries and they are all as up to date as I can get
them. I have attached the command line output from the build:

build {(pcl-1.7.0rc2.1)} $ make
[  4%] Built target pcl_common
[  4%] Built target pcl_kdtree
[  4%] Built target pcl_octree
[  5%] Built target pcl_search
[  8%] Built target pcl_sample_consensus
[ 14%] Built target pcl_filters
[ 15%] Built target pcl_io_ply
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp: In function ‘int
pcl::io::saveVTKFile(const string&, const PolygonMesh&, unsigned int)’:
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: error: no matching
function for call to ‘getFieldIndex(const _cloud_type&, const char [4])’
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: note: candidates are:
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note: int
pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note:   no
known conversion for argument 1 from ‘const _cloud_type {aka const
sensor_msgs::PointCloud2_<std::allocator&lt;void> >}’ to ‘const
pcl::PCLPointCloud2&’
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:49:1: note:
template<class PointT> int pcl::getFieldIndex(const
pcl::PointCloud<PointT>&, const string&, std::vector<pcl::PCLPointField>&)
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:64:1: note:
template<class PointT> int pcl::getFieldIndex(const string&,
std::vector<pcl::PCLPointField>&)
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2




-----
----
BadR0b1t
--
View this message in context: http://www.pcl-users.org/PCL-1-7-Compilation-Problems-tp4028868.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
Is there anyway that I can keep my ROS version of the PCL stick around or do I need to remove all of the ROS PCL stuff totally?
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

Sergey
Administrator
Hi Mat,

You only need to not source "opt/ros/groovy/setup.bash" before running `cmake` and configuring build.

There is another thread on pcl-dev where you may find some more information about ROS and PCL: http://www.pcl-developers.org/PCL-ROS-disentanglement-td5708064.html#a5708094

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
Hi Sergey,

Thanks I will give that a try to compile PCL hopefully I won't run into any of the conflicts that the other thread you posted talks about.

Cheers,
Mat
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
In reply to this post by Sergey
I just tried to build PCL 1.7 without the groovy or any ROS distro sourced and I am still coming up with the same error:

Error

badrobot@Shadow:build {(pcl-1.7.0rc2)} $ make 
[  4%] Built target pcl_common
[  4%] Built target pcl_kdtree
[  4%] Built target pcl_octree
[  5%] Built target pcl_search
[  8%] Built target pcl_sample_consensus
[ 14%] Built target pcl_filters
[ 15%] Built target pcl_io_ply
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp: In function ‘int pcl::io::saveVTKFile(const string&, const PolygonMesh&, unsigned int)’:
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: error: no matching function for call to ‘getFieldIndex(const _cloud_type&, const char [4])’
/home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: note: candidates are:
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note: int pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)
/home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note:   no known conversion for argument 1 from ‘const _cloud_type {aka const sensor_msgs::PointCloud2_<std::allocator<void> >}’ to ‘const pcl::PCLPointCloud2&’
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:49:1: note: template int pcl::getFieldIndex(const pcl::PointCloud&, const string&, std::vector&)
/home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:64:1: note: template int pcl::getFieldIndex(const string&, std::vector&)
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

Sergey
Administrator
Make sure to remove the old "build" folder and start compilation from scratch.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
Hi Sergey,

That helped but I only got a little bit further in the compilation. I am not encountering the following error:

Scanning dependencies of target pcl_io
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/debayer.cpp.o
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/pcd_grabber.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/pcd_io.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/ply_io.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/ascii_io.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/compression.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/lzf.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/lzf_image_io.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/obj_io.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_grabber.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/hdl_grabber.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/robot_eye_grabber.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_lib_io.cpp.o
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp: In function ‘int pcl::io::savePolygonFileVTK(const string&, const pcl::PolygonMesh&)’:
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:181:16: error: ‘class vtkPolyDataWriter’ has no member named ‘SetInput’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp: In function ‘int pcl::io::savePolygonFilePLY(const string&, const pcl::PolygonMesh&)’:
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:197:16: error: ‘class vtkPLYWriter’ has no member named ‘SetInput’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp: In function ‘int pcl::io::savePolygonFileSTL(const string&, const pcl::PolygonMesh&)’:
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:212:14: error: ‘class vtkPolyData’ has no member named ‘Update’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:214:16: error: ‘class vtkSTLWriter’ has no member named ‘SetInput’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp: In function ‘void pcl::io::saveRangeImagePlanarFilePNG(const string&, const pcl::RangeImagePlanar&)’:
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:486:39: error: no matching function for call to ‘vtkImageData::SetNumberOfScalarComponents(int)’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:486:39: note: candidate is:
/usr/local/include/vtk-6.0/vtkImageData.h:298:15: note: static void vtkImageData::SetNumberOfScalarComponents(int, vtkInformation*)
/usr/local/include/vtk-6.0/vtkImageData.h:298:15: note:   candidate expects 2 arguments, 1 provided
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:487:10: error: ‘class vtkImageData’ has no member named ‘SetScalarTypeToFloat’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:488:26: error: no matching function for call to ‘vtkImageData::AllocateScalars()’
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:488:26: note: candidates are:
/usr/local/include/vtk-6.0/vtkImageData.h:237:16: note: virtual void vtkImageData::AllocateScalars(int, int)
/usr/local/include/vtk-6.0/vtkImageData.h:237:16: note:   candidate expects 2 arguments, 0 provided
/usr/local/include/vtk-6.0/vtkImageData.h:244:16: note: virtual void vtkImageData::AllocateScalars(vtkInformation*)
/usr/local/include/vtk-6.0/vtkImageData.h:244:16: note:   candidate expects 1 argument, 0 provided
/home/badrobot/pcl-trunk/io/src/vtk_lib_io.cpp:507:47: error: ‘class vtkImageData’ has no member named ‘GetProducerPort’
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/vtk_lib_io.cpp.o] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

Sergey
Administrator
Mat,

This problem seems to be unrelated with the previous one. I think your version of VTK (6.0) is excessively up-to-date. Try to use the default one from "apt-get" (5.8).

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
Thanks Sergey,

that solved the problem!

Cheers,
Mat
----
BadR0b1t
wwl
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

wwl
This post has NOT been accepted by the mailing list yet.
I am also using vtk6.0 and experiencing the same error. Could you tell me how to use 5.8 instead?

Thanks,
Ben
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

BadR0b1t
Hi Ben,

To remove it you just go to your local /usr/local folder and remove everything associated with VTK6.0 for me this was a bunch of .so files and a cmake folder. I hope that this helps.

Cheers,
Mat
----
BadR0b1t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

Sergey
Administrator
In reply to this post by wwl
Hi Ben,

When configuring your build invoke cmake with: `cmake .. -DVTK_DIR=/usr/lib/vtk-5.8`.

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL 1.7 Compilation Problems

RobEvans
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by andersgb1
Just a heads up to anyone trying to solve this problem in the future, I had to delete the CMakeCache.txt file in the root pcl directory after following these instructions for the compile to work.

Also I didn't have the environment variables mentioned in the quoted post but that didn't seem to matter.  All I did was remove the "source opt/ros/groovy/setup.bash" from my ~/.bashrc, make clean and delete the CMakeCache.txt, then sudo make and it worked.

edit: I was later able to compile the trunk even with opt/ros/groovy/setup.bash sourced.  Make of that what you will...

andersgb1 wrote
I've had the same problem.

It happened because I had a ROS PCL installation in my include paths, which
apparently is searched before the local PCL include paths. So I had to
remove all build files and first clear the environment variables CPATH and
CMAKE_PREFIX_PATH which contained pointers to the ROS installation. Then I
had to install FLANN also, since PCL found that in the ROS directory before.

I wonder why the PCL build searches system paths before its own paths for
headers..?

-Anders


On 30 July 2013 15:24, BadR0b1t <[hidden email]> wrote:

> I am having a problem with compiling PCL 1.7 on Ubuntu 12.04 I have
> installed
> all of the required libraries and they are all as up to date as I can get
> them. I have attached the command line output from the build:
>
> build {(pcl-1.7.0rc2.1)} $ make
> [  4%] Built target pcl_common
> [  4%] Built target pcl_kdtree
> [  4%] Built target pcl_octree
> [  5%] Built target pcl_search
> [  8%] Built target pcl_sample_consensus
> [ 14%] Built target pcl_filters
> [ 15%] Built target pcl_io_ply
> [ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
> /home/badrobot/pcl-trunk/io/src/vtk_io.cpp: In function ‘int
> pcl::io::saveVTKFile(const string&, const PolygonMesh&, unsigned int)’:
> /home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: error: no matching
> function for call to ‘getFieldIndex(const _cloud_type&, const char [4])’
> /home/badrobot/pcl-trunk/io/src/vtk_io.cpp:121:58: note: candidates are:
> /home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note: int
> pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)
> /home/badrobot/pcl-trunk/common/include/pcl/common/io.h:58:3: note:   no
> known conversion for argument 1 from ‘const _cloud_type {aka const
> sensor_msgs::PointCloud2_<std::allocator&lt;void> >}’ to ‘const
> pcl::PCLPointCloud2&’
> /home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:49:1: note:
> template<class PointT> int pcl::getFieldIndex(const
> pcl::PointCloud<PointT>&, const string&, std::vector<pcl::PCLPointField>&)
> /home/badrobot/pcl-trunk/common/include/pcl/common/impl/io.hpp:64:1: note:
> template<class PointT> int pcl::getFieldIndex(const string&,
> std::vector<pcl::PCLPointField>&)
> make[2]: *** [io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o] Error 1
> make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
> make: *** [all] Error 2
>
>
>
>
> -----
> ----
> BadR0b1t
> --
> View this message in context:
> http://www.pcl-users.org/PCL-1-7-Compilation-Problems-tp4028868.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list
> archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Loading...