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

ergocub-software: compile ergoCubEmotions by default if OpenCV >= 4.5.2 #1539

Merged
merged 7 commits into from
Feb 29, 2024

Conversation

Nicogene
Copy link
Member

It fixes #1513

@Nicogene Nicogene requested a review from traversaro November 24, 2023 09:05
@Nicogene Nicogene self-assigned this Nov 24, 2023
Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Some metadata for the newly added dependencies are missing.

cmake/Buildergocub-software.cmake Show resolved Hide resolved
cmake/Buildergocub-software.cmake Show resolved Hide resolved
@traversaro
Copy link
Member

traversaro commented Nov 24, 2023

This change is creating some failures in debian-buster:

2023-11-24T10:47:47.3215825Z Not searching for unused variables given on the command line.
2023-11-24T10:47:47.3217808Z loading initial cache file /__w/robotology-superbuild/robotology-superbuild/build/src/ergocub-software/CMakeFiles/YCMTmp/ergocub-software-cache-Debug.cmake
2023-11-24T10:47:47.3219650Z -- The C compiler identification is GNU 8.3.0
2023-11-24T10:47:47.3220473Z -- The CXX compiler identification is GNU 8.3.0
2023-11-24T10:47:47.3221206Z -- Detecting C compiler ABI info
2023-11-24T10:47:47.3221841Z -- Detecting C compiler ABI info - done
2023-11-24T10:47:47.3222623Z -- Check for working C compiler: /usr/bin/cc - skipped
2023-11-24T10:47:47.3223397Z -- Detecting C compile features
2023-11-24T10:47:47.3224057Z -- Detecting C compile features - done
2023-11-24T10:47:47.3224738Z -- Detecting CXX compiler ABI info
2023-11-24T10:47:47.3225446Z -- Detecting CXX compiler ABI info - done
2023-11-24T10:47:47.3226299Z -- Check for working CXX compiler: /usr/bin/c++ - skipped
2023-11-24T10:47:47.3227066Z -- Detecting CXX compile features
2023-11-24T10:47:47.3227773Z -- Detecting CXX compile features - done
2023-11-24T10:47:47.3229425Z -- Found YCM: /__w/robotology-superbuild/robotology-superbuild/build/install/share/cmake/YCM (found version "0.15.3.6-20231117.5+git266a5a4")
2023-11-24T10:47:47.3231929Z -- Found YARP: /__w/robotology-superbuild/robotology-superbuild/build/install/lib/cmake/YARP (found version "3.8.1+29-20231120.2+gitcdd617efd")
2023-11-24T10:47:47.3234024Z CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
2023-11-24T10:47:47.3235330Z   Could NOT find OpenCV (missing: OpenCV_CONFIG) (Required is at least
2023-11-24T10:47:47.3236120Z   version "4.2.0")
2023-11-24T10:47:47.3236930Z Call Stack (most recent call first):
2023-11-24T10:47:47.3238183Z   /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
2023-11-24T10:47:47.3240437Z   /__w/robotology-superbuild/robotology-superbuild/build/install/share/YCM/find-modules/FindOpenCV.cmake:99 (find_package_handle_standard_args)
2023-11-24T10:47:47.3242158Z   src/modules/ergoCubEmotions/CMakeLists.txt:12 (find_package)
2023-11-24T10:47:47.3242744Z 
2023-11-24T10:47:47.3242751Z 
2023-11-24T10:47:47.3243111Z -- Configuring incomplete, errors occurred!

is OpenCV 4.2.0 strictly necessary? Debian Buster only has 3.2.0, but probably we could also considering simply drop Debian Buster.

@traversaro
Copy link
Member

traversaro commented Nov 24, 2023

Also Debian bullseye and Ubuntu 20.04 has some problems:

