polymake fails to compile on FreeBSD with clang 21 due to invalid specialization

Discussions on installation issues go here.
Philipp
Posts: 15
Joined: 17 Jun 2021, 20:30

polymake fails to compile on FreeBSD with clang 21 due to invalid specialization

Postby Philipp » 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:

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. [...]
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.

User avatar
gawrilow
Main Author
Posts: 434
Joined: 25 Dec 2010, 17:40

Re: polymake fails to compile on FreeBSD with clang 21 due to invalid specialization

Postby gawrilow » 10 Jun 2026, 19:23

We are working on a rather radical rewrite of polymake core libraries in C++17 which happily builds with all modern versions of clang and gcc. It's taking all our available resources, leaving very little room for the maintenance of the existing master branch. Unless we find by a miracle additional resources to fix this, I'm afraid that the most feasible solution for now is to temporarily disable the polymake port in FreeBSD until we release the refactored version.

Philipp
Posts: 15
Joined: 17 Jun 2021, 20:30

Re: polymake fails to compile on FreeBSD with clang 21 due to invalid specialization

Postby Philipp » 11 Jun 2026, 18:50

Thank you for your reply and the explanation. I'm looking forward to the new version!


Return to “Installing polymake”