ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosmake phidgets-ros-pkg undefined reference

asked 2012-03-06 03:08:58 -0500

anbaldinger gravatar image

Hello,

I struggle to compile the phidgets-ros-pkg:

I updated to Ubuntu 11.10 and have now ros electric (fresh install). I downloaded the phidgets-ros-pkg from https://launchpad.net/phidgets-ros-pkg and also installed the newest Phidget21 drivers for linux from http://www.phidgets.com/drivers.php. Now whenever I try $ rosmake phidgets I get this:

[ rosmake ] Last 40 linesidgets: 3.9 sec ]                                                                            [ 1 Active 62/63 Complete ]
{-------------------------------------------------------------------------------
  make[3]: Betrete Verzeichnis '/home/robot-head/ros/phidgets/build'
  make[3]: Verlasse Verzeichnis '/home/robot-head/ros/phidgets/build'
  [ 65%] Built target rosbuild_precompile
  make[3]: Betrete Verzeichnis '/home/robot-head/ros/phidgets/build'
  make[3]: Verlasse Verzeichnis '/home/robot-head/ros/phidgets/build'
  make[3]: Betrete Verzeichnis '/home/robot-head/ros/phidgets/build'
  Linking CXX executable ../bin/accelerometer
  CMakeFiles/accelerometer.dir/src/accelerometer.o: In function `DetachHandler(_CPhidget*, void*)':
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:72: undefined reference to `CPhidget_getDeviceName'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:73: undefined reference to `CPhidget_getSerialNumber'
  CMakeFiles/accelerometer.dir/src/accelerometer.o: In function `AttachHandler(_CPhidget*, void*)':
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:60: undefined reference to `CPhidget_getDeviceName'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:61: undefined reference to `CPhidget_getSerialNumber'
  CMakeFiles/accelerometer.dir/src/accelerometer.o: In function `attach(_CPhidgetAccelerometer*&, int, double)':
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:152: undefined reference to `CPhidgetAccelerometer_create'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:155: undefined reference to `CPhidget_set_OnAttach_Handler'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:156: undefined reference to `CPhidget_set_OnDetach_Handler'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:157: undefined reference to `CPhidget_set_OnError_Handler'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:162: undefined reference to `CPhidgetAccelerometer_set_OnAccelerationChange_Handler'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:165: undefined reference to `CPhidget_open'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:175: undefined reference to `CPhidget_waitForAttachment'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:178: undefined reference to `CPhidget_getErrorDescription'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:185: undefined reference to `CPhidgetAccelerometer_getAxisCount'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:189: undefined reference to `CPhidgetAccelerometer_setAccelerationChangeTrigger'
  CMakeFiles/accelerometer.dir/src/accelerometer.o: In function `disconnect(_CPhidgetAccelerometer*&)':
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:202: undefined reference to `CPhidget_close'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:203: undefined reference to `CPhidget_delete'
  CMakeFiles/accelerometer.dir/src/accelerometer.o: In function `display_properties(_CPhidgetAccelerometer*)':
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:121: undefined reference to `CPhidget_getDeviceType'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:122: undefined reference to `CPhidget_getSerialNumber'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:123: undefined reference to `CPhidget_getDeviceVersion'
  /home/robot-head/ros/phidgets/src/accelerometer.cpp:125: undefined reference to `CPhidgetAccelerometer_getAxisCount'
  collect2: ld gab 1 als Ende-Status zurück
  make[3]: *** [../bin/accelerometer] Fehler 1
  make[3]: Verlasse Verzeichnis '/home/robot-head/ros/phidgets/build'
  make[2]: *** [CMakeFiles/accelerometer.dir/all] Fehler 2
  make[2]: Verlasse Verzeichnis '/home/robot-head/ros/phidgets/build'
  make[1]: *** [all] Fehler 2
  make[1]: Verlasse Verzeichnis '/home/robot-head/ros/phidgets/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package phidgets written to:
[ rosmake ]    /home/robot-head/.ros/rosmake/rosmake_output-20120306-160024/phidgets/build_output.log
[rosmake-0] Finished <<< phidgets [FAIL] [ 3.93 seconds ]                                                                                        
[ rosmake ] Halting due to failure in package phidgets ...
(more)
edit retag flag offensive close merge delete

Comments

Problem solved. Of course it had to do with the shared library phidget21. The solution was to edit CMakeLists.txt: Exclude (comment) all parts of the phidgets-ros-pkg from compilation i didn't need and add 'target_link_libraries(advanced_servo phidget21)' (i needed only advanced_servo. Worked!

anbaldinger gravatar image anbaldinger  ( 2012-03-06 22:16:29 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2012-03-29 21:31:01 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

From @anbaldinger Problem solved. Of course it had to do with the shared library phidget21. The solution was to edit CMakeLists.txt: Exclude (comment) all parts of the phidgets-ros-pkg from compilation i didn't need and add 'target_link_libraries(advanced_servo phidget21)' (i needed only advanced_servo. Worked!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-06 03:08:58 -0500

Seen: 607 times

Last updated: Mar 29 '12