Yarp: Macro error in Storable

Created on 4 Jun 2018  路  3Comments  路  Source: robotology/yarp

Describe the bug

Building the devel branch fails with the following error:

[  3%] Building CXX object src/libYARP_OS/CMakeFiles/YARP_OS.dir/src/Storable.cpp.o
/tmp/robotology-superbuild/robotology/YARP/src/libYARP_OS/src/Storable.cpp:77:24: error: use of undeclared identifier 'FAILED_TO_RUN'
    char buf[16 + 15 + FAILED_TO_RUN];
                       ^
/tmp/robotology-superbuild/robotology/YARP/src/libYARP_OS/src/Storable.cpp:78:34: error: use of undeclared identifier 'FAILED_TO_RUN'
    std::snprintf(buf, 16 + 15 + FAILED_TO_RUN, "%.*g", 15, x);

Configuration (please complete the following information):

  • OS: ubuntu
  • yarp version: commit 50c6677bf126ea88259eb9f4d77334bc45e2f464

    • compiler: clang6

Additional context

The error is generated here:

https://github.com/robotology/yarp/blob/50c6677bf126ea88259eb9f4d77334bc45e2f464/src/libYARP_OS/src/Storable.cpp#L77-L79

Probably due to a failing substitution of:

https://github.com/robotology/yarp/blob/50c6677bf126ea88259eb9f4d77334bc45e2f464/src/libYARP_OS/src/Storable.cpp#L67

in the following CMake files:

https://github.com/robotology/yarp/blob/245690a2bb2b371a81efe0da2f9dbbd9f34e53b2/src/libYARP_conf/include/yarp/conf/numeric.h.in#L28-L30

https://github.com/robotology/yarp/blob/245690a2bb2b371a81efe0da2f9dbbd9f34e53b2/src/libYARP_conf/CMakeLists.txt#L57-L61

cc @drdanz @Nicogene @traversaro

YARP v2.3.72 CMake Library - YARP_os YARP v3.0.0 Bug Fixed

Most helpful comment

In the pre-release days this was fully reproducible and it blocked me for like two days (I downgraded temporarily). The tagged v3.0.0 instead works flawlessly, I don't know what did change but the problem didn't occur again.

All 3 comments

I'd say that the problem is in the try_run here:

https://github.com/robotology/yarp/blob/245690a2bb2b371a81efe0da2f9dbbd9f34e53b2/cmake/YarpSystemCheck.cmake#L144-L167

Did it happen once, or is this something reproducible?

In the pre-release days this was fully reproducible and it blocked me for like two days (I downgraded temporarily). The tagged v3.0.0 instead works flawlessly, I don't know what did change but the problem didn't occur again.

Cool closing for now, if it happens again please reopen it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nicogene picture Nicogene  路  3Comments

S-Dafarra picture S-Dafarra  路  3Comments

drdanz picture drdanz  路  3Comments

abolfazlzaraki picture abolfazlzaraki  路  3Comments

diegoferigo picture diegoferigo  路  3Comments