polymake fails to compile on FreeBSD with clang 21 due to invalid specialization
Posted: 10 Jun 2026, 17:45
Hi everyone,
I'm currently working on updating the FreeBSD of polymake to version 4.15 and I'm running into the following issue:
This is not the only error; there are 15 in total, all pointing to line 1527 in include/core/polymake/internal/operations.h.
My system is running FreeBSD 14.4-Stable amd64 with clang 21.1.8 as system compiler. It works fine in a jail running FreeBSD 14.4-Release amd64 with clang 19.1.7.
I'm currently working on updating the FreeBSD of polymake to version 4.15 and I'm running into the following issue:
Code: Select all
[...]
FAILED: [code=1] /home/pj/ports-wip/math/polymake/work/polymake-4.15/build/Opt/apps/common/cpperl/CachedObjectPointer.o
c++ -c -o /home/pj/ports-wip/math/polymake/work/polymake-4.15/build/Opt/apps/common/cpperl/CachedObjectPointer.o -MMD -MT /home/pj/ports-wip/math/polymake/work/polymake-4.15/build/Opt/apps/common/cpperl/CachedObjectPointer.o -MF /home/pj/ports-wip/math/polymake/work/polymake-4.15/build/Opt/apps/common/cpperl/CachedObjectPointer.o.d -fPIC -pipe -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -stdlib=libc++ -std=c++14 -Wno-logical-op-parentheses -Wno-shift-op-parentheses -Wno-mismatched-tags -Wno-unused-local-typedef -Wno-error=unneeded-internal-declaration -Wshadow -Wconversion -Wno-sign-conversion -Wzero-as-null-pointer-constant -fopenmp -I/usr/local/include -I/usr/local/lib -I/usr/local/include -DPOLYMAKE_WITH_FLINT -DPOLYMAKE_DEBUG=0 -DNDEBUG -DPOLYMAKE_APPNAME=common -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/app-wrappers -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/apps -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/external/TOSimplex -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/external/Miniball -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core-wrappers -I/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core /home/pj/ports-wip/math/polymake/work/polymake-4.15/apps/common/cpperl/generated/CachedObjectPointer.cc && : 'COMPILER_USED=21.1.8'
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/apps/common/cpperl/generated/CachedObjectPointer.cc:6:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/client.h:21:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/perl/Value.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/GenericIO.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/sparse.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/iterator_filters.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/modified_containers.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/singular_containers.h:20:
In file included from /home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/shared_object.h:21:
/home/pj/ports-wip/math/polymake/work/polymake-4.15/include/core/polymake/internal/operations.h:1527:8: error: 'is_default_constructible' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
1527 | struct is_default_constructible<pm::operations::composed11<InnerOperation, OuterOperation>>
| ^
/usr/include/c++/v1/__type_traits/is_constructible.h:49:8: note: marked '_Clang::no_specializations' here
49 | struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : integral_constant<bool, __is_constructible(_Tp)> {};
| ^
/usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
1167 | [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
| ^
1 error generated.
[...]
My system is running FreeBSD 14.4-Stable amd64 with clang 21.1.8 as system compiler. It works fine in a jail running FreeBSD 14.4-Release amd64 with clang 19.1.7.