Git Product home page Git Product logo

Comments (17)

v-lopez avatar v-lopez commented on September 28, 2024

Could you provide the CMake output? Probably it's not being able to create the executable due to some issue with gmock.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024
matthias@matthias-laptop:~/Workspaces/ddynamic_reconfigure_ws$ catkin b
==> Expanding alias 'b' from 'catkin b' to 'catkin build'
--------------------------------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/matthias/Workspaces/ddynamic_reconfigure_ws
--------------------------------------------------------------------------------------
Build Space:        [exists] /home/matthias/Workspaces/ddynamic_reconfigure_ws/build
Devel Space:        [exists] /home/matthias/Workspaces/ddynamic_reconfigure_ws/devel
Install Space:      [unused] /home/matthias/Workspaces/ddynamic_reconfigure_ws/install
Log Space:          [exists] /home/matthias/Workspaces/ddynamic_reconfigure_ws/logs
Source Space:       [exists] /home/matthias/Workspaces/ddynamic_reconfigure_ws/src
DESTDIR:            [unused] None
--------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
--------------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
--------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
--------------------------------------------------------------------------------------
Workspace configuration appears valid.
--------------------------------------------------------------------------------------
[build] Found '1' packages in 0.0 seconds.                                                                                                                                   
[build] Updating package table.                                                                                                                                              
Starting  >>> ddynamic_reconfigure                                                                                                                                           
_____________________________________________________________________________________________________________________________________________________________________________
Errors     << ddynamic_reconfigure:cmake /home/matthias/Workspaces/ddynamic_reconfigure_ws/logs/ddynamic_reconfigure/build.cmake.000.log                                     
CMake Error at /home/matthias/Workspaces/ddynamic_reconfigure_ws/src/ddynamic_reconfigure/CMakeLists.txt:57 (target_link_libraries):
  Cannot specify link libraries for target "ddynamic_reconfigure-test" which
  is not built by this project.


cd /home/matthias/Workspaces/ddynamic_reconfigure_ws/build/ddynamic_reconfigure; catkin build --get-env ddynamic_reconfigure | catkin env -si  /usr/bin/cmake /home/matthias/Workspaces/ddynamic_reconfigure_ws/src/ddynamic_reconfigure --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/matthias/Workspaces/ddynamic_reconfigure_ws/devel/.private/ddynamic_reconfigure -DCMAKE_INSTALL_PREFIX=/home/matthias/Workspaces/ddynamic_reconfigure_ws/install; cd -
.............................................................................................................................................................................
Failed     << ddynamic_reconfigure:cmake          [ Exited with code 1 ]                                                                                                     
Failed    <<< ddynamic_reconfigure                [ 2.3 seconds ]                                                                                                            
[build] Summary: 0 of 1 packages succeeded.                                                                                                                                  
[build]   Ignored:   None.                                                                                                                                                   
[build]   Warnings:  None.                                                                                                                                                   
[build]   Abandoned: None.                                                                                                                                                   
[build]   Failed:    1 packages failed.                                                                                                                                      
[build] Runtime: 2.4 seconds total.                                                                                                                                          
[build] Note: Workspace packages have changed, please re-source setup files to use them.

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

Please clean the workspace and run it again, otherwise cmake is not re-executed and we cannot see the meaningful output.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

This is the output of a brand new workspace that I

  1. built being empty
  2. cloned ddynamic_reconfigure
  3. built again (output supplied)

If I run catkin clean -y and catkin build again I get the same output. The log is to be found here.

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

Ok, please build it with -v to get some more output.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

Looks like it couldn't find pthread. Looking at installed packages I find only libpthread-stubs0-dev being installed on my system.

I executed rosdep install --from-paths src --ignore-src --rosdistro=melodic -y before though - shouldn't that take care of all the dependencies?

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

I've got the same output regarding to pthread.

Can you try to find your gmock installation?
In my case:

$ dpkg -S gmock.h
googletest:amd64: /usr/src/googletest/googlemock/include/gmock/gmock.h
googletest:amd64: /usr/include/gmock/gmock.h

