Skip to content

BEMAN_UTF_VIEW_USE_MODULES does not build on OSX with g++15 #210

Description

@ClausKlein
bash-5.3$ CXX=g++-15 cmake --preset gcc-release -D CMAKE_CXX_STANDARD=23 -D BEMAN_UTF_VIEW_USE_MODULES=1 --fresh --log-level=VERBOSE
Preset CMake variables:

  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_EXPORT_COMPILE_COMMANDS="ON"
  CMAKE_PROJECT_TOP_LEVEL_INCLUDES="./infra/cmake/use-fetch-content.cmake"
  CMAKE_TOOLCHAIN_FILE="infra/cmake/gnu-toolchain.cmake"

-- The CXX compiler identification is GNU 15.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++ - skipped
-- Detecting CXX compile features
CMake Warning (dev) at /Users/clausklein/.local/share/cmake-4.3/Modules/Compiler/CMakeCommonCompilerMacros.cmake:226 (cmake_language):
  CMake's support for `import std;` in C++23 and newer is experimental.  It
  is meant only for experimentation and feedback to CMake developers.
Call Stack (most recent call first):
  /Users/clausklein/.local/share/cmake-4.3/Modules/CMakeDetermineCompilerSupport.cmake:110 (cmake_cxx_find_modules_json)
  /Users/clausklein/.local/share/cmake-4.3/Modules/CMakeTestCXXCompiler.cmake:83 (CMAKE_DETERMINE_COMPILER_SUPPORT)
  CMakeLists.txt:7 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Detecting CXX compile features - done
CMake Warning at /Users/clausklein/.local/share/cmake-4.3/Modules/CPack.cmake:541 (message):
  CPack.cmake has already been included!!
Call Stack (most recent call first):
  build/gcc-release/_deps/transform_view-src/infra/cmake/beman-install-library.cmake:325 (include)
  build/gcc-release/_deps/transform_view-src/CMakeLists.txt:45 (include)


-- beman-install-library(beman.transform_view): COMPONENT 'transform_view'
-- beman_install_library(beman.transform_view): EXPORT_NAME transform_view for TARGET 'beman.transform_view'
-- beman-install-library(beman.transform_view): 'beman.transform_view' has INTERFACE_HEADER_SETS=HEADERS
-- beman-install-library(beman.transform_view): 'beman.transform_view' has INTERFACE_CXX_MODULE_SETS=CXX_MODULES
-- Configuring Build Telemetry
-- beman-install-library(beman.utf_view): COMPONENT 'utf_view'
-- beman_install_library(beman.utf_view): EXPORT_NAME utf_view for TARGET 'beman.utf_view'
-- beman-install-library(beman.utf_view): 'beman.utf_view' has INTERFACE_HEADER_SETS=HEADERS
-- beman-install-library(beman.utf_view): 'beman.utf_view' has INTERFACE_CXX_MODULE_SETS=CXX_MODULES
-- beman_install_library(beman.utf_view): EXPORT_NAME transform_view for TARGET 'beman.transform_view'
-- beman-install-library(beman.utf_view): 'beman.transform_view' has INTERFACE_HEADER_SETS=HEADERS
-- beman-install-library(beman.utf_view): 'beman.transform_view' has INTERFACE_CXX_MODULE_SETS=CXX_MODULES
Examples to be built: readme_examples;null_term_argv_environ
-- Configuring done (2.8s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/beman-project/utf_view/build/gcc-release
bash-5.3$ cmake --build  --preset gcc-release --target install
[1/2] Collecting build metrics
[32/46] Building CXX object CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o
FAILED: [code=1] CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o CMakeFiles/beman.utf_view.dir/beman.utf_view.gcm 
"/Users/clausklein/.local/bin/ctest" --instrument --command-type compile --target-name beman.utf_view --config RelWithDebInfo --build-dir "/Users/clausklein/Workspace/cpp/beman-project/utf_view/build/gcc-release" --output CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o --source /Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/utf_view.cppm --language CXX --  ccache /usr/local/bin/g++  -I/Users/clausklein/Workspace/cpp/beman-project/utf_view/include -I/Users/clausklein/Workspace/cpp/beman-project/utf_view/build/gcc-release/include -I/Users/clausklein/Workspace/cpp/beman-project/utf_view/build/gcc-release/_deps/transform_view-src/include -I/Users/clausklein/Workspace/cpp/beman-project/utf_view/build/gcc-release/_deps/transform_view-build/include -O3  -O2 -g -DNDEBUG -std=gnu++23 -MD -MT CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o -MF CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o.d -fmodules-ts -fmodule-mapper=CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/beman.utf_view.dir/include/beman/utf_view/utf_view.cppm.o -c /Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/utf_view.cppm
In file included from /Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/utf_view.hpp:14,
                 from /Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/utf_view.cppm:18:
/Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/endian_view.hpp: In member function 'constexpr auto beman::utf_view::detail::exposition_only_byteswap_if_native_is_big_endian::operator()(auto:2) const':
/Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/endian_view.hpp:39:19: error: 'byteswap' is not a member of 'std' [-Wtemplate-body]
   39 |       return std::byteswap(x);
      |                   ^~~~~~~~
/Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/endian_view.hpp: In member function 'constexpr auto beman::utf_view::detail::exposition_only_byteswap_if_native_is_little_endian::operator()(auto:3) const':
/Users/clausklein/Workspace/cpp/beman-project/utf_view/include/beman/utf_view/endian_view.hpp:49:19: error: 'byteswap' is not a member of 'std' [-Wtemplate-body]
   49 |       return std::byteswap(x);
      |                   ^~~~~~~~
ninja: build stopped: subcommand failed.
bash-5.3$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions