Pcl and fedora

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Pcl and fedora

Maya
Hello everyone,

I'm using PCL 1-7 in fedora 21 with VTK 6. I was wondering if someone could confirm that the version in the repo actually work (or not) with vtk 6. When I compile I have this error :

Linking CXX executable /home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main
/usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to symbol '_Z38vtkInteractionStyle_AutoInit_Constructv'
/usr/lib64/vtk/libvtkInteractionStyle.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
indoor_navigation/CMakeFiles/main.dir/build.make:189: recipe for target '/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main' failed
make[2]: *** [/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main] Error 1
CMakeFiles/Makefile2:713: recipe for target 'indoor_navigation/CMakeFiles/main.dir/all' failed
make[1]: *** [indoor_navigation/CMakeFiles/main.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

And I must say this error is here only when I try to use vizualisation since it is the part that is dependant on VTK. I linked pcl and VTK in my CMakeList.txt as follow :

find_package(VTK REQUIRED)
include( ${VTK_USE_FILE} )

find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
#link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

So before going through the compiling of PCL from source I just wanted to make sure that it is actually not working and that it's not just me who overlooked something.

Thanks a lot.
Reply | Threaded
Open this post in threaded view
|

Re: Pcl and fedora

Rich Mattes-2
On Mon, Apr 27, 2015 at 12:46 PM, Maya <[hidden email]> wrote:
Hello everyone,

I'm using PCL 1-7 in fedora 21 with VTK 6. I was wondering if someone could
confirm that the version in the repo actually work (or not) with vtk 6. When
I compile I have this error :

Linking CXX executable
/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main
/usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to
symbol '_Z38vtkInteractionStyle_AutoInit_Constructv'
/usr/lib64/vtk/libvtkInteractionStyle.so.1: error adding symbols: DSO
missing from command line
collect2: error: ld returned 1 exit status
indoor_navigation/CMakeFiles/main.dir/build.make:189: recipe for target
'/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main' failed
make[2]: ***
[/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main] Error
1
CMakeFiles/Makefile2:713: recipe for target
'indoor_navigation/CMakeFiles/main.dir/all' failed
make[1]: *** [indoor_navigation/CMakeFiles/main.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

And I must say this error is here only when I try to use vizualisation since
it is the part that is dependant on VTK. I linked pcl and VTK in my
CMakeList.txt as follow :

find_package(VTK REQUIRED)
include( ${VTK_USE_FILE} )

find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
#link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})


Did you forget "target_link_libraries(${PCL_LIBRARIES})"?

Rich

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

Re: Pcl and fedora

Maya
He !

Nopre. Here is the part of my CMake concerning PCL : 

find_package(VTK REQUIRED)
include( ${VTK_USE_FILE} )
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable(main src/main.cpp)
target_link_libraries(main
  ${catkin_LIBRARIES}  ${PCL_LIBRARIES} 
   ${VTK_LIBRARIES}
)

So it should be good but I have this error :

/usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to symbol '_Z38vtkInteractionStyle_AutoInit_Constructv'
/usr/lib64/vtk/libvtkInteractionStyle.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
indoor_navigation/CMakeFiles/main.dir/build.make:189: recipe for target '/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main' failed
make[2]: *** [/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main] Error 1
CMakeFiles/Makefile2:2505: recipe for target 'indoor_navigation/CMakeFiles/main.dir/all' failed
make[1]: *** [indoor_navigation/CMakeFiles/main.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I feel like PCL is just not compile to work with VTK 6 which is the standard one under fedora. Knowing that it should work with it if I compile PCL from source I find it a bit weird that the one in the repo don't.

Best, 
 

2015-05-01 21:37 GMT+02:00 Rich Mattes-2 [via Point Cloud Library (PCL) Users mailing list] <[hidden email]>:
On Mon, Apr 27, 2015 at 12:46 PM, Maya <[hidden email]> wrote:
Hello everyone,

I'm using PCL 1-7 in fedora 21 with VTK 6. I was wondering if someone could
confirm that the version in the repo actually work (or not) with vtk 6. When
I compile I have this error :

Linking CXX executable
/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main
/usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to
symbol '_Z38vtkInteractionStyle_AutoInit_Constructv'
/usr/lib64/vtk/libvtkInteractionStyle.so.1: error adding symbols: DSO
missing from command line
collect2: error: ld returned 1 exit status
indoor_navigation/CMakeFiles/main.dir/build.make:189: recipe for target
'/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main' failed
make[2]: ***
[/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main] Error
1
CMakeFiles/Makefile2:713: recipe for target
'indoor_navigation/CMakeFiles/main.dir/all' failed
make[1]: *** [indoor_navigation/CMakeFiles/main.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

And I must say this error is here only when I try to use vizualisation since
it is the part that is dependant on VTK. I linked pcl and VTK in my
CMakeList.txt as follow :

find_package(VTK REQUIRED)
include( ${VTK_USE_FILE} )

find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
#link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})


Did you forget "target_link_libraries(${PCL_LIBRARIES})"?

Rich

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



If you reply to this email, your message will be added to the discussion below:
http://www.pcl-users.org/Pcl-and-fedora-tp4038117p4038189.html
To unsubscribe from Pcl and fedora, click here.
NAML



--
Malcolm Mielle
Ingénieur Robotique Polytech Paris UPMC
Tel : +33(0)782829386
Reply | Threaded
Open this post in threaded view
|

Re: Pcl and fedora

Jochen Sprickerhof
Administrator
Hi Maya,

* Maya <[hidden email]> [2015-05-03 17:13]:
> I feel like PCL is just not compile to work with VTK 6 which is the
> standard one under fedora. Knowing that it should work with it if I compile
> PCL from source I find it a bit weird that the one in the repo don't.

If you mean PCL 1.7, then yes. Fedora uses a patched version. The next
version, available from git, has VTK6 support.

Cheers Jochen

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

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pcl and fedora

Rich Mattes-2
In reply to this post by Maya
On 05/03/2015 08:13 PM, Maya wrote:

> He !
>
> Nopre. Here is the part of my CMake concerning PCL :
>
> find_package(VTK REQUIRED)
>> include( ${VTK_USE_FILE} )
>> find_package(PCL REQUIRED)
>> include_directories(${PCL_INCLUDE_DIRS})
>> add_definitions(${PCL_DEFINITIONS})
>>
>> add_executable(main src/main.cpp)
>> target_link_libraries(main
>>    ${catkin_LIBRARIES}  ${PCL_LIBRARIES}
>>     ${VTK_LIBRARIES}
>> )
>
>
> So it should be good but I have this error :
>
> /usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to
>> symbol '_Z38vtkInteractionStyle_AutoInit_Constructv'
>> /usr/lib64/vtk/libvtkInteractionStyle.so.1: error adding symbols: DSO
>> missing from command line
>> collect2: error: ld returned 1 exit status
>> indoor_navigation/CMakeFiles/main.dir/build.make:189: recipe for target
>> '/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main' failed
>> make[2]: ***
>> [/home/malcolm/ros_ws/indigo_catkin/devel/lib/indoor_navigation/main] Error
>> 1
>> CMakeFiles/Makefile2:2505: recipe for target
>> 'indoor_navigation/CMakeFiles/main.dir/all' failed
>> make[1]: *** [indoor_navigation/CMakeFiles/main.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>
>
> I feel like PCL is just not compile to work with VTK 6 which is the
> standard one under fedora. Knowing that it should work with it if I compile
> PCL from source I find it a bit weird that the one in the repo don't.
>
> Best,

Ok I think I've gotten to the bottom of this.

VTK 6 landed in Fedora 21 before PCL was updated to work with VTK6, so
pcl-1.7.1 in Fedora 21 contains back-ports of PCL development branch
that added VTK6 support.  You have stumbled upon a piece that I missed
while backporting the VTK support.  PCLConfig.cmake defines the
${VTK_LIBRARIES} variable in order to add it to the ${PCL_LIBRARIES}
variable (so you don't need to manually link to the VTK libraries when
you PCL.)  However, the PCLConfig.cmake in Fedora 21 defines the
${VTK_LIBRARIES} variable incorrectly, resulting in a lot of missing VTK
libraries and ultimately your error.  I am currently pushing an update
to the Fedora 21 package to fix PCLConfig.cmake, and I am also looking
into upgrading to pcl-1.7.2, which has upstream VTK6 support (I need to
verify that there are no ABI breakages before pushing that update.)
Fedora 22 and higher contain pcl-1.7.2.

In your case, there's a second error.  Manually finding and linking with
the VTK libraries *should* work, but in your example find_package(VTK)
is defining ${VTK_LIBRARIES}, and then find_package(PCL) is re-defining
it to the incorrect values, which is why you can't link.  As a
work-around, you can call find_package(PCL) before find_package(VTK).
Once the updated Fedora package is available, you shouldn't need the
find_package(VTK) bits at all, and the PCL_LIBRARIES variable should
contain the necessary VTK libraries.

So given the above, you shouldn't need to build PCL from source.  If you
have any more issues with the Fedora version of PCL, please file a bug
against the Fedora PCL package[1].

Rich

[1] https://apps.fedoraproject.org/packages/pcl/bugs/all
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Pcl and fedora

VictorLamoine
Administrator
Hello,

Also note that while VTK 6 support was added in PCL 1.7.2, there are bugfixes for VTK 6 versions in pcl trunk (not everything is working perfectly in PCL 1.7.2 when you compile against VTK6)

https://github.com/PointCloudLibrary/pcl/pulls?utf8=%E2%9C%93&q=is%3Apr+vtk

Bye