Ask Your Question
0

cv_bridge fails to link sensor_msgs on OSX

asked 2013-06-01 12:31:23 -0500

Artem gravatar image

updated 2014-01-28 17:16:44 -0500

ngrennan gravatar image

I decided to rebuild groovy on Mac OSX 10.8 but some weird errors occurred that I have never seen before. I am getting linking errors while building cv_bridge. The linker refers to sensor_msgs, but sensor_msgs does not contain any dynamic libraries, it only contains *.h, *.py and *.pyc.

Do you have any ideas how to fix this?

Here is the log


Linking CXX shared library /Users/me/Documents/Research/rosws/ros_catkin_ws/devel_isolated/cv_bridge/lib/libcv_bridge.dylib
ld: warning: directory not found for option '-L/opt/ros/groovy/share/OpenCV/3rdparty/lib'
Undefined symbols for architecture x86_64:
  "sensor_msgs::image_encodings::TYPE_16SC1", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16SC2", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16SC3", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16SC4", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16UC1", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16UC2", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16UC3", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_16UC4", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32FC1", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32FC2", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32FC3", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32FC4", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32SC1", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32SC2", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32SC3", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_32SC4", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_64FC1", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_64FC2", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_64FC3", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::TYPE_64FC4", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::BAYER_BGGR8", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
      cv_bridge::getFormat(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::BAYER_GBRG8", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
      cv_bridge::getFormat(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::BAYER_GRBG8", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
      cv_bridge::getFormat(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::BAYER_RGGB8", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp.o
      cv_bridge::getFormat(std::string const&) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::numChannels(std::string const&)", referenced from:
      cv_bridge::getConversionCode(std::string, std::string) in cv_bridge.cpp.o
  "sensor_msgs::image_encodings::BAYER_BGGR16", referenced from:
      cv_bridge::getCvType(std::string const&) in cv_bridge.cpp ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-06-02 15:10:06 -0500

Artem gravatar image

The problem is solved by downgrading cmake back to 2.8.10.2. Apparently cmake ver 2.8.11 breaks the building process.

Here is the solution

brew uninstall cmake
cd /usr/local/Cellar
brew versions cmake
git checkout 68c419b /usr/local/Library/Formula/cmake.rb
brew install cmake
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-06-01 12:31:23 -0500

Seen: 168 times

Last updated: Jun 02 '13