laforge submitted this change.
build: require C++17 for the UHD 4.x headers
configure asks for C++11 through AX_CXX_COMPILE_STDCXX_11. The public
headers of UHD 4.10 use std::optional, std::is_same_v and
std::is_arithmetic_v, none of which exist in C++11, so UHDDevice.cpp
fails to compile against them:
uhd/utils/cast.hpp:70:15: error: no template named 'is_same_v' in
namespace 'std'
uhd/rfnoc/actions.hpp:104:15: error: no template named 'optional' in
namespace 'std'
UHD 4.10 builds its own sources as C++20, and a consumer of its public
headers needs at least C++17.
Ask for C++17 with AX_CXX_COMPILE_STDCXX, the same macro already
shipped in config/. The osmo-trx sources compile unchanged under the
newer standard.
Seen with UHD 4.10.0.0 from Homebrew on macOS ARM64. The version, not
the platform, is what decides this: any distribution carrying UHD 4.10
reaches the same headers.
Change-Id: If8d80f0708f3856f36d56e637ad8d57f3d3d1bad
Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com>
---
M configure.ac
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0cd388d..50bdd64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@
AM_PROG_AS
AC_PROG_CC
AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX_11
+AX_CXX_COMPILE_STDCXX([17], [ext], [mandatory])
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
To view, visit change 43579. To unsubscribe, or for help writing mail filters, visit settings.