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

Build failure on Android build, even with NDK r24 containing clang-14 #1431

Closed
MBilderbeek opened this issue Jun 25, 2022 · 2 comments
Closed

Comments

@MBilderbeek
Copy link
Member

The build fails, when building locally with NDK r24 as follows:

Build configuration:
  Platform: arm-android
  Flavour:  opt
Creating derived/arm-android-opt-3rd/config/components.hh...
  Compiler: armv7a-linux-androideabi19-clang++
  Subset:   full build
Creating derived/arm-android-opt-3rd/config/build-info.hh...
Creating derived/arm-android-opt-3rd/config/Version.ii...
Compiling Autofire.cc...
Compiling CLIOption.cc...
Compiling CartridgeSlotManager.cc...
Compiling ChakkariCopy.cc...
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:4:
In file included from src/serialize_core.hh:5:
In file included from src/serialize_meta.hh:4:
In file included from src/utils/hash_map.hh:9:
In file included from src/utils/hash_set.hh:9:
src/utils/stl.hh:62:60: error: no type named 'identity' in namespace 'std'
template<typename ITER, typename VAL, typename Proj = std::identity>
                                                      ~~~~~^
src/utils/stl.hh:68:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:99:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:195:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:206:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:214:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:225:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:235:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hhIn file included from :src/Autofire.cc4::
1In file included from :
src/MSXDevice.hhIn file included from :src/Autofire.hh5::
5In file included from :
src/EmuTime.hhIn file included from :src/DynamicClock.hh4::
4In file included from :
src/EmuDuration.hhIn file included from :src/EmuTime.hh4::
4In file included from :
src/serialize.hhIn file included from :src/EmuDuration.hh4::
4In file included from :
src/serialize_core.hhIn file included from :src/serialize.hh5::
4In file included from :
src/serialize_meta.hhIn file included from :src/serialize_core.hh4::
5In file included from :
src/utils/hash_map.hhIn file included from :src/serialize_meta.hh9::
4In file included from :
src/utils/hash_set.hhIn file included from :src/utils/hash_map.hh9::
9src/utils/stl.hh:
:In file included from 62src/utils/hash_set.hh::6011::
 src/utils/xrange.hherror: :no type named 'identity' in namespace 'std'121
:27: error: cannot default 'operator<=>' because type 'std::strong_ordering' was not found; include <compare>
template<typename ITER, typename VAL, typename Proj = std::identity>
                                                      ~~~~~^                [[nodiscard]] constexpr auto operator<=>(const Iter&) const = default;

                                        ^
src/utils/xrange.hh:126:54: note: in instantiation of member class 'XRange<unsigned int>::Iter' requested here
        [[nodiscard]] constexpr auto begin() const { return Iter{b}; }
                                                            ^
src/utils/hash_set.hh:205:18: note: in instantiation of member function 'XRange<unsigned int>::begin' requested here
                        for (size_t i : xrange(capacity_)) {
                                      ^
src/utils/stl.hh:68:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:99:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:195:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:206:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:214:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:225:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:235:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:4:
In file included from src/serialize_core.hh:5:
In file included from src/serialize_meta.hh:4:
In file included from src/utils/hash_map.hh:9:
In file included from src/utils/hash_set.hh:11:
src/utils/xrange.hh:121:27: error: cannot default 'operator<=>' because type 'std::strong_ordering' was not found; include <compare>
                [[nodiscard]] constexpr auto operator<=>(const Iter&) const = default;
                                        ^
src/utils/xrange.hh:126:54: note: in instantiation of member class 'XRange<unsigned int>::Iter' requested here
        [[nodiscard]] constexpr auto begin() const { return Iter{b}; }
                                                            ^
src/utils/hash_set.hh:205:18: note: in instantiation of member function 'XRange<unsigned int>::begin' requested here
                        for (size_t i : xrange(capacity_)) {
                                      ^
In file included from src/CLIOption.cc:2:
In file included from src/MSXException.hh:4:
In file included from src/utils/strCat.hh:4:
src/utils/TemporaryString.hh:29:34: error: no template named 'invocable' in namespace 'std'
        TemporaryString(size_t n_, std::invocable<char*> auto fillOp)
                                   ~~~~~^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:23:81: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                ^~~~~~~~~~~~~
                                                                                hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:98:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/CLIOption.cc:2:
In file included from src/MSXException.hh:4:
src/utils/strCat.hh:259:15: error: no type named 'unsigned_integral' in namespace 'std'
template<std::unsigned_integral T>
         ~~~~~^
src/utils/strCat.hh:260:28: error: template argument for template type parameter must be a type
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return t; }
                           ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:107:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
src/utils/strCat.hh:260:41: error: unknown type name 'T'
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return t; }
                                        ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:23:81: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                ^~~~~~~~~~~~~
                                                                                hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:121:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
src/utils/strCat.hh:262:15: error: no type named 'signed_integral' in namespace 'std'
template<std::signed_integral T>
         ~~~~~^
src/utils/strCat.hh:263:28: error: template argument for template type parameter must be a type
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return (t < 0)? -t : t; }
                           ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:98:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
src/utils/strCat.hh:263:41: error: unknown type name 'T'
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return (t < 0)? -t : t; }
                                        ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:107:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
src/utils/strCat.hh:274:15: error: no type named 'integral' in namespace 'std'
template<std::integral T> struct ConcatIntegral
         ~~~~~^
src/utils/strCat.hh:276:56: error: template argument for template type parameter must be a type
        static constexpr bool IS_SIGNED = std::numeric_limits<T>::is_signed;
                                                              ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/limits:442:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/CLIOption.cc:2:
In file included from src/MSXException.hh:4:
src/utils/strCat.hh:276:24: error: default initialization of an object of const type 'const bool'
        static constexpr bool IS_SIGNED = std::numeric_limits<T>::is_signed;
                              ^
                                        = false
src/utils/strCat.hh:277:61: error: template argument for template type parameter must be a type
        static constexpr size_t BUF_SIZE = 1 + std::numeric_limits<T>::digits10 + IS_SIGNED;
                                                                   ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/limits:442:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/CLIOption.cc:2:
In file included from src/MSXException.hh:4:
src/utils/strCat.hh:277:26: error: default initialization of an object of const type 'const size_t' (aka 'const unsigned int')
        static constexpr size_t BUF_SIZE = 1 + std::numeric_limits<T>::digits10 + IS_SIGNED;
                                ^
                                         = 0
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
src/utils/IterableBitSet.hh:116:26: error: no template named 'invocable' in namespace 'std'
        void foreachSetBit(std::invocable<size_t> auto op) const
                           ~~~~~^
src/utils/strCat.hh:279:17: error: unknown type name 'T'
        ConcatIntegral(T t)
                       ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:121:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
src/utils/strCat.hh:282:8: error: no type named 'unsigned_integral' in namespace 'std'
                std::unsigned_integral auto a = absHelper(t);
                ~~~~~^
src/utils/strCat.hh:331:25: error: no type named 'integral' in namespace 'std'
template<size_t N, std::integral T> struct ConcatFixedWidthHexIntegral
                   ~~~~~^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
src/utils/IterableBitSet.hh:116:26: error: no template named 'invocable' in namespace 'std'
        void foreachSetBit(std::invocable<size_t> auto op) const
                           ~~~~~^
src/utils/strCat.hh:333:30: error: unknown type name 'T'
        ConcatFixedWidthHexIntegral(T t_)
                                    ^
src/utils/strCat.hh:359:2: error: unknown type name 'T'
        T t;
        ^
src/utils/strCat.hh:346:37: error: template argument for template type parameter must be a type
                auto u = static_cast<FastUnsigned<T>>(t);
                                                  ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