$ dpkg -S gtest.h
googletest:amd64: /usr/include/gtest/internal/custom/gtest.h
googletest:amd64: /usr/include/gtest/gtest.h
googletest:amd64: /usr/src/googletest/googletest/include/gtest/internal/custom/gtest.h
googletest:amd64: /usr/src/googletest/googletest/include/gtest/gtest.h

And my googletest version is 1.8.0-6

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

gmock installation:

matthias@matthias-laptop:~$ dpkg -S gmock.h
googletest:amd64: /usr/src/googletest/googlemock/include/gmock/gmock.h
googletest:amd64: /usr/include/gmock/gmock.h
matthias@matthias-laptop:~$ dpkg -S gtest.h
googletest:amd64: /usr/include/gtest/internal/custom/gtest.h
googletest:amd64: /usr/include/gtest/gtest.h
googletest:amd64: /usr/src/googletest/googletest/include/gtest/internal/custom/gtest.h
googletest:amd64: /usr/src/googletest/googletest/include/gtest/gtest.h

googletest version:

matthias@matthias-laptop:~$ dpkg --status libgtest-dev 
Package: libgtest-dev
Status: install ok installed
Priority: extra
Section: oldlibs
Installed-Size: 17
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: googletest
Version: 1.8.0-6

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

That's weird.

I'm insisting so much on gmock, because I've seen this behavior before. If gmock is not found, the target is not added (see this) and the target_link_libraries fails.

You could try to add some debug statements in /opt/ros/melodic/share/catkin/cmake/test/gtest.cmake to see if this is the case.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

It builds on my other 18.04 machine, so it seems to be something in the configuration of my laptop which I couldn't find up to now. Even reinstalling ROS and setting up the workspace didn't work.

Here's the output of /home/matthias/Workspaces/ddynamic_reconfigure_ws/logs/ddynamic_reconfigure/build.cmake.000.log for the two machines.

But it doesn't look like it's something specific to ddynamic_reconfigure, but more a catkin configuration issue.


The crucial difference for me seems to be the order in which it runs through packages on the laptop vs the workstation.

Also the CMAKE_PREFIX_PATH looks wrong on the laptop, but the happens even with catkin clean and catkin config or catkin_tools/profiles/default/config.yaml are the same on both machines.

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

It looks like in your working version gmock is found
^[[36m--^[[0m Found gmock sources under '/usr/src/googletest': gmock will be built
and in the not working

[36m--[0m Found gtest: gtests will be built

Only gtest is found.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

I screwed up to name the links -.- I renamed them now by editing the original post.

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

I don't understand your last message, which links?

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

In #6 (comment) I mixed up the pastebin links and the naming of the links. The link with the name "working" was linking to the "not working" output on pastebin. So I fixed the naming of the links by editing the comment.

In the mean time I played around with /opt/ros/melodic/share/catkin/cmake/test/gtest.cmake.
Turns out that both the statements if(NOT GMOCK_FOUND) and if(NOT GTEST_FOUND) around line 290 are satisfied on the machine that can build it.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

I also compared all packages installed on both machines and I didn't find find any differences for any gmock, gtest packages or so.

from ddynamic_reconfigure.

matthiashh avatar matthiashh commented on September 28, 2024

Well, after a bit of more digging it turned out that /opt/ros/melodic/share/catkin/cmake/test/gtest.cmake would search for gmock, doesn't find it and searches for gtest. If there's still no success there seems to be some manual stuff. Here it becomes interesting:

  • On the workstation it doesn't find GTEST_LIBRARY GTEST_MAIN_LIBRARY and goes into a else in the ROS gtest.cmake where this seems to be done manually - that works
  • On my laptop it finds gtest since there's at least /usr/lib/libgtest.a (which dpkg doesn't know about and neither do I) and then it fails later on.

Well, anyhow. It's not connected to ddynamic_reconfigure, so I will close this. I settled upon moving /usr/lib/libgtest.a since I don't know where it comes from anyway and now it builds on my laptop as well. Thanks for the help.

from ddynamic_reconfigure.

v-lopez avatar v-lopez commented on September 28, 2024

Wow that was a tricky one. Good job finding it.

from ddynamic_reconfigure.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.