Boost 1-89 + GCC 15.2 (MSYS2 ucrt64, POSIX) – thread_local static_assert with Boost.Math

Hello, After updating to Boost 1.89 I can no longer build my code that uses boost::math::zeta() with a boost::multiprecision::mpfr_float custom type (dynamic backend). The compiler fails with: static assertion failed: Your platform does not support thread_local with non-trivial types, last checked with Mingw-x64-8.1, Jan 2021. Please try a Mingw build with the POSIX threading model, see https://sourceforge.net/p/mingw-w64/bugs/527/ I use Windows 11, MSYS2 ucrt64 toolchain GCC 15.2.0 (Thread model: posix) . Boost also installed by MSYS2 ucrt64. Building from VS Code tasks with a flag -pthread Has anyone else encountered this with Boost 1.89 on MinGW-w64? Are there recommended compiler flags or things to work around it? For now I can only downgrade to Boost 1.88 - compile without problems. Best regards, Ivo. e ivo.celmans@gmail.com

I think it is just a compiler bug that was not detected in 1.88 In other words it is intentional change in Boost, not a bug: https://github.com/boostorg/math/commit/7dcfaaf413251b5a453e37f004e0f15eb33d... You could maybe ask math maintainers to see if bug still happens with GCC15.2, since it seems they use GCC14.2 on CI: https://github.com/boostorg/math/actions/runs/17120710064/job/48560675865 P.S. linked mingw bug links gcc bug that is closed, so I do not know if this bug reappeared or it is a separate bug and static assert refers to old bug. On Fri, Aug 22, 2025 at 6:03 PM Ivo Celmans via Boost-users < boost-users@lists.boost.org> wrote:
Hello,
After updating to Boost 1.89 I can no longer build my code that uses boost::math::zeta() with a boost::multiprecision::mpfr_float custom type (dynamic backend). The compiler fails with:
static assertion failed: Your platform does not support thread_local with non-trivial types, last checked with Mingw-x64-8.1, Jan 2021. Please try a Mingw build with the POSIX threading model, see https://sourceforge.net/p/mingw-w64/bugs/527/
I use Windows 11, MSYS2 ucrt64 toolchain GCC 15.2.0 (Thread model: posix) . Boost also installed by MSYS2 ucrt64. Building from VS Code tasks with a flag -pthread
Has anyone else encountered this with Boost 1.89 on MinGW-w64? Are there recommended compiler flags or things to work around it? For now I can only downgrade to Boost 1.88 - compile without problems.
Best regards, Ivo.
e ivo.celmans@gmail.com _______________________________________________ Boost-users mailing list -- boost-users@lists.boost.org To unsubscribe send an email to boost-users-leave@lists.boost.org https://lists.boost.org/mailman3/lists/boost-users.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/boost-users@lists.boost.org/message/FR...
participants (2)
-
Ivan Matek
-
Ivo Celmans