src/utils/strCat.hh:425:24: error: template argument for non-type template parameter must be an expression
        return ConcatIntegral<signed char>(c);
                              ^~~~~~~~~~~
src/utils/strCat.hh:274:24: note: template parameter is declared here
template<std::integral T> struct ConcatIntegral
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/CartridgeSlotManager.cc:1:
In file included from src/CartridgeSlotManager.hh:4:
In file included from src/input/RecordedCommand.hh:4:
In file included from src/commands/Command.hh:5:
In file included from src/utils/strCat.hh:4:
src/utils/TemporaryString.hh:29:34: error: no template named 'invocable' in namespace 'std'
        TemporaryString(size_t n_, std::invocable<char*> auto fillOp)
                                   ~~~~~^
20 errors generated.
make[1]: *** [build/main.mk:497: derived/arm-android-opt-3rd/obj/CLIOption.cc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from src/CartridgeSlotManager.cc:1:
In file included from src/CartridgeSlotManager.hh:4:
In file included from src/input/RecordedCommand.hh:4:
In file included from src/commands/Command.hh:5:
src/utils/strCat.hh:259:15: error: no type named 'unsigned_integral' in namespace 'std'
template<std::unsigned_integral T>
         ~~~~~^
src/utils/strCat.hh:260:28: error: template argument for template type parameter must be a type
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return t; }
                           ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
src/utils/strCat.hh:260:41: error: unknown type name 'T'
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return t; }
                                        ^
src/utils/strCat.hh:262:15: error: no type named 'signed_integral' in namespace 'std'
template<std::signed_integral T>
         ~~~~~^
src/utils/strCat.hh:263:28: error: template argument for template type parameter must be a type
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return (t < 0)? -t : t; }
                           ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
src/utils/strCat.hh:263:41: error: unknown type name 'T'
[[nodiscard]] FastUnsigned<T> absHelper(T t) { return (t < 0)? -t : t; }
                                        ^
src/utils/strCat.hh:274:15: error: no type named 'integral' in namespace 'std'
template<std::integral T> struct ConcatIntegral
         ~~~~~^
src/utils/strCat.hh:276:56: error: template argument for template type parameter must be a type
        static constexpr bool IS_SIGNED = std::numeric_limits<T>::is_signed;
                                                              ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/limits:442:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/CartridgeSlotManager.cc:1:
In file included from src/CartridgeSlotManager.hh:4:
In file included from src/input/RecordedCommand.hh:4:
In file included from src/commands/Command.hh:5:
src/utils/strCat.hh:276:24: error: default initialization of an object of const type 'const bool'
        static constexpr bool IS_SIGNED = std::numeric_limits<T>::is_signed;
                              ^
                                        = false
src/utils/strCat.hh:277:61: error: template argument for template type parameter must be a type
        static constexpr size_t BUF_SIZE = 1 + std::numeric_limits<T>::digits10 + IS_SIGNED;
                                                                   ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/limits:442:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/CartridgeSlotManager.cc:1:
In file included from src/CartridgeSlotManager.hh:4:
In file included from src/input/RecordedCommand.hh:4:
In file included from src/commands/Command.hh:5:
src/utils/strCat.hh:277:26: error: default initialization of an object of const type 'const size_t' (aka 'const unsigned int')
        static constexpr size_t BUF_SIZE = 1 + std::numeric_limits<T>::digits10 + IS_SIGNED;
                                ^
                                         = 0
src/utils/strCat.hh:279:17: error: unknown type name 'T'
        ConcatIntegral(T t)
                       ^
src/utils/strCat.hh:282:8: error: no type named 'unsigned_integral' in namespace 'std'
                std::unsigned_integral auto a = absHelper(t);
                ~~~~~^
src/utils/strCat.hh:331:25: error: no type named 'integral' in namespace 'std'
template<size_t N, std::integral T> struct ConcatFixedWidthHexIntegral
                   ~~~~~^
