Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: module file CMakeFiles/__cmake_cxx23.dir/std.pcm cannot be loaded due to a configuration mismatch with the current compilation #4279

Open
ClausKlein opened this issue Dec 28, 2024 · 0 comments

Comments

@ClausKlein
Copy link

bash-5.2$ make
Executing workflow step 1 of 4: configure preset "dev"

Preset CMake variables:

  CMAKE_BUILD_TYPE="Debug"
  CMAKE_CXX_EXTENSIONS="ON"
  CMAKE_CXX_FLAGS="-fstack-protector-strong -Wall -Wextra -Wpedantic -Wno-conversion -Wno-sign-conversion -Wcast-qual -Wformat=2 -Wundef -Wfloat-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wno-implicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wno-old-style-cast"
  CMAKE_CXX_STANDARD="23"
  CMAKE_CXX_STANDARD_REQUIRED="ON"
  CMAKE_EXPORT_COMPILE_COMMANDS="ON"
  CMAKE_INSTALL_PREFIX:PATH="/Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir"
  CMAKE_PREFIX_PATH:STRING="/Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir"
  FMT_DEVELOPER_MODE="ON"

-- use ccache
-- The CXX compiler identification is Clang 19.1.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Cellar/llvm/19.1.6/bin/clang++ - skipped
-- Detecting CXX compile features
CMake Warning (dev) at /usr/local/share/cmake-3.31/Modules/Compiler/CMakeCommonCompilerMacros.cmake:248 (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):
  /usr/local/share/cmake-3.31/Modules/CMakeDetermineCompilerSupport.cmake:113 (cmake_create_cxx_import_std)
  /usr/local/share/cmake-3.31/Modules/CMakeTestCXXCompiler.cmake:83 (CMAKE_DETERMINE_COMPILER_SUPPORT)
  CMakeLists.txt:10 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Detecting CXX compile features - done
-- LLVM_ROOT=/usr/local/Cellar/llvm/19.1.6
-- CMAKE_CXX_COMPILER_IMPORT_STD=23;26
-- CPPdefinitions=FMT_MODULE;FMT_IMPORT_STD
-- Found Git: /usr/local/bin/git (found version "2.47.1")
-- CPM: Adding package [email protected] (11.1.1 at /Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5)
-- The C compiler identification is Clang 19.1.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- CPM: Adding package [email protected] (v1.15.2 at /Users/clausklein/.cache/CPM/googletest/63d366a111d035db343a038884a22e44986dcf4d)
-- Module tests to be built: header-only-test
-- Configuring done (2.1s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cxx20/fmt-module/build/dev

Executing workflow step 2 of 4: build preset "dev"

[10/16] Building CXX object CMakeFiles/fmt.dir/module/fmt.cppm.o
FAILED: CMakeFiles/fmt.dir/module/fmt.cppm.o CMakeFiles/fmt.dir/fmt.pcm 
/usr/local/bin/ccache /usr/local/Cellar/llvm/19.1.6/bin/clang++ -DFMT_IMPORT_STD -DFMT_MODULE -I/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include -fstack-protector-strong -Wall -Wextra -Wpedantic -Wno-conversion -Wno-sign-conversion -Wcast-qual -Wformat=2 -Wundef -Wfloat-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wno-implicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wno-old-style-cast -g -std=c++23 -fexperimental-library -stdlib=libc++ -MD -MT CMakeFiles/fmt.dir/module/fmt.cppm.o -MF CMakeFiles/fmt.dir/module/fmt.cppm.o.d @CMakeFiles/fmt.dir/module/fmt.cppm.o.modmap -o CMakeFiles/fmt.dir/module/fmt.cppm.o -c /Users/clausklein/Workspace/cpp/cxx20/fmt-module/module/fmt.cppm
error: GNU extensions was enabled in PCH file but is currently disabled
error: module file CMakeFiles/__cmake_cxx23.dir/std.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch]
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/module/fmt.cppm:94:2: error: unknown type name 'endif'
   94 | #endif
      |  ^
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/module/fmt.cppm:96:8: error: expected ';' after top level declarator
   96 | #define FMT_EXPORT export
      |        ^
      |        ;
In file included from /Users/clausklein/Workspace/cpp/cxx20/fmt-module/module/fmt.cppm:115:
In file included from /Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/args.h:17:
In file included from /Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/format.h:41:
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:311:35: error: no type named 'enable_if' in namespace 'std'
  311 | using enable_if_t = typename std::enable_if<B, T>::type;
      |                     ~~~~~~~~~~~~~~^~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:311:44: error: expected ';' after alias declaration
  311 | using enable_if_t = typename std::enable_if<B, T>::type;
      |                                            ^
      |                                            ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:313:37: error: no type named 'conditional' in namespace 'std'
  313 | using conditional_t = typename std::conditional<B, T, F>::type;
      |                       ~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:313:48: error: expected ';' after alias declaration
  313 | using conditional_t = typename std::conditional<B, T, F>::type;
      |                                                ^
      |                                                ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:314:46: error: no template named 'integral_constant' in namespace 'std'
  314 | template <bool B> using bool_constant = std::integral_constant<bool, B>;
      |                                         ~~~~~^
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:316:42: error: no type named 'remove_reference' in namespace 'std'
  316 | using remove_reference_t = typename std::remove_reference<T>::type;
      |                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:316:58: error: expected ';' after alias declaration
  316 | using remove_reference_t = typename std::remove_reference<T>::type;
      |                                                          ^
      |                                                          ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:318:38: error: no type named 'remove_const' in namespace 'std'
  318 | using remove_const_t = typename std::remove_const<T>::type;
      |                        ~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:318:50: error: expected ';' after alias declaration
  318 | using remove_const_t = typename std::remove_const<T>::type;
      |                                                  ^
      |                                                  ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:320:38: error: no type named 'remove_cv' in namespace 'std'
  320 | using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
      |                        ~~~~~~~~~~~~~~^~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:320:47: error: expected ';' after alias declaration
  320 | using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
      |                                               ^
      |                                               ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:322:39: error: no type named 'make_unsigned' in namespace 'std'
  322 | using make_unsigned_t = typename std::make_unsigned<T>::type;
      |                         ~~~~~~~~~~~~~~^~~~~~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:322:52: error: expected ';' after alias declaration
  322 | using make_unsigned_t = typename std::make_unsigned<T>::type;
      |                                                    ^
      |                                                    ;
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:324:36: error: no type named 'underlying_type' in namespace 'std'
  324 | using underlying_t = typename std::underlying_type<T>::type;
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include/fmt/base.h:324:51: error: expected ';' after alias declaration
  324 | using underlying_t = typename std::underlying_type<T>::type;
      |                                                   ^
      |                                                   ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[11/16] Linking CXX static library lib__cmake_cxx23.a
ninja: build stopped: subcommand failed.
make: *** [all] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant