Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GMock/GTest handling for split packages #1151

Open
wants to merge 1 commit into
base: kinetic-devel
Choose a base branch
from

Conversation

neotinker
Copy link

On openSUSE, Gmock and GTest are split into separate packages each with
it's own directory structure. We can't assume using GMock values will
work with GTest. If GTest is found, use it's own variable instead.

On openSUSE, Gmock and GTest are split into separate packages each with
it's own directory structure. We can't assume using GMock values will
work with GTest. If GTest is found, use it's own variable instead.
@neotinker
Copy link
Author

Without this patch, fails to link gtest properly.

==> Processing catkin package: 'camera_info_manager'
==> Creating build directory: 'build_isolated/camera_info_manager'
==> Building with env: '/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated/env.sh'
==> cmake /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/src/image_common/camera_info_manager -DCATKIN_DEVEL_PREFIX=/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/devel_isolated/camera_info_manager -DCMAKE_INSTALL_PREFIX=/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python -G Unix Makefiles in '/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/build_isolated/camera_info_manager'
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/devel_isolated/camera_info_manager
-- Using CMAKE_PREFIX_PATH: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated
-- This workspace overlays: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated
-- Found PythonInterp: /usr/bin/python (found suitable version "2.7.18", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Found PY_em: /usr/lib/python2.7/site-packages/em.pyc  
-- Using empy: /usr/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/build_isolated/camera_info_manager/test_results
-- Found gmock: gmock and gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- Found Boost: /usr/include (found version "1.66.0")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/build_isolated/camera_info_manager
==> make -j2 -l2 in '/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/build_isolated/camera_info_manager'
Scanning dependencies of target camera_info_manager
[ 25%] Building CXX object CMakeFiles/camera_info_manager.dir/src/camera_info_manager.cpp.o
[ 50%] Linking CXX shared library /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so
[ 50%] Built target camera_info_manager
Scanning dependencies of target unit_test
[ 75%] Building CXX object CMakeFiles/unit_test.dir/tests/unit_test.cpp.o
[100%] Linking CXX executable /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: undefined reference to symbol '_ZTIN7testing4TestE'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libgtest.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/unit_test.dir/build.make:132: /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1052: CMakeFiles/unit_test.dir/all] Error 2
make: *** [Makefile:158: all] Error 2
<== Failed to process package 'camera_info_manager': 
  Command '['/home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated/env.sh', 'make', '-j2', '-l2']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/build_isolated/camera_info_manager && /home/neotinker/devel/ROS/ros_catkin_ws_desktop_full/install_isolated/env.sh make -j2 -l2

Command failed, exiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant