https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98452
Bug ID: 98452 Summary: error: unknown Compiled Module Interface: no such module Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: patrick.kox at commandoregel dot be Target Milestone: --- When following an article by Mr. Sidwell (link: https://accu.org/journals/overload/28/159/sidwell/#FN02) I did a copy & paste of his example 2 sourcecode (a simple hello world progam). When I just try to compile the hello.cc sourcefile there is an error message (as expected): hello.cc:5:8: error: unknown Compiled Module Interface: no such module 5 | export import <string_view>; | ^~~~~~ In module imported at hello.cc:5:8: /opt/gcc-11/include/c++/11.0.0/string_view: error: failed to read compiled module: Unknown CMI mapping /opt/gcc-11/include/c++/11.0.0/string_view: note: imports must be built before being imported /opt/gcc-11/include/c++/11.0.0/string_view: fatal error: returning to the gate for a mechanical issue compilation terminated. To solve this he provides a compiler command to process string_view so it can be used in this example: The command for that is: g++ -fmodules-ts -std=c++20 -c -x c++-system-header string_view This works and creates a file string_view.gcm in a subdirectory of the gcm.cache directory. But when I try to compile hello.cc with the command that should follow this processing of string_view the compiler prints out a lot of error messages: hello.cc:5:8: error: unknown Compiled Module Interface: no such module 5 | export import <string_view>; | ^~~~~~ In module imported at hello.cc:5:8: /opt/gcc-11/include/c++/11.0.0/string_view: error: failed to read compiled module: Unknown CMI mapping /opt/gcc-11/include/c++/11.0.0/string_view: note: imports must be built before being imported /opt/gcc-11/include/c++/11.0.0/string_view: fatal error: returning to the gate for a mechanical issue compilation terminated. patrick @ XPS8940 ➜ Example_02 $ g++ -fmodules-ts -std=c++20 -c -x c++-system-header string_view patrick @ XPS8940 ➜ Example_02 $ g++ -fmodules-ts -Wall -std=c++20 hello.cc -x -c In file included from /opt/gcc-11/include/c++/11.0.0/bits/move.h:57, from /opt/gcc-11/include/c++/11.0.0/bits/stl_pair.h:59, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:64, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/type_traits:634:31: error: conflicting global module declaration ‘template<class ...> using __void_t = void’ 634 | template<typename...> using __void_t = void; | ^~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/move.h:57, from /opt/gcc-11/include/c++/11.0.0/bits/nested_exception.h:40, from /opt/gcc-11/include/c++/11.0.0/exception:148, from /opt/gcc-11/include/c++/11.0.0/ios:39, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/type_traits:634:31: note: existing declaration ‘template<class ...> using __void_t = void’ 634 | template<typename...> using __void_t = void; | ^~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:94:26: note: during load of binding ‘__gnu_cxx::__normal_iterator’ 94 | typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; | ^~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error: conflicting global module declaration ‘template<class _Tp> using iter_reference_t = decltype (* declval<_Tp&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing declaration ‘template<class _Tp> requires __dereferenceable<_Tp> using iter_reference_t = decltype (* declval<_Tp&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error: conflicting global module declaration ‘using iter_reference_t = decltype (* declval<_Tp&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing declaration ‘using iter_reference_t = decltype (* declval<_Tp&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error: conflicting global module declaration ‘template<class _Tp> using __type = typename std::ranges::__cust_imove::_IMove::__result::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing declaration ‘template<class _Tp> requires __dereferenceable<_Tp> using __type = typename std::ranges::__cust_imove::_IMove::__result::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error: conflicting global module declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<_Tp>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<_Tp>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error: conflicting global module declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<_Tp&>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<_Tp&>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error: conflicting global module declaration ‘template<class _Tp> using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing declaration ‘template<class _Tp> requires (__dereferenceable<_Tp>) && (__can_reference<typename std::ranges::__cust_imove::_IMove::__result<_Tp&>::type>) using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error: conflicting global module declaration ‘using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing declaration ‘using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<_Tp&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error: conflicting global module declaration ‘using iter_reference_t = decltype (* declval<const _In&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing declaration ‘using iter_reference_t = decltype (* declval<const _In&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: error: conflicting global module declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<const _In&>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:120:17: note: existing declaration ‘using __type = typename std::ranges::__cust_imove::_IMove::__result<const _In&>::type’ 120 | using __type = typename __result<_Tp>::type; | ^~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: error: conflicting global module declaration ‘using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<const _In&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:146:11: note: existing declaration ‘using iter_rvalue_reference_t = std::ranges::__cust_imove::_IMove::__type<const _In&>’ 146 | using iter_rvalue_reference_t | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error: conflicting global module declaration ‘using iter_reference_t = decltype (* declval<_Iter&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing declaration ‘using iter_reference_t = decltype (* declval<_Iter&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:97:20: note: during load of binding ‘std::reverse_iterator’ 97 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/string_view:41, of module /opt/gcc-11/include/c++/11.0.0/string_view, imported at /opt/gcc-11/include/c++/11.0.0/bits/basic_string.h:48, included from /opt/gcc-11/include/c++/11.0.0/string:55, from /opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40, from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h: In member function ‘constexpr auto std::compare_three_way::operator()(_Tp&&, _Up&&) const’: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: error: conflicting global module declaration ‘using iter_reference_t = decltype (* declval<_I2&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/stl_iterator_base_types.h:71, from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:65, from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39, from /opt/gcc-11/include/c++/11.0.0/ios:40, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/bits/iterator_concepts.h:76:11: note: existing declaration ‘using iter_reference_t = decltype (* declval<_I2&>())’ 76 | using iter_reference_t = decltype(*std::declval<_Tp&>()); | ^~~~~~~~~~~~~~~~ In file included from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:46, from /opt/gcc-11/include/c++/11.0.0/ios:42, from /opt/gcc-11/include/c++/11.0.0/ostream:38, from /opt/gcc-11/include/c++/11.0.0/iostream:39, from hello.cc:3: /opt/gcc-11/include/c++/11.0.0/system_error:142:51: note: during load of specializations keyed to ‘template<class ... _Tp> struct std::common_reference’ 142 | { return std::compare_three_way()(this, &__rhs); } | ^ hello.cc: At global scope: hello.cc:4:8: warning: not writing module ‘Hello’ due to errors 4 | export module Hello; | ^~~~~~