Closed pattacini closed 11 months ago
I got the same problem in the robotology-superbuild: https://github.com/robotology/robotology-superbuild/issues/1505 . I guess it is a regression due to an update in Visual Studio version in GitHub Actions. I suspect some header started including windows.h
, and so we have a problem with the min
macro definition. Probably we can define somewhere (even at CMake level) NOMINMAX
(see https://stackoverflow.com/questions/13416418/define-nominmax-using-stdmin-max). Another workaround is to write std::min
as (std::min)
, see https://stackoverflow.com/questions/13416418/define-nominmax-using-stdmin-max .
Actually windows.h is explicitly included, see https://github.com/robotology/yarp/blob/a0d408b7c4215bae89c9784090fb942ead103893/src/libYARP_os/src/yarp/os/Log.cpp#L45 . So probably something changed that made YARP_HAS_WIN_VT_SUPPORT
defined, see https://github.com/robotology/yarp/blob/a0d408b7c4215bae89c9784090fb942ead103893/cmake/YarpSystemCheck.cmake#L175 . CMAKE_SYSTEM_VERSION
is a tricky variable and can change based on the Windows SDK installed in the machine or the CMake version. Anyhow, I think regardless of what happened this needs to be fixed.
Interesting, NOMINMAX
should be already defined, see https://github.com/robotology/yarp/blob/a0d408b7c4215bae89c9784090fb942ead103893/src/libYARP_os/src/CMakeLists.txt#L438 . Then I do not know what is going on. A possible hotfix would be to just disable the YARP_HAS_WIN_VT_SUPPORT
part of the code.
Hi @randaz81 @elandini84
Any news about this? It's somewhat critical as it breaks our main CI workflows in robotology-superbuild, icub-main...
Thanks @randaz81 !
Describe the bug Got compilation error con
icub-main
CI ofyarp-3.8
at:https://github.com/robotology/yarp/blob/323e27a602d5dc610feaacd4bf9742282d081bab/src/libYARP_os/src/yarp/os/Log.cpp#L751
Here's the error:
To Reproduce Steps to reproduce the behavior: See:
Expected behavior We should fix
yarp-3.8
in this respect.Screenshots If applicable, add screenshots to help explain your problem.
Configuration (please complete the following information):
The build environment can be figured out from the GH CI.
Additional context Add any other context about the problem here.
cc @randaz81