siddyyagno3 / brown-ros-pkg

Automatically exported from code.google.com/p/brown-ros-pkg
0 stars 0 forks source link

ardrone_brown package linking error to libsdl1.2-dev on Ubuntu 11.10 #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. On a 64-bit Ubuntu 11.10 machine check out the ardrone_brown package
2. rosdep and then rosmake it
3. linking errors to sdl produced (see below for exact errors)

What is the expected output? What do you see instead?
Linking CXX executable bin/ardrone_driver
  /usr/common/bird_repo/cpp/external_ros_pkgs/brown-ros-pkg/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_close':
  vp_stages_o_sdl.c:(.text+0x14): undefined reference to `SDL_ShowCursor'
  vp_stages_o_sdl.c:(.text+0x1d): undefined reference to `SDL_FreeYUVOverlay'
  vp_stages_o_sdl.c:(.text+0x26): undefined reference to `SDL_FreeSurface'
  vp_stages_o_sdl.c:(.text+0x2b): undefined reference to `SDL_Quit'
  /usr/common/bird_repo/cpp/external_ros_pkgs/brown-ros-pkg/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_open':
  vp_stages_o_sdl.c:(.text+0x54): undefined reference to `SDL_Init'
  /usr/common/bird_repo/cpp/external_ros_pkgs/brown-ros-pkg/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `thread_escaper':
  vp_stages_o_sdl.c:(.text+0xe4): undefined reference to `SDL_PollEvent'
  /usr/common/bird_repo/cpp/external_ros_pkgs/brown-ros-pkg/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_transform':
  vp_stages_o_sdl.c:(.text+0x21e): undefined reference to `SDL_SetVideoMode'
  vp_stages_o_sdl.c:(.text+0x229): undefined reference to `SDL_ShowCursor'
  vp_stages_o_sdl.c:(.text+0x23d): undefined reference to `SDL_CreateYUVOverlay'
  vp_stages_o_sdl.c:(.text+0x2cf): undefined reference to `SDL_LockYUVOverlay'
  vp_stages_o_sdl.c:(.text+0x4e9): undefined reference to `SDL_UnlockYUVOverlay'
  vp_stages_o_sdl.c:(.text+0x4fa): undefined reference to `SDL_DisplayYUVOverlay'
  collect2: ld returned 1 exit status
  make[2]: *** [bin/ardrone_driver] Error 1
  make[1]: *** [CMakeFiles/ardrone_driver.dir/all] Error 2

What version of the product are you using? On what operating system?
ros electric on Ubuntu 11.10 64 bit. 

Please provide any additional information below.
On Ubuntu 10.04 the same package compiles without any problems. Whats baffling 
is that libsdl so and .a files are at the same location on both distributions 
(/usr/lib/).

Original issue reported on code.google.com by 3dey....@gmail.com on 25 Jan 2012 at 9:01

GoogleCodeExporter commented 8 years ago
Hi,

Not sure if this is the way to do it, but i did get it to compile on 11.10 
64bit. The problem doesn't seem to be with SDL.h. Moving SDL to the end of the 
list in target linking of CMakeLists.txt (line 35):

target_link_libraries(ardrone_driver vlib pc_ardrone sdk SDL)

it now gives me a ardrone_driver in the bin folder. Hope this helps, unless 
there is a better way to do this?

Original comment by dehann.f...@gmail.com on 3 Mar 2012 at 9:40

GoogleCodeExporter commented 8 years ago
I actually just figured that put a couple of weeks ago. Should have posted that 
here. What is baffling though is why on Ubuntu 10.04 64 bit the provided cmake 
file worked in the first place?

Original comment by 3dey....@gmail.com on 3 Mar 2012 at 9:49

GoogleCodeExporter commented 8 years ago
It seems there were a couple of linking order problems around SDL in 11.10, not 
just restricted to ROS. Maybe the same is happing with other packages.. Think a 
subtle change may have crept into the compiling and linking functions.

Original comment by dehann.f...@gmail.com on 4 Mar 2012 at 9:14