Linking CXX executable ERROR

asked 2020-06-11 01:58:56 -0500

noelia-dica gravatar image

updated 2020-06-11 06:55:49 -0500

I installed libuvc_camera and it didn't compile, then I erased. When compiling again it didn't work, so I removed with $sudo apt-get purgue --auto-remove libuvc and now when I have usb_cam and audio_common packages into my src it doesn't compile. If they are not in src it compiles properly.

I get a similar error with usb_cam and audio_common packages:

odroid@odroid:~/catkin_ws$ catkin_make -j1
Base path: /home/odroid/catkin_ws
Source space: /home/odroid/catkin_ws/src
Build space: /home/odroid/catkin_ws/build
Devel space: /home/odroid/catkin_ws/devel
Install space: /home/odroid/catkin_ws/install
####
#### Running command: "cmake /home/odroid/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/odroid/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/odroid/catkin_ws/install -G Unix Makefiles" in "/home/odroid/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/odroid/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/odroid/catkin_ws/devel;/home/odroid/ros_catkin_ws/install_isolated
-- This workspace overlays: /home/odroid/catkin_ws/devel;/home/odroid/ros_catkin_ws/install_isolated
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/odroid/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.19
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 13 packages in topological order:
-- ~~  - audio_common (metapackage)
-- ~~  - audio_common_msgs
-- ~~  - opencv_tests
-- ~~  - vision_opencv (metapackage)
-- ~~  - audio_capture
-- ~~  - audio_play
-- ~~  - ros_aiml
-- ~~  - speech_recognition
-- ~~  - cv_bridge
-- ~~  - emotion_recognition
-- ~~  - face_recognition
-- ~~  - image_geometry
-- ~~  - sound_play
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'audio_common'
-- ==> add_subdirectory(audio_common/audio_common)
-- +++ processing catkin package: 'audio_common_msgs'
-- ==> add_subdirectory(audio_common/audio_common_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- audio_common_msgs: 1 messages, 0 services
-- +++ processing catkin package: 'opencv_tests'
-- ==> add_subdirectory(vision_opencv/opencv_tests)
-- +++ processing catkin metapackage: 'vision_opencv'
-- ==> add_subdirectory(vision_opencv/vision_opencv)
-- +++ processing catkin package: 'audio_capture'
-- ==> add_subdirectory(audio_common/audio_capture)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- +++ processing catkin package: 'audio_play'
-- ==> add_subdirectory(audio_common/audio_play)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- +++ processing catkin package: 'ros_aiml'
-- ==> add_subdirectory(ros_robotics_projects/ros_aiml)
-- +++ processing catkin package: 'speech_recognition'
-- ==> add_subdirectory(speech_recognition/speech_recognition)
-- +++ processing catkin package: 'cv_bridge'
-- ==> add_subdirectory(vision_opencv/cv_bridge)
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found version "2.7.17") 
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   python
-- Found OpenCV: /usr (found suitable version "3.2.0", minimum required is "3") found components:  opencv_core opencv_imgproc opencv_imgcodecs 
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found suitable version "2.7.17", minimum required is "2.7") 
-- +++ processing catkin package: 'emotion_recognition'
-- ==> add_subdirectory(emotion_recognition)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- emotion_recognition: 1 messages, 0 services
-- +++ processing catkin package: 'face_recognition'
-- ==> add_subdirectory(face_recognition)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- face_recognition: 1 messages, 0 services
-- +++ processing catkin package: 'image_geometry'
-- ==> add_subdirectory(vision_opencv/image_geometry)
-- Found OpenCV: /usr (found version "3.2.0") 
-- +++ processing catkin package: 'sound_play'
-- ==> ...
(more)
edit retag flag offensive close merge delete

Comments

Can you post your audio_capture/CMakeLists.txt please? You might be missing a roscpp somewhere.

KenYN gravatar image KenYN  ( 2020-06-11 06:21:40 -0500 )edit

@KenYN

posted:

cmake_minimum_required(VERSION 2.8.3)

project(audio_capture)

find_package(catkin REQUIRED COMPONENTS roscpp audio_common_msgs)

find_package(PkgConfig) pkg_check_modules(GST1.0 gstreamer-1.0 REQUIRED)

find_package(Boost REQUIRED COMPONENTS thread)

include_directories(${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${GST1.0_INCLUDE_DIRS})

catkin_package()

add_executable(audio_capture src/audio_capture.cpp) target_link_libraries(audio_capture ${catkin_LIBRARIES} ${GST1.0_LIBRARIES} ${Boost_LIBRARIES}) add_dependencies(audio_capture ${catkin_EXPORTED_TARGETS})

install(TARGETS audio_capture DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

noelia-dica gravatar image noelia-dica  ( 2020-06-11 06:57:11 -0500 )edit