Hello,
I’m trying to run ArduCopter SITL (recent master branch) on Arch linux, but I got a build error:
n file included from /usr/include/SFML/Graphics/Color.hpp:229,
from /usr/include/SFML/Graphics/Shape.hpp:32,
from /usr/include/SFML/Graphics/CircleShape.hpp:32,
from /usr/include/SFML/Graphics.hpp:32,
from ../../libraries/AP_Notify/Display_SITL.h:11,
from ../../libraries/AP_Notify/Display_SITL.cpp:17:
/usr/include/SFML/Graphics/Color.inl: In function ‘constexpr sf::Color sf::operator+(Color, Color)’:
/usr/include/SFML/Graphics/Color.inl:77:16: error: variable ‘clampedAdd’ of non-literal type ‘const sf::operator+(Color, Color)::<lambda(uint8_t, uint8_t)>’ in ‘constexpr’ function only available with ‘-std=c++2b’ or ‘-std=gnu++2b’
77 | const auto clampedAdd = [](std::uint8_t lhs, std::uint8_t rhs)
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.
In file included from /usr/include/SFML/Graphics/Color.hpp:229,
from /usr/include/SFML/Graphics/Shape.hpp:32,
from /usr/include/SFML/Graphics/CircleShape.hpp:32,
from /usr/include/SFML/Graphics.hpp:32,
from ../../libraries/AP_Notify/Display_SITL.h:11,
from ../../libraries/AP_Notify/Display.cpp:25:
/usr/include/SFML/Graphics/Color.inl: In function ‘constexpr sf::Color sf::operator+(Color, Color)’:
/usr/include/SFML/Graphics/Color.inl:77:16: error: variable ‘clampedAdd’ of non-literal type ‘const sf::operator+(Color, Color)::<lambda(uint8_t, uint8_t)>’ in ‘constexpr’ function only available with ‘-std=c++2b’ or ‘-std=gnu++2b’
77 | const auto clampedAdd = [](std::uint8_t lhs, std::uint8_t rhs)
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Waf: Leaving directory `/home/DATA/Projects/ardupilot/build/sitl'
Build failed
-> task in 'objs/AP_Notify' failed (exit status 1):
{task 139284724412704: cxx Display_SITL.cpp -> Display_SITL.cpp.0.o}
(run with -v to display more information)
-> task in 'objs/AP_Notify' failed (exit status 1):
{task 139284724412480: cxx Display.cpp -> Display.cpp.0.o}
(run with -v to display more information)
gcc --version
gcc (GCC) 14.2.1 20250207
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.