Coder Social home page Coder Social logo

Comments (9)

nunoguedelha avatar nunoguedelha commented on September 23, 2024 1

For the record...
As @diegoferigo had suggested, I logged the value of YARP_INCLUDE_DIRS, and as expected it was empty and we get this deprecation warning:

CMake Deprecation Warning at /Users/nunoguedelha/dev/robotology-superbuild/build/install/lib/cmake/YARP/YARPConfig.cmake:212 (message):
  The YARP_INCLUDE_DIRS variable is deprecated
Call Stack (most recent call first):
  toolbox/autogenerated/CMakeLists.txt:9999 (deprecated_variable_warning)
  toolbox/autogenerated/CMakeLists.txt:35 (target_include_directories)

Which is expected since YARP_INCLUDE_DIRS is no more defined and exported by Yarp (refer to <robotology-superbuild-root>/build/install/lib/cmake/YARP/YARPConfig.cmake) and has been deprecated (robotology/community#233).

So the solution turned to be :

  • either link the libraries of YARP::YARP_OS module as suggested by @diegoferigo , by changing the code in the CMakelists.txt for the target ClockServer as follows, from :
# YARP
find_package(YARP REQUIRED)

# Setup the include directories
target_include_directories(ClockServer PUBLIC
                           ${YARP_INCLUDE_DIRS}
                           $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)

... to...

# YARP
find_package(YARP REQUIRED)
target_link_libraries(ClockServer YARP::YARP_OS)
 
# Setup the include directories
target_include_directories(ClockServer PUBLIC
                           $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
  • either redefining the YARP_INCLUDE_DIRS through get_target_property which retrieves the interface headers path from the given module (in this case YARP::YARP_OS), as follows :
get_target_property(YARP_INCLUDE_DIRS YARP::YARP_OS INTERFACE_INCLUDE_DIRECTORIES)

I'll submit the PRs to the WBToolbox and yarp-matlab-bindings. Thanks a lot guys for the help !!

from robotology-superbuild.

traversaro avatar traversaro commented on September 23, 2024

Are you using the devel branches or master of everything?

cc @diegoferigo

from robotology-superbuild.

nunoguedelha avatar nunoguedelha commented on September 23, 2024

I'm using the devel branches for the below components:

  • YCM_EP_DEVEL_MODE_GazeboYARPPl
  • YCM_EP_DEVEL_MODE_ICUB
  • YCM_EP_DEVEL_MODE_WBToolbox
  • YCM_EP_DEVEL_MODE_YARP
  • YCM_EP_DEVEL_MODE_codyco-modules
  • YCM_EP_DEVEL_MODE_iDynTree
  • YCM_EP_DEVEL_MODE_yarp-matlab-bindings

That shouldn't be related to the fact that the include path is missing from the build command should it?

from robotology-superbuild.

nunoguedelha avatar nunoguedelha commented on September 23, 2024

@diegoferigo I might be wrong, but I see something suspicious in this line of the toolbox CMakelists.txt. It's including the file YarpInstallationHelpers.cmake, which appears to be out of scope since the only .cmake files present in the repo are :

  • AddGeneratedCodeLib.cmake
  • ExtraPackageConfigVars.cmake.in
  • Utilities.cmake
    I guess that ExtraPackageConfigVars.cmake.in should expand to @CMAKE_INSTALL_PREFIX@/share/WB-Toolbox/cmake/* but the folder doesn't by the time we run the WBToolbox build.
    Or maybe just a find_package(YARP) is missing somewhere...

from robotology-superbuild.

diegoferigo avatar diegoferigo commented on September 23, 2024

@nunoguedelha

I guess that ExtraPackageConfigVars.cmake.in should expand to @CMAKE_INSTALL_PREFIX@/share/WB-Toolbox/cmake/* but the folder doesn't by the time we run the WBToolbox build.
Or maybe just a find_package(YARP) is missing somewhere...

Just tried on a clean superbuild folder and it works fine. For what concern the variable expansion I correctly get something similar

#####################################################################
#### Expanded from INCLUDE_FILE by install_basic_package_files() ####

list(APPEND CMAKE_MODULE_PATH /tmp/robotology-superbuild/build/install/share/WB-Toolbox/cmake)

#####################################################################

I might be wrong, but I see something suspicious in this line of the toolbox CMakelists.txt. It's including the file YarpInstallationHelpers.cmake, which appears to be out of scope

That file is part of YCM, which is a dependency

I couldn't test it properly due to robotology/yarp#1722 which prevents me to build the latest version of Yarp. Are you aligned on the last devel commit of Yarp?

from robotology-superbuild.

diegoferigo avatar diegoferigo commented on September 23, 2024

Digging a bit more, the error looks a missing include directory of Yarp for the ClockServer target. But here you can see that it is already included:

https://github.com/robotology/wb-toolbox/blob/08242faf30577e3e1bfd7a7996e1ad88d6092316/toolbox/autogenerated/CMakeLists.txt#L29-L35

from robotology-superbuild.

nunoguedelha avatar nunoguedelha commented on September 23, 2024

I couldn't test it properly due to robotology/yarp#1722 which prevents me to build the latest version of Yarp. Are you aligned on the last devel commit of Yarp?

@diegoferigo I'm building with that same commit but I don't get the same error as you.

Digging a bit more, the error looks a missing include directory of Yarp for the ClockServer target. But here you can see that it is already included:

Yes, as I described in the issue, the missing header (at least in my environment), is the file yarp/os/Wire.h, and it's because the include path -isystem <robotology-superbuild-root>/build/install/include is missing in the compile command.

from robotology-superbuild.

diegoferigo avatar diegoferigo commented on September 23, 2024

Glad we solved. Do not bother to open a PR on wb-toolbox, I already have those changes staged. Thanks!

from robotology-superbuild.

nunoguedelha avatar nunoguedelha commented on September 23, 2024

Fixed by:

PRs reviewed and merged.

from robotology-superbuild.

Related Issues (20)

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.