2023-11-24T10:45:11.4824385Z [4/5] Building CXX object src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o
2023-11-24T10:45:11.4826195Z FAILED: src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o 
2023-11-24T10:45:11.4832293Z /usr/bin/c++  -Isrc/modules/ergoCubEmotions -isystem /__w/robotology-superbuild/robotology-superbuild/build/install/include -isystem /usr/include/opencv4 -g -std=gnu++17 -MD -MT src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o -MF src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o.d -o src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o -c /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp
2023-11-24T10:45:11.4838854Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp: In member function 'virtual bool ErgoCubEmotions::updateModule()':
2023-11-24T10:45:11.4842389Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:153:13: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4844111Z   153 |             pollKey();
2023-11-24T10:45:11.4844562Z       |             ^~~~~~~
2023-11-24T10:45:11.4846407Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:173:13: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4848101Z   173 |             pollKey();
2023-11-24T10:45:11.4848553Z       |             ^~~~~~~
2023-11-24T10:45:11.4850792Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp: In member function 'void ErgoCubEmotions::showTransition(const string&, const string&)':
2023-11-24T10:45:11.4854286Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:219:17: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4855997Z   219 |                 pollKey();
2023-11-24T10:45:11.4856478Z       |                 ^~~~~~~
2023-11-24T10:45:11.4856996Z ninja: build stopped: subcommand failed.

See also #1439 .

@traversaro
Copy link
Member

Also Debian bullseye and Ubuntu 20.04 has some problems:

2023-11-24T10:45:11.4824385Z [4/5] Building CXX object src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o
2023-11-24T10:45:11.4826195Z FAILED: src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o 
2023-11-24T10:45:11.4832293Z /usr/bin/c++  -Isrc/modules/ergoCubEmotions -isystem /__w/robotology-superbuild/robotology-superbuild/build/install/include -isystem /usr/include/opencv4 -g -std=gnu++17 -MD -MT src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o -MF src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o.d -o src/modules/ergoCubEmotions/CMakeFiles/ergoCubEmotions.dir/ergoCubEmotions.cpp.o -c /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp
2023-11-24T10:45:11.4838854Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp: In member function 'virtual bool ErgoCubEmotions::updateModule()':
2023-11-24T10:45:11.4842389Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:153:13: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4844111Z   153 |             pollKey();
2023-11-24T10:45:11.4844562Z       |             ^~~~~~~
2023-11-24T10:45:11.4846407Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:173:13: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4848101Z   173 |             pollKey();
2023-11-24T10:45:11.4848553Z       |             ^~~~~~~
2023-11-24T10:45:11.4850792Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp: In member function 'void ErgoCubEmotions::showTransition(const string&, const string&)':
2023-11-24T10:45:11.4854286Z /__w/robotology-superbuild/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/ergoCubEmotions.cpp:219:17: error: 'pollKey' was not declared in this scope
2023-11-24T10:45:11.4855997Z   219 |                 pollKey();
2023-11-24T10:45:11.4856478Z       |                 ^~~~~~~
2023-11-24T10:45:11.4856996Z ninja: build stopped: subcommand failed.

See also #1439 .

Ok pollKey was added in OpenCV 4.5.2 , so this replies to #1539 (comment) .

@traversaro
Copy link
Member

I am not a big fan of this kind of distro-specific logic, but probably it could make sense to only enable this option based on the OpenCV version.

@traversaro
Copy link
Member

I am not a big fan of this kind of distro-specific logic, but probably it could make sense to only enable this option based on the OpenCV version.

@Nicogene I modified the PR to explain what I intended, let me know if it is clear, thanks!

@Nicogene
Copy link
Member Author

Nicogene commented Feb 26, 2024

I am not a big fan of this kind of distro-specific logic, but probably it could make sense to only enable this option based on the OpenCV version.

@Nicogene I modified the PR to explain what I intended, let me know if it is clear, thanks!

Yes I think it is the best we can do!

@traversaro traversaro changed the title ergocub-software: compile ergoCubEmotions by default ergocub-software: compile ergoCubEmotions by default if OpenCV >= 4.5.2 Feb 29, 2024
@traversaro traversaro merged commit 0a13a26 into master Feb 29, 2024
36 of 37 checks passed
@traversaro traversaro deleted the Nicogene-patch-1 branch February 29, 2024 11:07
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.

Enable COMPILE_ergoCubEmotions in ergocub-software
2 participants