src/utils/strCat.hh:333:30: error: unknown type name 'T'
        ConcatFixedWidthHexIntegral(T t_)
                                    ^
src/utils/strCat.hh:359:2: error: unknown type name 'T'
        T t;
        ^
src/utils/strCat.hh:346:37: error: template argument for template type parameter must be a type
                auto u = static_cast<FastUnsigned<T>>(t);
                                                  ^
src/utils/strCat.hh:255:19: note: template parameter is declared here
template<typename T> using FastUnsigned = typename FastUnsignedImpl<T>::type;
                  ^
src/utils/strCat.hh:425:24: error: template argument for non-type template parameter must be an expression
        return ConcatIntegral<signed char>(c);
                              ^~~~~~~~~~~
src/utils/strCat.hh:274:24: note: template parameter is declared here
template<std::integral T> struct ConcatIntegral
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:43:16: error: no type named 'integral' in namespace 'std'
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                 ~~~~~^
src/utils/StringOp.hh:43:56: error: template argument for template type parameter must be a type
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                                                              ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:48:26: error: no type named 'integral' in namespace 'std'
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                           ~~~~~^
src/utils/StringOp.hh:48:66: error: template argument for template type parameter must be a type
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                                                                        ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:43:16: error: no type named 'integral' in namespace 'std'
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                 ~~~~~^
src/utils/StringOp.hh:43:56: error: template argument for template type parameter must be a type
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                                                              ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:122:22: error: no member named 'forward_iterator' in namespace 'std'
                static_assert(std::forward_iterator<Iterator>);
                              ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:48:26: error: no type named 'integral' in namespace 'std'
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                           ~~~~~^
src/utils/StringOp.hh:48:66: error: template argument for template type parameter must be a type
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                                                                        ^
/usr/lib/android-ndk/./toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/ChakkariCopy.cc:1:
In file included from src/ChakkariCopy.hh:4:
In file included from src/MSXDevice.hh:5:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:122:22: error: no member named 'forward_iterator' in namespace 'std'
                static_assert(std::forward_iterator<Iterator>);
                              ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
20 errors generated.
make[1]: *** [build/main.mk:497: derived/arm-android-opt-3rd/obj/ChakkariCopy.cc.o] Error 1
make[1]: *** [build/main.mk:497: derived/arm-android-opt-3rd/obj/CartridgeSlotManager.cc.o] Error 1
20 errors generated.
make[1]: *** [build/main.mk:497: derived/arm-android-opt-3rd/obj/Autofire.cc.o] Error 1
make[1]: Leaving directory '/home/manuel/git/openmsx.git'
make: *** [build/main.mk:651: staticbindist] Error 2

real	1m43,699s
user	3m35,790s
sys	0m51,046s
MBilderbeek added a commit that referenced this issue Jun 25, 2022
Because it fails, for reasons that we don't understand. See issue #1431.
@MBilderbeek
Copy link
Member Author

On the GitHub Actions build, using the exact same NDK, it also fails, but a bit differently here and there:

Build configuration:
  Platform: arm-android
  Flavour:  opt
  Compiler: armv7a-linux-androideabi19-clang++
  Subset:   full build
Creating derived/arm-android-opt-3rd/config/Version.ii...
Creating derived/arm-android-opt-3rd/config/build-info.hh...
Creating derived/arm-android-opt-3rd/config/components.hh...
Compiling Autofire.cc...
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:4:
In file included from src/serialize_core.hh:5:
In file included from src/serialize_meta.hh:4:
In file included from src/utils/hash_map.hh:9:
In file included from src/utils/hash_set.hh:9:
src/utils/stl.hh:62:60: error: no type named 'identity' in namespace 'std'
template<typename ITER, typename VAL, typename Proj = std::identity>
                                                      ~~~~~^
src/utils/stl.hh:68:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:99:61: error: no type named 'identity' in namespace 'std'
template<typename RANGE, typename VAL, typename Proj = std::identity>
                                                       ~~~~~^
src/utils/stl.hh:195:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:206:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:214:55: error: no type named 'identity' in namespace 'std'
template<typename InputIterator, typename Proj = std::identity>
                                                 ~~~~~^
src/utils/stl.hh:225:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
src/utils/stl.hh:235:52: error: no type named 'identity' in namespace 'std'
template<typename InputRange, typename Proj = std::identity>
                                              ~~~~~^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:4:
In file included from src/serialize_core.hh:5:
In file included from src/serialize_meta.hh:4:
In file included from src/utils/hash_map.hh:9:
In file included from src/utils/hash_set.hh:11:
src/utils/xrange.hh:121:27: error: cannot default 'operator<=>' because type 'std::strong_ordering' was not found; include <compare>
                [[nodiscard]] constexpr auto operator<=>(const Iter&) const = default;
                                        ^
src/utils/xrange.hh:126:54: note: in instantiation of member class 'XRange<unsigned int>::Iter' requested here
        [[nodiscard]] constexpr auto begin() const { return Iter{b}; }
                                                            ^
src/utils/hash_set.hh:205:18: note: in instantiation of member function 'XRange<unsigned int>::begin' requested here
                        for (size_t i : xrange(capacity_)) {
                                      ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:23:81: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                ^~~~~~~~~~~~~
                                                                                hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:98:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:107:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
In file included from src/utils/IterableBitSet.hh:4:
src/utils/ranges.hh:121:93: error: no type named 'identity' in namespace 'std'; did you mean 'hash_set_impl::Identity'?
template<typename ForwardRange, typename T, typename Compare = std::less<>, typename Proj = std::identity>
                                                                                            ^~~~~~~~~~~~~
                                                                                            hash_set_impl::Identity
src/utils/hash_set.hh:25:8: note: 'hash_set_impl::Identity' declared here
struct Identity {
       ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
In file included from src/utils/StringOp.hh:4:
src/utils/IterableBitSet.hh:116:26: error: no template named 'invocable' in namespace 'std'
        void foreachSetBit(std::invocable<size_t> auto op) const
                           ~~~~~^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:43:16: error: no type named 'integral' in namespace 'std'
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                 ~~~~~^
src/utils/StringOp.hh:43:56: error: template argument for template type parameter must be a type
        template<std::integral T> [[nodiscard]] std::optional<T> stringTo(std::string_view s);
                                                              ^
/usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:48:26: error: no type named 'integral' in namespace 'std'
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                           ~~~~~^
src/utils/StringOp.hh:48:66: error: template argument for template type parameter must be a type
        template<int BASE, std::integral T> [[nodiscard]] std::optional<T> stringToBase(std::string_view s);
                                                                        ^
/usr/local/lib/android/sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/c++/v1/optional:583:17: note: template parameter is declared here
template <class _Tp>
                ^
In file included from src/Autofire.cc:1:
In file included from src/Autofire.hh:5:
In file included from src/DynamicClock.hh:4:
In file included from src/EmuTime.hh:4:
In file included from src/EmuDuration.hh:4:
In file included from src/serialize.hh:6:
src/utils/StringOp.hh:122:22: error: no member named 'forward_iterator' in namespace 'std'
                static_assert(std::forward_iterator<Iterator>);
                              ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [build/main.mk:500: derived/arm-android-opt-3rd/obj/Autofire.cc.o] Error 1
make[1]: Leaving directory '/home/runner/work/openMSX/openMSX'
make: *** [build/main.mk:651: staticbindist] Error 2
Error: Process completed with exit code 2.

@MBilderbeek
Copy link
Member Author

This is not an openMSX issue, but an issue of the NDK. Should be fixed with r26 according to android/ndk/issues/1530 - nothing we can do until that's released, so closing this for now.

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