Date: Mon, 12 Dec 2022 13:53:54 +0000 From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 268329] lang/gjs: fix build with clang/libc++ 15 Message-ID: <bug-268329-6497@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268329 Bug ID: 268329 Summary: lang/gjs: fix build with clang/libc++ 15 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: gnome@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: gnome@FreeBSD.org Flags: maintainer-feedback?(gnome@FreeBSD.org) During an exp-run for llvm 15 (see bug 265425), it turned out that lang/gjs failed to build with clang and libc++ 15: In file included from ../test/gjs-tests.cpp:11: In file included from /usr/include/c++/v1/random:1689: In file included from /usr/include/c++/v1/__random/discrete_distribution.h:18: In file included from /usr/include/c++/v1/numeric:167: In file included from /usr/include/c++/v1/functional:515: In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:24: In file included from /usr/include/c++/v1/array:127: In file included from /usr/include/c++/v1/algorithm:1851: In file included from /usr/include/c++/v1/__algorithm/ranges_sample.h:13: In file included from /usr/include/c++/v1/__algorithm/sample.h:18: /usr/include/c++/v1/__random/uniform_int_distribution.h:162:5: error: sta= tic assertion failed due to requirement '__libcpp_random_is_valid_inttype<char32_t>::value': IntType must be a supported integer type static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "Int= Type must be a supported integer type"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../test/gjs-tests.cpp:71:16: note: in instantiation of template class 'std::uniform_int_distribution<char32_t>' requested here return std::uniform_int_distribution<T>(lowest_value)(gen); ^ ../test/gjs-tests.cpp:942:30: note: in instantiation of function template specialization 'Gjs::Test::get_random_number<char32_t>' requested here char32_t random_char32 =3D get_random_number<char32_t>(); ^ This is because std::uniform_int_distribution is only defined for strict integer types, such as short, int, etc. Use std::uniform_int_distribution<uint32_t> instead, and cast the result back t= o a char32_t. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268329-6497>