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

ccny_vision: Oneiric compile-error (glut related)

asked 2011-10-26 00:51:26 -0600

Joris gravatar image

updated 2011-10-26 05:42:57 -0600

tfoote gravatar image

This compile error has nothing to do with the videodev.h includes for which a patch still works on Ubuntu Oneiric (11.10).

Also I manually patched robot_model/ivcon/CMakeLists.txt to build in Oneiric, as per: https://kforge.ros.org/robotmodel/robot_model/rev/ca7f1a0f1a58

The problem I can't fix is that ar_pose won't build due to some linking error related to glut. I suspect this error may be related to the libglut --> freeglut change in Oneiric, since the error did not crop up in either Debian Squeeze (amd64) or Ubuntu Natty (armel). Perhaps some compile flags would fix this. Build error context:

  gsub.c:(.text+0x2e4b): undefined reference to `glVertex2f'
  gsub.c:(.text+0x2e50): undefined reference to `glEnd'
  /home/joris/ros/stacks/ccny_vision/artoolkit/lib/libARgsub.a(gsub.o): In function `argInit':
  gsub.c:(.text+0x3018): undefined reference to `glutInitDisplayMode'
  gsub.c:(.text+0x3027): undefined reference to `glutInitWindowPosition'
  gsub.c:(.text+0x3038): undefined reference to `glutInitWindowSize'
  gsub.c:(.text+0x3042): undefined reference to `glutCreateWindow'
  gsub.c:(.text+0x3051): undefined reference to `glutFullScreen'
  gsub.c:(.text+0x305b): undefined reference to `glutGet'
  gsub.c:(.text+0x306b): undefined reference to `glutGet'
  gsub.c:(.text+0x30a1): undefined reference to `glGenTextures'
  gsub.c:(.text+0x30b1): undefined reference to `glBindTexture'
  gsub.c:(.text+0x30c0): undefined reference to `glPixelStorei'
  gsub.c:(.text+0x30d7): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x30ee): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3105): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x311c): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3133): undefined reference to `glTexEnvf'
  gsub.c:(.text+0x3143): undefined reference to `glBindTexture'
  gsub.c:(.text+0x3152): undefined reference to `glPixelStorei'
  gsub.c:(.text+0x3169): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3180): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3197): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x31ae): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x31c5): undefined reference to `glTexEnvf'
  gsub.c:(.text+0x31d5): undefined reference to `glBindTexture'
  gsub.c:(.text+0x31e4): undefined reference to `glPixelStorei'
  gsub.c:(.text+0x31fb): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3212): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3229): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3240): undefined reference to `glTexParameterf'
  gsub.c:(.text+0x3257): undefined reference to `glTexEnvf'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/ar_multi] Error 1
  make[3]: Leaving directory `/home/joris/ros/stacks/ccny_vision/ar_pose/build'
  make[2]: *** [CMakeFiles/ar_multi.dir/all] Error 2
  make[2]: Leaving directory `/home/joris/ros/stacks/ccny_vision/ar_pose/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/joris/ros/stacks/ccny_vision/ar_pose/build'
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-11-28 19:33:13 -0600

ddimarco gravatar image

The new linker coming with Ubuntu Oneiric is less tolerant regarding the order of linker flags than previous versions.

A quick and dirty way to have ar_pose compile & link is to run this command in the ar_pose directory:

sed '/^#rosbuild_gensrv\(\)/a set\(CMAKE_EXE_LINKER_FLAGS -Wl,--no-as-needed\)' -i CMakeLists.txt

edit flag offensive delete link more

Comments

works for me. thanks a lot!
Enrique gravatar image Enrique  ( 2011-11-29 10:34:24 -0600 )edit
0

answered 2011-11-20 15:22:48 -0600

did you solve this problem? I m also stuck with the same problem.

edit flag offensive delete link more

Comments

me as well :( I also had to solve some problems with v4l1 and add write permissions to include and lib dirs, but now I'm stuck in ar_pose because of libARgsub.a
Enrique gravatar image Enrique  ( 2011-11-28 09:32:22 -0600 )edit

Question Tools

Stats

Asked: 2011-10-26 00:51:26 -0600

Seen: 768 times

Last updated: Nov 28 '11