robotology / idyntree-yarp-tools

Tools based on the iDynTree library that depend on YARP.
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Using different versions for Yarp and iDynTree when pushing to devel. #17

Closed S-Dafarra closed 3 years ago

S-Dafarra commented 3 years ago

icub-main is failing to compile with the error

-- CMake modules directory: /Users/runner/work/idyntree-yarp-tools/idyntree-yarp-tools/icub-main/conf;/usr/local/miniconda/envs/test/share/YCM/modules;/usr/local/miniconda/envs/test/share/YCM/find-modules;/usr/local/miniconda/envs/test/share/YCM/build-modules;/usr/local/miniconda/envs/test/share/YCM/style-modules;/usr/local/miniconda/envs/test/share/YCM/cmake-next/Modules;/usr/local/miniconda/envs/test/share/YCM/3rdparty;/usr/local/miniconda/envs/test/share/YCM/deprecated
CMake Error at conf/iCubFindDependencies.cmake:38 (message):
-- Configuring incomplete, errors occurred!
  An old version of icub-firmware-shared has been detected, but at least
See also "/Users/runner/work/idyntree-yarp-tools/idyntree-yarp-tools/icub-main/build/CMakeFiles/CMakeOutput.log".
  1.20.1 is required

but I wonder where it is finding icub-firmware-shared :thinking:

traversaro commented 3 years ago

That logic in icub-main is definitely flawed, but indeed it is interesting to understand why icub-firmware-shared is found.

S-Dafarra commented 3 years ago

That logic in icub-main is definitely flawed, but indeed it is interesting to understand why icub-firmware-shared is found.

I just realized that it is installing both the dependencies from conda and from source

traversaro commented 3 years ago

Yes, the Dependencies (master) seem to run in any case.

traversaro commented 3 years ago

That logic in icub-main is definitely flawed, but indeed it is interesting to understand why icub-firmware-shared is found.

Related fix in https://github.com/robotology/icub-main/pull/760/files .

S-Dafarra commented 3 years ago

Interestingly, icub-main seems to trigger a recursive error at the cmake error causing GH to crash

Branch 'devel' set up to track remote branch 'devel' from 'origin'.
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/share/miniconda/envs/test/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/share/miniconda/envs/test/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found YCM: /usr/share/miniconda/envs/test/share/cmake/YCM (found version "0.13.20210726.4-20210726.4+gitfbf543c")
-- Found YARP: /usr/share/miniconda/envs/test/lib/cmake/YARP (found version "3.5.0+6-20210715.21+git84e958661")
-- found libYARP_math
-- Performing Test CXX_HAS_STD_CXX11
-- Performing Test CXX_HAS_STD_CXX11 - Success
-- Performing Test CXX_HAS_STD_CXX0X
-- Performing Test CXX_HAS_STD_CXX0X - Success
-- Detecting required libraries
-- CMake modules directory: /home/runner/work/idyntree-yarp-tools/idyntree-yarp-tools/icub-main/conf;/usr/share/miniconda/envs/test/share/YCM/modules;/usr/share/miniconda/envs/test/share/YCM/find-modules;/usr/share/miniconda/envs/test/share/YCM/build-modules;/usr/share/miniconda/envs/test/share/YCM/style-modules;/usr/share/miniconda/envs/test/share/YCM/cmake-next/Modules;/usr/share/miniconda/envs/test/share/YCM/3rdparty;/usr/share/miniconda/envs/test/share/YCM/deprecated
-- Could NOT find GSL (missing: GSL_LIBRARY GSLCBLAS_LIBRARY) 
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR) 
-- Checking GNUCXX version 3/4 to determine  OpenCV /opt/net/ path
-- - DBG OPENCV_INCLUDE_DIR_CVCAM=OPENCV_INCLUDE_DIR_CVCAM-NOTFOUND
-- - DBG OPENCV_INCLUDE_DIR_CVCAM=OPENCV_INCLUDE_DIR_CVCAM-NOTFOUND
-- OPENCV_LIBRARY not found turning off OPENCV_FOUND
-- OPENCV_CVAUX_LIBRARY not found turning off OPENCV_FOUND
-- OPENCV library or headers not found. Please search manually or set env. variable OPENCV_ROOT to guide search.
-- WARNING: OpenCV was not found. Please specify OpenCV directory using OpenCV_DIR env. variable
-- Could NOT find OpenCV (missing: OpenCV_LIBRARIES) 
-- Found OpenGL: /usr/share/miniconda/envs/test/x86_64-conda-linux-gnu/sysroot/usr/lib/libGL.so   
-- Performing Test ODE_IS_DOUBLE
-- Performing Test ODE_IS_DOUBLE - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- Found ACE: /usr/share/miniconda/envs/test/lib/libACE.so;/usr/share/miniconda/envs/test/x86_64-conda-linux-gnu/sysroot/usr/lib/libdl.so;/usr/share/miniconda/envs/test/x86_64-conda-linux-gnu/sysroot/usr/lib/librt.so  
-- Found ACE: /usr/share/miniconda/envs/test/lib/libACE.so;pthread;rt (found version "7.0.2") 
-- Performing Test ACE_COMPILES_WITHOUT_INLINE_RELEASE
-- Performing Test ACE_COMPILES_WITHOUT_INLINE_RELEASE - Success
-- Could NOT find IPOPT (missing: IPOPT_LIBRARIES) 
-- OpenCV version is .
-- I have found the following libraries:
-- icub_firmware_shared: NOT found
-- GSL: NOT found
-- GLUT: NOT found
-- OpenGL: found
-- ODE: NOT found
CMake Warning (dev) at CMakeLists.txt:81 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'CMAKE_POSITION_INDEPENDENT_CODE'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- SDL: NOT found
-- ACE: found
-- IPOPT: NOT found
-- OpenCV: NOT found
-- Qt5: found
-- Libraries go to /home/runner/work/idyntree-yarp-tools/idyntree-yarp-tools/icub-main/build/lib
-- Executables go to /home/runner/work/idyntree-yarp-tools/idyntree-yarp-tools/icub-main/build/bin
-- Setting up installation of iCub.ini to /usr/share/miniconda/envs/test/share/yarp/config/path.d folder.
-- GSL not found/selected, skipping learningMachine
-- Unmet dependencies, skipping perceptiveModels
-- Unmet dependencies, skipping actionPrimitives
--  [ ]   Plugin: icubmod_canmotioncontrol (ENABLE_icubmod_canmotioncontrol)
--  [ ]   Plugin: icubmod_cartesiancontrollerserver (ENABLE_icubmod_cartesiancontrollerserver)
--  [ ]   Plugin: icubmod_cartesiancontrollerclient (ENABLE_icubmod_cartesiancontrollerclient)
--  [ ]   Plugin: icubmod_cfw2can (ENABLE_icubmod_cfw2can)
--  [ ]   Plugin: icubmod_dragonfly2 (ENABLE_icubmod_dragonfly2)
--  [ ]   Plugin: icubmod_dragonfly2raw (ENABLE_icubmod_dragonfly2raw)
--  [ ]   Plugin: icubmod_ecan (ENABLE_icubmod_ecan)
--  [ ]   Plugin: icubmod_sharedcan (ENABLE_icubmod_sharedcan)
--  [ ]   Plugin: icubmod_socketcan (ENABLE_icubmod_socketcan)
--  [ ]   Plugin: icubmod_esdsniffer (ENABLE_icubmod_esdsniffer)
--  [ ]   Plugin: icubmod_fakecan (ENABLE_icubmod_fakecan)
--  [ ]   Plugin: icubmod_bcbBattery (ENABLE_icubmod_bcbBattery)
--  [ ]   Plugin: icubmod_bmsBattery (ENABLE_icubmod_bmsBattery)
--  [ ]   Plugin: icubmod_gazecontrollerclient (ENABLE_icubmod_gazecontrollerclient)
--  [ ]   Plugin: icubmod_parametricCalibrator (ENABLE_icubmod_parametricCalibrator)
--  [ ]   Plugin: icubmod_parametricCalibratorEth (ENABLE_icubmod_parametricCalibratorEth)
--  [ ]   Plugin: icubmod_pcan (ENABLE_icubmod_pcan)
--  [ ]   Plugin: icubmod_static_grabber (ENABLE_icubmod_static_grabber)
--  [ ]   Plugin: icubmod_xsensmtx (ENABLE_icubmod_xsensmtx)
--  [ ]   Plugin: icubmod_skinWrapper (ENABLE_icubmod_skinWrapper)
--  [ ]   Plugin: icubmod_canBusAnalogSensor (ENABLE_icubmod_canBusAnalogSensor)
--  [ ]   Plugin: icubmod_canBusVirtualAnalogSensor (ENABLE_icubmod_canBusVirtualAnalogSensor)
--  [ ]   Plugin: icubmod_canBusInertialMTB (ENABLE_icubmod_canBusInertialMTB)
--  [ ]   Plugin: icubmod_canBusSkin (ENABLE_icubmod_canBusSkin)
--  [ ]   Plugin: icubmod_embObjMotionControl (ENABLE_icubmod_embObjMotionControl)
--  [ ]   Plugin: icubmod_embObjSkin (ENABLE_icubmod_embObjSkin)
--  [ ]   Plugin: icubmod_embObjAnalogSensor (ENABLE_icubmod_embObjAnalogSensor)
--  [ ]   Plugin: icubmod_embObjStrain (ENABLE_icubmod_embObjStrain)
--  [ ]   Plugin: icubmod_embObjFTsensor (ENABLE_icubmod_embObjFTsensor)
--  [ ]   Plugin: icubmod_embObjMais (ENABLE_icubmod_embObjMais)
--  [ ]   Plugin: icubmod_embObjMultiEnc (ENABLE_icubmod_embObjMultiEnc)
--  [ ]   Plugin: icubmod_embObjInertials (ENABLE_icubmod_embObjInertials)
--  [ ]   Plugin: icubmod_embObjIMU (ENABLE_icubmod_embObjIMU)
--  [ ]   Plugin: icubmod_imuST_M1 (ENABLE_icubmod_imuST_M1)
--  [x]   Plugin: icubmod_imuFilter (ENABLE_icubmod_imuFilter)
--  [ ]   Plugin: icubmod_embObjPSC (ENABLE_icubmod_embObjPSC)
--  [ ]   Plugin: icubmod_embObjPOS (ENABLE_icubmod_embObjPOS)
-- IPOPT not found/selected, skipping optimization
CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

-- Could NOT find YARP_idl_tools (missing: YARP_idl_tools_DIR)
-- Could NOT find YARP_idl_tools (missing: YARP_idl_tools_DIR)
CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

-- Could NOT find YARP_idl_tools (missing: YARP_idl_tools_DIR)
-- Could NOT find YARP_idl_tools (missing: YARP_idl_tools_DIR)
-- Could NOT find YARP_idl_tools (missing: YARP_idl_tools_DIR)
CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

CMake Deprecation Warning at /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:295 (message):
  Calling "yarp_add_idl" without including YARP "idl_tools" COMPONENT in
  "find_package(YARP)" is deprecated.
Call Stack (most recent call first):
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  /usr/share/miniconda/envs/test/lib/cmake/YARP/YARPConfig.cmake:307 (yarp_add_idl)
  src/tools/fingersTuner/CMakeLists.txt:8 (yarp_add_idl)

This goes on and on indefinetely

traversaro commented 3 years ago

It seems it is still using the conda-installed YARP, is that expected?

S-Dafarra commented 3 years ago

It seems it is still using the conda-installed YARP, is that expected?

Is it? The Dependencies (master) job did not started (that's where yarp is installed from conda) https://github.com/robotology/idyntree-yarp-tools/blob/08e331f5beb8bb6496301661c3a7649b86139aa6/.github/workflows/conda-ci.yml#L56

On the other hand, I am installing yarp in the CONDA_PREFIX https://github.com/robotology/idyntree-yarp-tools/blob/08e331f5beb8bb6496301661c3a7649b86139aa6/.github/workflows/conda-ci.yml#L85

traversaro commented 3 years ago

On the other hand, I am installing yarp in the CONDA_PREFIX

Ah sorry, that's it, I was conflating yarp being installed there and YARP being installed by conda.

traversaro commented 3 years ago

Interestingly, icub-main seems to trigger a recursive error at the cmake error causing GH to crash

Interesting, I would expect the line in https://github.com/robotology/yarp/blob/master/cmake/template/YARPConfig.cmake.in#L283 to actually be _yarp_add_idl, with a trailing underscore, otherwise it seems logic that this becomes an infinite loop. However, this worked fine for years, so probably there is something caused by the latest CMake version or something like that.

traversaro commented 3 years ago

Unless we actually need the latest YARP and icub-main, perhaps for now we can just start with compiling from source only idyntree? I tried to look in the robotology-superbuild logs, and I could not find any warning related to idl_tools for icub-main.

S-Dafarra commented 3 years ago

Unless we actually need the latest YARP and icub-main, perhaps for now we can just start with compiling from source only idyntree? I tried to look in the robotology-superbuild logs, and I could not find any warning related to idl_tools for icub-main.

For the time being I switched to yarp-3.4 to keep the machinery there. On the other hand, it seems to me that there is actually a problem when using yarp master with icub-main, right?

traversaro commented 3 years ago

Unless we actually need the latest YARP and icub-main, perhaps for now we can just start with compiling from source only idyntree? I tried to look in the robotology-superbuild logs, and I could not find any warning related to idl_tools for icub-main.

For the time being I switched to yarp-3.4 to keep the machinery there. On the other hand, it seems to me that there is actually a problem when using yarp master with icub-main, right?

Yes, the idl_tools component should be searched for. However in practice that problem does not occur with robotology-superbuild CI, so I guess it is triggered by something.

S-Dafarra commented 3 years ago

Unless we actually need the latest YARP and icub-main, perhaps for now we can just start with compiling from source only idyntree? I tried to look in the robotology-superbuild logs, and I could not find any warning related to idl_tools for icub-main.

For the time being I switched to yarp-3.4 to keep the machinery there. On the other hand, it seems to me that there is actually a problem when using yarp master with icub-main, right?

Yes, the idl_tools component should be searched for. However in practice that problem does not occur with robotology-superbuild CI, so I guess it is triggered by something.

There could be some differences when building the two as separate projects, with respect to the superbuild case?

S-Dafarra commented 3 years ago

Btw, I have the same problem when using yarp-3.4. I guess that I have to switch completely from source to conda.

S-Dafarra commented 3 years ago

Hold-on. I was installing ycm both with conda and via source :sweat_smile:

S-Dafarra commented 3 years ago

https://github.com/robotology/idyntree-yarp-tools/pull/17/commits/fbfd1f79a36e25631a940e3d098be0558bef066e did not fix the issue in any case.

traversaro commented 3 years ago

I think I understood what is going on. For more reason, idl_tools is indeed not installed, and so the yarp_add_idl function is the only one defined, and this results in the infinite loop. cc @drdanz

traversaro commented 3 years ago

I think the problem is that you are passing -DYARP_COMPILE_EXECUTABLES:BOOL=OFF to YARP compilation, as idl_tools require some executables.

S-Dafarra commented 3 years ago

I think the problem is that you are passing -DYARP_COMPILE_EXECUTABLES:BOOL=OFF to YARP compilation, as idl_tools require some executables.

Ah nice!

traversaro commented 3 years ago

I think the problem is that you are passing -DYARP_COMPILE_EXECUTABLES:BOOL=OFF to YARP compilation, as idl_tools require some executables.

Ah nice!

See https://github.com/robotology/yarp/blob/c3b05bc6141156542228547aba78b14328c93c90/src/CMakeLists.txt#L37 .