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

Compilation failure with yarp 3.10 #45

Closed
traversaro opened this issue Jul 31, 2024 · 3 comments · Fixed by #46
Closed

Compilation failure with yarp 3.10 #45

traversaro opened this issue Jul 31, 2024 · 3 comments · Fixed by #46

Comments

@traversaro
Copy link
Member

In robotology/robotology-superbuild#1547 (comment) we found some compilation failures of icub-basic-demos with YARP master branch of August 2024 (future YARP 3.10):

2024-07-30T18:19:34.1539372Z [3/28] Building CXX object demoRedBall/CMakeFiles/demoRedBall.dir/src/main.cpp.o
2024-07-30T18:19:34.1540196Z FAILED: demoRedBall/CMakeFiles/demoRedBall.dir/src/main.cpp.o 
2024-07-30T18:19:34.1543597Z /usr/bin/c++ -DBOOST_TEST_DYN_LINK -DLIBBULLET_VERSION=3.05 -DLIBBULLET_VERSION_GT_282 -D_USE_MATH_DEFINES -isystem /home/runner/work/robotology-superbuild/robotology-superbuild/build/install/include -O3 -DNDEBUG -std=c++17 -MD -MT demoRedBall/CMakeFiles/demoRedBall.dir/src/main.cpp.o -MF demoRedBall/CMakeFiles/demoRedBall.dir/src/main.cpp.o.d -o demoRedBall/CMakeFiles/demoRedBall.dir/src/main.cpp.o -c /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp
2024-07-30T18:19:34.1548611Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp: In member function ‘virtual bool managerThread::threadInit()’:
2024-07-30T18:19:34.1551216Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1533:18: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1552864Z  1533 |         bGeneral.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1553374Z       |                  ^~~~~~~~~~
2024-07-30T18:19:34.1555337Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1533:32: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1556797Z  1533 |         bGeneral.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1557286Z       |                                ^~~~~~~~~~
2024-07-30T18:19:34.1559032Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1554:16: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1560430Z  1554 |         bTorso.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1560896Z       |                ^~~~~~~~~~
2024-07-30T18:19:34.1562674Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1554:30: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1564084Z  1554 |         bTorso.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1564588Z       |                              ^~~~~~~~~~
2024-07-30T18:19:34.1566328Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1566:18: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1567732Z  1566 |         bLeftArm.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1568465Z       |                  ^~~~~~~~~~
2024-07-30T18:19:34.1570237Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1566:32: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1571693Z  1566 |         bLeftArm.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1572170Z       |                                ^~~~~~~~~~
2024-07-30T18:19:34.1573897Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1567:19: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1575311Z  1567 |         bRightArm.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1575793Z       |                   ^~~~~~~~~~
2024-07-30T18:19:34.1577556Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1567:33: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1579249Z  1567 |         bRightArm.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1579756Z       |                                 ^~~~~~~~~~
2024-07-30T18:19:34.1581500Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1587:15: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1582911Z  1587 |         bHome.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1583405Z       |               ^~~~~~~~~~
2024-07-30T18:19:34.1586637Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1587:29: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1587921Z  1587 |         bHome.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1588341Z       |                             ^~~~~~~~~~
2024-07-30T18:19:34.1589888Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1593:17: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1591093Z  1593 |         bArmSel.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1591507Z       |                 ^~~~~~~~~~
2024-07-30T18:19:34.1592967Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1593:31: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1594435Z  1593 |         bArmSel.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1594853Z       |                               ^~~~~~~~~~
2024-07-30T18:19:34.1596339Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1598:16: error: ‘class yarp::os::Bottle’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1597689Z  1598 |         bGrasp.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1598098Z       |                ^~~~~~~~~~
2024-07-30T18:19:34.1599584Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:1598:30: error: ‘class yarp::os::ResourceFinder’ has no member named ‘getMonitor’
2024-07-30T18:19:34.1600832Z  1598 |         bGrasp.setMonitor(rf.getMonitor());
2024-07-30T18:19:34.1601245Z       |                              ^~~~~~~~~~
2024-07-30T18:19:34.1602127Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp: At global scope:
2024-07-30T18:19:34.1603897Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2103:1: error: expected class-name before ‘{’ token
2024-07-30T18:19:34.1604939Z  2103 | {
2024-07-30T18:19:34.1605168Z       | ^
2024-07-30T18:19:34.1606285Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2109:23: error: ‘SearchReport’ does not name a type
2024-07-30T18:19:34.1607423Z  2109 |     void report(const SearchReport& report, const char *context)
2024-07-30T18:19:34.1608078Z       |                       ^~~~~~~~~~~~
2024-07-30T18:19:34.1609543Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp: In member function ‘void myReport::report(const int&, const char*)’:
2024-07-30T18:19:34.1611784Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2112:27: error: request for member ‘key’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1613041Z  2112 |         string key=report.key;
2024-07-30T18:19:34.1613398Z       |                           ^~~
2024-07-30T18:19:34.1614871Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2128:20: error: request for member ‘isFound’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1616131Z  2128 |         if (report.isFound)
2024-07-30T18:19:34.1616466Z       |                    ^~~~~~~
2024-07-30T18:19:34.1618123Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2129:35: error: request for member ‘value’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1619452Z  2129 |             actual.put(key,report.value);
2024-07-30T18:19:34.1619863Z       |                                   ^~~~~
2024-07-30T18:19:34.1621498Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2131:20: error: request for member ‘isComment’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1622813Z  2131 |         if (report.isComment==true)
2024-07-30T18:19:34.1623208Z       |                    ^~~~~~~~~
2024-07-30T18:19:34.1745412Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2133:36: error: request for member ‘value’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1747077Z  2133 |             comment.put(key,report.value);
2024-07-30T18:19:34.1747509Z       |                                    ^~~~~
2024-07-30T18:19:34.1749276Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2137:20: error: request for member ‘isDefault’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1750700Z  2137 |         if (report.isDefault==true)
2024-07-30T18:19:34.1751078Z       |                    ^~~~~~~~~
2024-07-30T18:19:34.1752614Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2139:37: error: request for member ‘value’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1754257Z  2139 |             fallback.put(key,report.value);
2024-07-30T18:19:34.1754681Z       |                                     ^~~~~
2024-07-30T18:19:34.1756196Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2147:28: error: request for member ‘isFound’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1757516Z  2147 |                 if (report.isFound)
2024-07-30T18:19:34.1757887Z       |                            ^~~~~~~
2024-07-30T18:19:34.1759385Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2149:44: error: request for member ‘value’ in ‘report’, which is of non-class type ‘const int’
2024-07-30T18:19:34.1760732Z  2149 |                     string hasValue=report.value;
2024-07-30T18:19:34.1761155Z       |                                            ^~~~~
2024-07-30T18:19:34.1762336Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp: In function ‘int main(int, char**)’:
2024-07-30T18:19:34.1764717Z /home/runner/work/robotology-superbuild/robotology-superbuild/src/icub-basic-demos/demoRedBall/src/main.cpp:2197:8: error: ‘class yarp::os::ResourceFinder’ has no member named ‘setMonitor’
2024-07-30T18:19:34.1766059Z  2197 |     rf.setMonitor(&rep);
2024-07-30T18:19:34.1766386Z       |        ^~~~~~~~~~

Probably (but I am not 100% sure) this is related to the change robotology/yarp#3059, some other related issues and PRs:

@traversaro
Copy link
Member Author

fyi @SimoneMic (interested to use YARP 3.10 on ergoCubSN001) @Nicogene @martinaxgloria (as you are using YARP 3.10 in argus camera driver).

@traversaro
Copy link
Member Author

Probably (but I am not 100% sure) this is related to the change robotology/yarp#3059, some other related issues and PRs:

The main difference w.r.t. to those changes is that in this case the use of SearchReport is non-trivial here (see

class myReport : public SearchMonitor
{
protected:
Property comment, fallback, present, actual, reported;
Bottle order;
public:
void report(const SearchReport& report, const char *context)
{
string ctx=context;
string key=report.key;
string prefix="";
prefix=ctx;
prefix+=".";
key=prefix+key;
if (key.substr(0,1)==".")
key = key.substr(1,key.length());
if (!present.check(key))
{
present.put(key,"present");
order.addString(key);
}
if (report.isFound)
actual.put(key,report.value);
if (report.isComment==true)
{
comment.put(key,report.value);
return;
}
if (report.isDefault==true)
{
fallback.put(key,report.value);
return;
}
if (comment.check(key))
{
if (!reported.check(key))
{
if (report.isFound)
{
string hasValue=report.value;
if (hasValue.length()>35)
hasValue=hasValue.substr(0,30)+" ...";
yInfo("Checking \"%s\": = %s (%s)",key.c_str(),
hasValue.c_str(),comment.check(key.c_str(),Value("")).toString().c_str());
}
else
{
reported.put(key,1);
bool hasDefault=fallback.check(key);
string defString="";
if (hasDefault)
{
defString+=" ";
defString+="(default ";
string theDefault=fallback.find(key).toString();
if (theDefault=="")
defString+="is blank";
else
defString+=theDefault;
defString+=")";
}
yInfo("Checking \"%s\": %s%s",key.c_str(),
comment.check(key.c_str(),Value("")).toString().c_str(),defString.c_str());
}
}
}
}
};
). @randaz81 do you have any advice on how the YARP 3.10 migration could be done here? Thanks!

@randaz81
Copy link
Member

@traversaro checking...

@pattacini pattacini linked a pull request Jul 31, 2024 that will close this issue
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 a pull request may close this issue.

2 participants