Fix Dockerfile.android build failure

This commit is contained in:
Tatsuhiro Tsujikawa
2024-06-27 18:35:49 +09:00
parent ca345ff750
commit 7c09767d2d
3 changed files with 9 additions and 9 deletions

View File

@@ -15,7 +15,7 @@
FROM ubuntu:22.04
MAINTAINER Tatsuhiro Tsujikawa
ENV NDK_VERSION r25b
ENV NDK_VERSION r26d
ENV NDK /root/android-ndk-$NDK_VERSION
ENV TOOLCHAIN $NDK/toolchains/llvm/prebuilt/linux-x86_64
ENV TARGET aarch64-linux-android
@@ -42,9 +42,9 @@ RUN curl -L -O https://dl.google.com/android/repository/android-ndk-$NDK_VERSION
rm android-ndk-$NDK_VERSION-linux.zip
# Setup version of libraries
ENV OPENSSL_VERSION 1.1.1q
ENV OPENSSL_VERSION 1.1.1w
ENV LIBEV_VERSION 4.33
ENV ZLIB_VERSION 1.2.13
ENV ZLIB_VERSION 1.3.1
ENV CARES_VERSION 1.18.1
ENV NGHTTP2_VERSION master
@@ -76,7 +76,7 @@ RUN ./configure \
make install
WORKDIR /root/build
RUN curl -L -O https://zlib.net/zlib-$ZLIB_VERSION.tar.gz && \
RUN curl -L -O https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz && \
tar xf zlib-$ZLIB_VERSION.tar.gz && \
rm zlib-$ZLIB_VERSION.tar.gz
@@ -91,7 +91,7 @@ RUN HOST=$TARGET \
WORKDIR /root/build
RUN curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz && \
RUN curl -L -O https://github.com/c-ares/c-ares/releases/download/cares-1_18_1/c-ares-$CARES_VERSION.tar.gz && \
tar xf c-ares-$CARES_VERSION.tar.gz && \
rm c-ares-$CARES_VERSION.tar.gz

View File

@@ -338,7 +338,7 @@ case "$host_os" in
*android*)
android_build=yes
# android does not need -pthread, but needs following 2 libs for C++
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic"
APPLDFLAGS="$APPLDFLAGS -latomic"
;;
*)
PTHREAD_LDFLAGS="-pthread"

View File

@@ -444,19 +444,19 @@ inline constexpr bool operator==(const StringRef &lhs,
std::equal(std::begin(lhs), std::end(lhs), std::begin(rhs));
}
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(_LIBCPP_VERSION)
inline constexpr std::strong_ordering
operator<=>(const StringRef &lhs, const StringRef &rhs) noexcept {
return std::lexicographical_compare_three_way(std::begin(lhs), std::end(lhs),
std::begin(rhs), std::end(rhs));
}
#else // __APPLE__
#else // __APPLE__ || _LIBCPP_VERSION
inline constexpr bool operator<(const StringRef &lhs,
const StringRef &rhs) noexcept {
return std::lexicographical_compare(std::begin(lhs), std::end(lhs),
std::begin(rhs), std::end(rhs));
}
#endif // __APPLE__
#endif // __APPLE__ || _LIBCPP_VERSION
inline std::ostream &operator<<(std::ostream &o, const StringRef &s) {
return o.write(s.data(), s.size());