Skip to content

Build errors with boost v1.19.0 on OXS with g++-15 and BOOST_USE_MODULES #41

Description

@ClausKlein

I have a cmake build adapter project to build boost as a sub project if needed:

ClausKlein/boost-cmake#12

-- We found boost ctest module: /Users/clausklein/.cache/CPM/boost-1.91.0-1/tools/cmake/include/BoostTestJamfile.cmake
-- Configuring done (74.3s)
-- Generating done (0.9s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BOOST_STANDALONE


-- Build files have been written to: /Users/clausklein/Workspace/cpp/cxx20/boost-cmake/build/Release
ln -sf build/Release/compile_commands.json .
cmake --build --preset Release
[0/2] Re-checking globbed directories...
[128/486] Building CXX object _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o
FAILED: [code=1] _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/boost.any.gcm 
ccache /usr/local/bin/g++-15 -DBOOST_USE_MODULES -Dboost_any_EXPORTS -I/Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/any/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/config/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/throw_exception/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/assert/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/type_index/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/container_hash/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/describe/include -isystem /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/mp11/include -stdlib=libstdc++ -O3 -DNDEBUG -std=c++20 -fPIC -MD -MT _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o -MF _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o.d -fmodules-ts -fmodule-mapper=_deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o _deps/boost-build/libs/any/CMakeFiles/boost_any.dir/modules/boost_any.cppm.o -c /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/any/modules/boost_any.cppm
In file included from /usr/local/Cellar/gcc/15.2.0_1/include/c++/15/memory:71,
                 from /Users/clausklein/.cache/CPM/boost-1.91.0-1/libs/any/modules/boost_any.cppm:19:
/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_uninitialized.h:86:65: error: default argument for template parameter for class enclosing 'constexpr std::_UninitDestroyGuard<_ForwardIterator, _Alloc>::_UninitDestroyGuard(_ForwardIterator&, _Alloc&)' [-Wtemplate-body]
   86 |       _UninitDestroyGuard(_ForwardIterator& __first, _Alloc& __a)
      |                                                                 ^
/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_uninitialized.h:86:65: error: template definition of non-template 'constexpr std::_UninitDestroyGuard<_ForwardIterator, _Alloc>::_UninitDestroyGuard(_ForwardIterator&, _Alloc&)' [-Wtemplate-body]
/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_uninitialized.h:91:28: error: template definition of non-template 'constexpr std::_UninitDestroyGuard<_ForwardIterator, _Alloc>::~_UninitDestroyGuard()' [-Wtemplate-body]
   91 |       ~_UninitDestroyGuard()
      |                            ^
/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_uninitialized.h:98:20: error: template definition of non-template 'constexpr void std::_UninitDestroyGuard<_ForwardIterator, _Alloc>::release()' [-Wtemplate-body]
   98 |       void release() { _M_cur = 0; }
      |                    ^
/usr/local/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_uninitialized.h:101: confused by earlier errors, bailing out
[141/486] Building CXX object _deps/boost-build/libs/thread/CMakeFiles/boost_thread.dir/src/pthread/thread.cpp.o
ninja: build stopped: subcommand failed.
make: *** [build] Error 1
bash-5.3$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions