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

image publisher and Undefined symbols for architecture x86_64: during ros installation

asked 2018-02-16 18:57:57 -0500

charan gravatar image

updated 2018-02-18 12:57:09 -0500

jayess gravatar image

Hello Everyone,

I am pretty naive to ros and trying to get ros on Mac. I encounter this problem when I am building ros using the command

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST

<== Finished processing package [188 of 228]: 'diagnostic_analysis'

==> Processing catkin package: 'image_publisher'
==> Building with env: '/Users/shreecharan/ros_catkin_ws/install_isolated/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/Users/shreecharan/ros_catkin_ws/build_isolated/image_publisher'
-- Using CATKIN_DEVEL_PREFIX: /Users/shreecharan/ros_catkin_ws/devel_isolated/image_publisher
-- Using CMAKE_PREFIX_PATH: /Users/shreecharan/ros_catkin_ws/install_isolated
-- This workspace overlays: /Users/shreecharan/ros_catkin_ws/install_isolated
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Using empy: /Library/Python/2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: 1
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /Users/shreecharan/ros_catkin_ws/build_isolated/image_publisher/test_results
-- Found gtest: gtests will be built
-- nosetests not found, Python tests can not be run (try installing package 'python-nose')
-- catkin 0.7.8
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   image_publisher

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/shreecharan/ros_catkin_ws/build_isolated/image_publisher
==> make -j4 -l4 in '/Users/shreecharan/ros_catkin_ws/build_isolated/image_publisher'
[ 20%] Built target image_publisher_gencfg
Scanning dependencies of target image_publisher
[ 40%] Linking CXX executable /Users/shreecharan/ros_catkin_ws/devel_isolated/image_publisher/lib/image_publisher/image_publisher
[ 60%] Built target image_publisher_exe
[ 80%] Building CXX object CMakeFiles/image_publisher.dir/src/nodelet/image_publisher_nodelet.cpp.o
[100%] Linking CXX shared library /Users/shreecharan/ros_catkin_ws/devel_isolated/image_publisher/lib/libimage_publisher.dylib
Undefined symbols for architecture x86_64:
  "cv::VideoCapture::set(int, double)", referenced from:
      image_publisher::ImagePublisherNodelet::onInit() in image_publisher_nodelet.cpp.o
      image_publisher::ImagePublisherNodelet::do_work(ros::TimerEvent const&) in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::open(cv::String const&)", referenced from:
      image_publisher::ImagePublisherNodelet::onInit() in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::open(int)", referenced from:
      image_publisher::ImagePublisherNodelet::onInit() in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::read(cv::_OutputArray const&)", referenced from:
      image_publisher::ImagePublisherNodelet::onInit() in image_publisher_nodelet.cpp.o
      image_publisher::ImagePublisherNodelet::do_work(ros::TimerEvent const&) in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::VideoCapture()", referenced from:
      image_publisher::ImagePublisherNodelet::ImagePublisherNodelet() in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::~VideoCapture()", referenced from:
      image_publisher::ImagePublisherNodelet::~ImagePublisherNodelet() in image_publisher_nodelet.cpp.o
  "cv::VideoCapture::isOpened() const", referenced from:
      image_publisher::ImagePublisherNodelet::onInit() in image_publisher_nodelet.cpp.o
      image_publisher::ImagePublisherNodelet::do_work(ros::TimerEvent const&) in image_publisher_nodelet.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/shreecharan/ros_catkin_ws/devel_isolated/image_publisher/lib/libimage_publisher.dylib] Error 1
make[1]: *** [CMakeFiles/image_publisher.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'image_publisher': 
  Command '['/Users/shreecharan/ros_catkin_ws/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running:

cd /Users/shreecharan/ros_catkin_ws/build_isolated/image_publisher && /Users/shreecharan/ros_catkin_ws/install_isolated/env.sh make -j4 -l4

Operating System is High Sierra Installation of ros using home-brew No errors when using ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-18 12:50:32 -0500

charan gravatar image

The link.txt file is missing libopencv_videoio3.3.3.1.dylib

Once you add this library everything builds .

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-16 18:57:57 -0500

Seen: 392 times

Last updated: Feb 18 '18