Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Fix CMake Error: xmlrpcvalue_base64 not built by..#1197

Merged
dirk-thomas merged 1 commit intoros:lunar-develfrom
moriarty:xmlrpcpp-test-link-error
Oct 22, 2017
Merged

Fix CMake Error: xmlrpcvalue_base64 not built by..#1197
dirk-thomas merged 1 commit intoros:lunar-develfrom
moriarty:xmlrpcpp-test-link-error

Conversation

@moriarty
Copy link
Copy Markdown
Contributor

Error occurs when using catkin build or catkin_make_isolated --install.
catkin_make_isolated didn't complain without the --install option.

CMake Error at .../xmlrpcpp/test/CMakeLists.txt:2 (target_link_libraries):
  Cannot specify link libraries for target "xmlrpcvalue_base64" which is not
  built by this project.

NOTE: I am running an unsupported distribution, openSUSE Tumbleweed. I checked other packages and saw the gtests were linked similarly and surrounded with an if-statement.

@moriarty
Copy link
Copy Markdown
Contributor Author

When I stash this change, and run catkin clean xmlrpcpp followed by catkin build xmlrpcpp

Here is the output:

[build] Found '51' packages in 0.0 seconds.                                                         
[build] Package table is up to date.                                                                
Starting  >>> catkin                                                                                
Finished  <<< catkin                    [ 3.0 seconds ]                                             
Starting  >>> cpp_common                                                                            
Finished  <<< cpp_common                [ 1.6 seconds ]                                             
Starting  >>> xmlrpcpp                                                                              
____________________________________________________________________________________________________
Errors     << xmlrpcpp:cmake /home/alex/workspace/ros_base/logs/xmlrpcpp/build.cmake.002.log        
CMake Warning at /home/alex/workspace/ros_base/src/catkin/cmake/test/gtest.cmake:66 (message):
  skipping gtest 'xmlrpcvalue_base64' in project 'xmlrpcpp'
Call Stack (most recent call first):
  /home/alex/workspace/ros_base/src/catkin/cmake/test/gtest.cmake:34 (catkin_add_executable_with_gtest)
  test/CMakeLists.txt:1 (catkin_add_gtest)


CMake Error at /home/alex/workspace/ros_base/src/ros_comm/xmlrpcpp/test/CMakeLists.txt:2 (target_link_libraries):
  Cannot specify link libraries for target "xmlrpcvalue_base64" which is not
  built by this project.


cd /home/alex/workspace/ros_base/build/xmlrpcpp; catkin build --get-env xmlrpcpp | catkin env -si  /usr/bin/cmake /home/alex/workspace/ros_base/src/ros_comm/xmlrpcpp --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/alex/workspace/ros_base/devel/.private/xmlrpcpp -DCMAKE_INSTALL_PREFIX=/home/alex/workspace/ros_base/install; cd -
....................................................................................................
Failed     << xmlrpcpp:cmake            [ Exited with code 1 ]                                      
Failed    <<< xmlrpcpp                  [ 4.1 seconds ]                                             
[build] Summary: 2 of 3 packages succeeded.                                                         
[build]   Ignored:   48 packages were skipped or are blacklisted.                                   
[build]   Warnings:  None.                                                                          
[build]   Abandoned: None.                                                                          
[build]   Failed:    1 packages failed.                                                             
[build] Runtime: 8.9 seconds total.                       

I was following the http://wiki.ros.org/Installation/Source instructions.
Here are some relevant version numbers.

alex@localhost:~/workspace/ros_comm> cmake --version
cmake version 3.9.4
alex@localhost:~/workspace/ros_comm> catkin --version
catkin_tools 0.4.4 (C) 2014-2017 Open Source Robotics Foundation
catkin_tools is released under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
---
Using Python 3.6.2 (default, Aug 03 2017, 16:34:42) [GCC]
alex@localhost:~/workspace/ros_comm> gcc --version
gcc (SUSE Linux) 7.2.1 20171005 [gcc-7-branch revision 253439]

@@ -1,2 +1,4 @@
catkin_add_gtest(xmlrpcvalue_base64 xmlrpcvalue_base64.cpp)
target_link_libraries(xmlrpcvalue_base64 xmlrpcpp)
catkin_add_gtest(${PROJECT_NAME}-xmlrpcvalue_base64 xmlrpcvalue_base64.cpp)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to rename the target. Please keep the target babe as is and only wrap the target_link_libraries in the conditional block.

Error occurs when using catkin-tools or catkin_make_isolated --install.
catkin_make_isolated didn't complain without the --install option.

CMake Error at .../xmlrpcpp/test/CMakeLists.txt:2 (target_link_libraries):
  Cannot specify link libraries for target "xmlrpcvalue_base64" which is not
  built by this project.
@moriarty moriarty force-pushed the xmlrpcpp-test-link-error branch from 34f1906 to 560d972 Compare October 22, 2017 20:04
@moriarty
Copy link
Copy Markdown
Contributor Author

@dirk-thomas thanks for the quick feedback, I've made the requested change.

Copy link
Copy Markdown
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch and the update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants