osfans / trime

同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
http://osfans.github.io/trime/
GNU General Public License v3.0
3.09k stars 372 forks source link

运行cmake报错: [CXX1429] error when building with cmake using #1130

Closed amelons closed 10 months ago

amelons commented 10 months ago

运行cmake报错: [CXX1429] error when building with cmake using /Users/amelon/Desktop/trime/app/src/main/jni/CMakeLists.txt: -- The C compiler identification is Clang 14.0.7 -- The CXX compiler identification is Clang 14.0.7 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Users/amelon/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/amelon/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Downloading Boost 1.83.0 ...... -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE
-- Looking for C++ include unwind.h -- Looking for C++ include unwind.h - found -- Looking for _Unwind_Backtrace -- Looking for _Unwind_Backtrace - found -- Looking for C++ include dlfcn.h -- Looking for C++ include dlfcn.h - found -- Looking for C++ include execinfo.h -- Looking for C++ include execinfo.h - found -- Looking for C++ include glob.h -- Looking for C++ include glob.h - found -- Looking for C++ include inttypes.h -- Looking for C++ include inttypes.h - found -- Looking for C++ include memory.h -- Looking for C++ include memory.h - found -- Looking for C++ include pwd.h -- Looking for C++ include pwd.h - found -- Looking for C++ include stdint.h -- Looking for C++ include stdint.h - found -- Looking for C++ include strings.h -- Looking for C++ include strings.h - found -- Looking for C++ include sys/stat.h -- Looking for C++ include sys/stat.h - found -- Looking for C++ include sys/syscall.h -- Looking for C++ include sys/syscall.h - found -- Looking for C++ include sys/time.h -- Looking for C++ include sys/time.h - found -- Looking for C++ include sys/types.h -- Looking for C++ include sys/types.h - found -- Looking for C++ include sys/utsname.h -- Looking for C++ include sys/utsname.h - found -- Looking for C++ include sys/wait.h -- Looking for C++ include sys/wait.h - found -- Looking for C++ include syscall.h -- Looking for C++ include syscall.h - found -- Looking for C++ include syslog.h -- Looking for C++ include syslog.h - found -- Looking for C++ include ucontext.h -- Looking for C++ include ucontext.h - found -- Looking for C++ include unistd.h -- Looking for C++ include unistd.h - found -- Looking for C++ include ext/hash_map -- Looking for C++ include ext/hash_map - found -- Looking for C++ include ext/hash_set -- Looking for C++ include ext/hash_set - found -- Looking for C++ include ext/slist -- Looking for C++ include ext/slist - not found -- Looking for C++ include tr1/unordered_map -- Looking for C++ include tr1/unordered_map - not found -- Looking for C++ include tr1/unordered_set -- Looking for C++ include tr1/unordered_set - not found -- Looking for C++ include unordered_map -- Looking for C++ include unordered_map - found -- Looking for C++ include unordered_set -- Looking for C++ include unordered_set - found -- Looking for C++ include stddef.h -- Looking for C++ include stddef.h - found -- Check size of unsigned int16 -- Check size of unsigned int16 - failed -- Check size of u_int16_t -- Check size of u_int16_t - done -- Check size of uint16_t -- Check size of uint16_t - done -- Looking for dladdr -- Looking for dladdr - found -- Looking for fcntl -- Looking for fcntl - found -- Looking for pread -- Looking for pread - found -- Looking for pwrite -- Looking for pwrite - found -- Looking for sigaction -- Looking for sigaction - found -- Looking for sigaltstack -- Looking for sigaltstack - found -- Performing Test HAVE_NO_DEPRECATED -- Performing Test HAVE_NO_DEPRECATED - Success -- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS -- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS - Success -- Looking for pthread_threadid_np -- Looking for pthread_threadid_np - not found -- Looking for snprintf -- Looking for snprintf - found -- Looking for UnDecorateSymbolName in dbghelp -- Looking for UnDecorateSymbolName in dbghelp - not found -- Performing Test HAVE_ATTRIBUTE_ -- Performing Test HAVEATTRIBUTE - Success -- Performing Test HAVE_ATTRIBUTEVISIBILITY_DEFAULT -- Performing Test HAVE_ATTRIBUTEVISIBILITY_DEFAULT - Success -- Performing Test HAVE_ATTRIBUTEVISIBILITY_HIDDEN -- Performing Test HAVE_ATTRIBUTEVISIBILITY_HIDDEN - Success -- Performing Test HAVE_BUILTINEXPECT -- Performing Test HAVEBUILTIN_EXPECT - Success -- Performing Test HAVE___SYNC_VAL_COMPARE_ANDSWAP -- Performing Test HAVESYNC_VAL_COMPARE_AND_SWAP - Success -- Performing Test HAVE_RWLOCK -- Performing Test HAVE_RWLOCK - Success -- Performing Test HAVEDECLSPEC -- Performing Test HAVEDECLSPEC - Failed -- Performing Test STL_NO_NAMESPACE -- Performing Test STL_NO_NAMESPACE - Failed -- Performing Test STL_STD_NAMESPACE -- Performing Test STL_STD_NAMESPACE - Success -- Performing Test HAVE_USING_OPERATOR -- Performing Test HAVE_USING_OPERATOR - Success -- Performing Test HAVE_NAMESPACES -- Performing Test HAVE_NAMESPACES - Success -- Performing Test HAVE_GCC_TLS -- Performing Test HAVE_GCC_TLS - Success -- Performing Test HAVE_MSVC_TLS -- Performing Test HAVE_MSVC_TLS - Failed -- Performing Test HAVE_CXX11_TLS -- Performing Test HAVE_CXX11_TLS - Success -- Performing Test HAVE_ALIGNED_STORAGE -- Performing Test HAVE_ALIGNED_STORAGE - Success -- Performing Test HAVE_CXX11_ATOMIC -- Performing Test HAVE_CXX11_ATOMIC - Success -- Performing Test HAVE_CXX11_CONSTEXPR -- Performing Test HAVE_CXX11_CONSTEXPR - Success -- Performing Test HAVE_CXX11_CHRONO -- Performing Test HAVE_CXX11_CHRONO - Success -- Performing Test HAVE_CXX11_NULLPTR_T -- Performing Test HAVE_CXX11_NULLPTR_T - Success -- Performing Test HAVE_LOCALTIME_R -- Performing Test HAVE_LOCALTIME_R - Success -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Looking for sys/mman.h -- Looking for sys/mman.h - found -- Looking for sys/resource.h -- Looking for sys/resource.h - found -- Looking for sys/uio.h -- Looking for sys/uio.h - found -- Looking for windows.h -- Looking for windows.h - not found -- Looking for zlibVersion in z -- Looking for zlibVersion in z - found -- Looking for lzo1x_1_15_compress in lzo2 -- Looking for lzo1x_1_15_compress in lzo2 - not found -- Looking for LZ4_compress_default in lz4 -- Looking for LZ4_compress_default in lz4 - not found -- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX -- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX - Failed -- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 -- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 - Failed -- Performing Test HAVE_CLANG_MAVX -- Performing Test HAVE_CLANG_MAVX - Success -- Performing Test HAVE_CLANG_MBMI2 -- Performing Test HAVE_CLANG_MBMI2 - Success -- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS -- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS - Success -- Performing Test HAVE_BUILTIN_EXPECT -- Performing Test HAVE_BUILTIN_EXPECT - Success -- Performing Test HAVE_BUILTIN_CTZ -- Performing Test HAVE_BUILTIN_CTZ - Success -- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE -- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE - Success -- Performing Test SNAPPY_HAVE_SSSE3 -- Performing Test SNAPPY_HAVE_SSSE3 - Success -- Performing Test SNAPPY_HAVE_BMI2 -- Performing Test SNAPPY_HAVE_BMI2 - Failed -- Looking for mmap -- Looking for mmap - found -- Looking for sysconf -- Looking for sysconf - found -- Looking for crc32c_value in crc32c -- Looking for crc32c_value in crc32c - not found -- Looking for malloc in tcmalloc -- Looking for malloc in tcmalloc - not found -- Looking for fdatasync -- Looking for fdatasync - found -- Looking for F_FULLFSYNC -- Looking for F_FULLFSYNC - not found -- Looking for O_CLOEXEC -- Looking for O_CLOEXEC - found -- Performing Test HAVE_CLANG_THREAD_SAFETY -- Performing Test HAVE_CLANG_THREAD_SAFETY - Success -- Performing Test LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS -- Performing Test LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS - Success -- Performing Test HAVE_CXX17_HAS_INCLUDE -- Performing Test HAVE_CXX17_HAS_INCLUDE - Success -- libmarisa found: marisa -- Found PythonInterp: /usr/bin/python (found version "2.7.18") /Users/amelon/Desktop/trime/app/src/main/jni/librime/plugins/librime-lua/thirdparty -> /Users/amelon/Desktop/trime/app/src/main/jni/librime-lua-deps -- Found X11/keysym.h at /Users/amelon/Desktop/trime/app/src/main/jni/librime/include -- Found plugin: /Users/amelon/Desktop/trime/app/src/main/jni/librime/plugins/librime-charcode -- Found plugin: /Users/amelon/Desktop/trime/app/src/main/jni/librime/plugins/librime-lua -- Found plugin: /Users/amelon/Desktop/trime/app/src/main/jni/librime/plugins/librime-octagram -- Found plugin: /Users/amelon/Desktop/trime/app/src/main/jni/librime/plugins/librime-predict -- Using in-tree lua source -- with multiarch: x86_64-apple-darwin21.1.0 -- rime_plugins_libs: rime-charcode-deps -- rime_plugins_modules: charcode;lua;octagram;predict -- Configuring incomplete, errors occurred! See also "/Users/amelon/Desktop/trime/app/.cxx/Debug/74b3j235/x86/CMakeFiles/CMakeOutput.log". See also "/Users/amelon/Desktop/trime/app/.cxx/Debug/74b3j235/x86/CMakeFiles/CMakeError.log".

C++ build system [configure] failed while executing: /Users/amelon/Library/Android/sdk/cmake/3.22.1/bin/cmake \ -H/Users/amelon/Desktop/trime/app/src/main/jni \ -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_SYSTEM_VERSION=21 \ -DANDROID_PLATFORM=android-21 \ -DANDROID_ABI=x86 \ -DCMAKE_ANDROID_ARCH_ABI=x86 \ -DANDROID_NDK=/Users/amelon/Library/Android/sdk/ndk/25.2.9519653 \ -DCMAKE_ANDROID_NDK=/Users/amelon/Library/Android/sdk/ndk/25.2.9519653 \ -DCMAKE_TOOLCHAIN_FILE=/Users/amelon/Library/Android/sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake \ -DCMAKE_MAKE_PROGRAM=/Users/amelon/Library/Android/sdk/cmake/3.22.1/bin/ninja \ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/amelon/Desktop/trime/app/build/intermediates/cxx/Debug/74b3j235/obj/x86 \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/amelon/Desktop/trime/app/build/intermediates/cxx/Debug/74b3j235/obj/x86 \ -DCMAKE_BUILD_TYPE=Debug \ -B/Users/amelon/Desktop/trime/app/.cxx/Debug/74b3j235/x86 \ -GNinja from /Users/amelon/Desktop/trime/app CMake Error at cmake/Boost.cmake:5 (file): file DOWNLOAD HASH mismatch

for file: [boost-1.83.0.tar.xz]
  expected hash: [c5a0688e1f0c05f354bbd0b32244d36085d9ffc9f932e8a18983a9908096f614]
    actual hash: [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
         status: [28;"Timeout was reached"]

Call Stack (most recent call first): CMakeLists.txt:19 (include)

CMake Error at cmake/Boost.cmake:13 (file): file RENAME failed to rename

/Users/amelon/Desktop/trime/app/src/main/jni/boost-1.83.0

to

/Users/amelon/Desktop/trime/app/src/main/jni/boost

because: No such file or directory

Call Stack (most recent call first): CMakeLists.txt:19 (include)

CMake Error at cmake/Boost.cmake:35 (add_subdirectory): add_subdirectory given source "boost" which is not an existing directory. Call Stack (most recent call first): CMakeLists.txt:19 (include)

Bambooin commented 10 months ago

GitHub time out error due to network issue.

You can download the boost with aria2c or other tool manually instead of CMake.

cd trime/app
aria2c boost.url -x 10