CCNYRoboticsLab / ccny_rgbd_tools

ccny_rgbd_tools
GNU Lesser General Public License v3.0
125 stars 76 forks source link

Runtime symbol lookup error #4

Closed pavel-kirienko closed 11 years ago

pavel-kirienko commented 11 years ago

Hi guys, let me provide another little patch.

There is the problem: http://answers.ros.org/question/55401/ccny_rgbd-runtime-symbol-lookup-error

There is solution:

+rosbuild_add_library (ccny_rgbd_util
+  src/rgbd_util.cpp
+)
+
 rosbuild_add_library (ccny_rgbd_registration
   src/registration/motion_estimation.cpp
   src/registration/motion_estimation_icp.cpp
   src/registration/motion_estimation_icp_prob_model.cpp
 )

+target_link_libraries(ccny_rgbd_registration
+  ccny_rgbd_util)
+
 rosbuild_add_library (ccny_rgbd_mapping
   src/mapping/keyframe_graph_detector.cpp
   src/mapping/keyframe_graph_solver.cpp
   src/mapping/keyframe_graph_solver_g2o.cpp
 )

-rosbuild_add_library (ccny_rgbd_util
-  src/rgbd_util.cpp
-)
-

I am curious how you managed to get it working without this patch. Could you please share your versions of OS/GCC/ld?

Mine: Ubuntu 12.04 GCC 4.6.3

pavel@spym-pc:~$ ld --version
GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
idryanov commented 11 years ago

Thanks for the patch. I applied it. If you could confirm it works, I'll close the ticket.

I was linking against that library, but when creating the binary:

target_link_libraries (visual_odometry_node 
  ccny_rgbd_structures
  ccny_rgbd_features
  ccny_rgbd_registration
  ccny_rgbd_util
  ...

That wasn't the correct place to do it though. I'm not happy with the state of the CMakeLists as it is, it's messy and prone to errors like this. I'm going to look into cleaning it up. Suggestions are welcome.

My system:

Ubuntu 12.10

$ gcc --version
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22.90.20120924
pavel-kirienko commented 11 years ago

If you could confirm it works, I'll close the ticket.

It works.

My system:

Maybe the crucial difference is the compiler version.