register %rdx is only available in 64-bit mode这个bug网上查不到,怎么办?
PS D:\project\andriod\boost\build_ninja> ninja -f build.ninja
[0/1] Re-running CMake...
CMake Warning at C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
An old version of CMake is being used that cannot automatically detect
compiler attributes. Compiler identification is being bypassed. Some
values may be wrong or missing. Update to CMake 3.19 or newer to use
CMake's built-in compiler identification.
Call Stack (most recent call first):
C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include)
build_ninja/CMakeFiles/3.10.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:13 (project)
-- Boost: using system layout: include, bin, lib, lib/cmake
-- Boost: Debug build, static libraries, MPI OFF, Python OFF, testing OFF
-- Boost installation support requires CMake 3.13 (have 3.10.2)
this is in boost/libs/context/CMakeLists.txt 32 line have a bug for cmake. A=
-- Boost.Context: architecture x86_64, binary format elf, ABI sysv, assembler gas, suffix .S, implementation fcontext
-- Boost.Fiber: NUMA target OS is none
-- Boost.Iostreams: ZLIB ON, BZip2 OFF, LZMA OFF, Zstd OFF
-- Boost.Locale: iconv OFF, ICU OFF, POSIX OFF, std ON, winapi OFF
==================================================================
=我在app/src/main/jni/boost/libs/log/CMakeLists.txt中 449行, boost_log_sources=src/alignment_gap_between.hpp;src/attribute_name.cpp;src/attribute_set_impl.hpp;src/attribute_set.cpp;src/attribute_value_set.cpp;src/bit_tools.hpp;src/code_conversion.cpp;src/stateless_allocator.hpp;src/unique_ptr.hpp;src/core.cpp;src/record_ostream.cpp;src/severity_level.cpp;src/global_logger_storage.cpp;src/named_scope.cpp;src/process_name.cpp;src/process_id.cpp;src/thread_id.cpp;src/id_formatting.hpp;src/murmur3.hpp;src/timer.cpp;src/exceptions.cpp;src/default_attribute_names.cpp;src/default_sink.hpp;src/default_sink.cpp;src/text_ostream_backend.cpp;src/text_file_backend.cpp;src/text_multifile_backend.cpp;src/thread_specific.cpp;src/once_block.cpp;src/timestamp.cpp;src/threadsafe_queue.cpp;src/event.cpp;src/trivial.cpp;src/spirit_encoding.hpp;src/spirit_encoding.cpp;src/format_parser.cpp;src/date_time_format_parser.cpp;src/named_scope_format_parser.cpp;src/permissions.cpp;src/dump.cpp;src/syslog_backend.cpp;src/posix/object_name.cpp;src/posix/ipc_sync_wrappers.hpp;src/posix/ipc_reliable_message_queue.cpp
=我在app/src/main/jni/boost/libs/log/CMakeLists.txt中 449行, boost_log_sources_ssse3=src/dump_ssse3.cpp
=我在app/src/main/jni/boost/libs/log/CMakeLists.txt中 449行, boost_log_sources_avx2=src/dump_avx2.cpp
==================================================================
-I 我在D:/project/andriod/trime-develop/app/src/main/jni/boost/libs/log/CMakeLists.txt中第594行, boost_log_setup_sources = src/setup/parser_utils.hpp;src/setup/parser_utils.cpp;src/setup/init_from_stream.cpp;src/setup/init_from_settings.cpp;src/setup/settings_parser.cpp;src/setup/filter_parser.cpp;src/setup/formatter_parser.cpp;src/setup/default_filter_factory.hpp;src/setup/default_filter_factory.cpp;src/setup/matches_relation_factory.cpp;src/setup/default_formatter_factory.hpp;src/setup/default_formatter_factory.cpp
-- Boost.Math: standalone mode OFF
-- Boost.Stacktrace: noop ON, backtrace OFF, addr2line ON, basic ON, windbg OFF, windbg_cached OFF
-- Boost.Thread: threading API is pthread
-- Configuring done
-- Generating done
-- Build files have been written to: D:/project/andriod/boost/build_ninja
[1/255] Building ASM object libs/context/CMakeFiles/boost_context.dir/src/asm/ontop_x86_64_sysv_elf_gas.S.o
FAILED: libs/context/CMakeFiles/boost_context.dir/src/asm/ontop_x86_64_sysv_elf_gas.S.o
C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe -target i686-none-linux-android21 -gcc-toolchain C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_SOURCE -DBOOST_CONTEXT_STATIC_LINK -I../libs/context/include -I../libs/assert/include -I../libs/config/include -I../libs/core/include -I../libs/static_assert/include -I../libs/throw_exception/include -I../libs/mp11/include -I../libs/pool/include -I../libs/integer/include -I../libs/type_traits/include -I../libs/winapi/include -I../libs/predef/include -I../libs/smart_ptr/include -I../libs/move/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -MD -MT libs/context/CMakeFiles/boost_context.dir/src/asm/ontop_x86_64_sysv_elf_gas.S.o -MF libs\context\CMakeFiles\boost_context.dir\src\asm\ontop_x86_64_sysv_elf_gas.S.o.d -o libs/context/CMakeFiles/boost_context.dir/src/asm/ontop_x86_64_sysv_elf_gas.S.o -c ../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:34:10: error: register %rdx is only available in 64-bit mode
movq %rdx, %r8
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:36:16: error: register %rsp is only available in 64-bit mode
leaq -0x38(%rsp), %rsp
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:39:14: error: register %rsp is only available in 64-bit mode
stmxcsr (%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:40:16: error: register %rsp is only available in 64-bit mode
fnstcw 0x4(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:43:10: error: register %r12 is only available in 64-bit mode
movq %r12, 0x8(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:44:10: error: register %r13 is only available in 64-bit mode
movq %r13, 0x10(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:45:10: error: register %r14 is only available in 64-bit mode
movq %r14, 0x18(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:46:10: error: register %r15 is only available in 64-bit mode
movq %r15, 0x20(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:47:10: error: register %rbx is only available in 64-bit mode
movq %rbx, 0x28(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:48:10: error: register %rbp is only available in 64-bit mode
movq %rbp, 0x30(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:51:10: error: register %rsp is only available in 64-bit mode
movq %rsp, %rax
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:54:10: error: register %rdi is only available in 64-bit mode
movq %rdi, %rsp
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:57:14: error: register %rsp is only available in 64-bit mode
ldmxcsr (%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:58:15: error: register %rsp is only available in 64-bit mode
fldcw 0x4(%rsp)
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:61:14: error: register %rsp is only available in 64-bit mode
movq 0x8(%rsp), %r12
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:62:15: error: register %rsp is only available in 64-bit mode
movq 0x10(%rsp), %r13
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:63:15: error: register %rsp is only available in 64-bit mode
movq 0x18(%rsp), %r14
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:64:15: error: register %rsp is only available in 64-bit mode
movq 0x20(%rsp), %r15
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:65:15: error: register %rsp is only available in 64-bit mode
movq 0x28(%rsp), %rbx
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:66:15: error: register %rsp is only available in 64-bit mode
movq 0x30(%rsp), %rbp
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:68:15: error: register %rsp is only available in 64-bit mode
leaq 0x38(%rsp), %rsp
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:76:15: error: register %rsi is only available in 64-bit mode
salq $32, %rsi
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:77:9: error: register %rsi is only available in 64-bit mode
orq %rsi, %rax
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:85:10: error: register %rax is only available in 64-bit mode
movq %rax, %rdi
^~~~
../libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:90:10: error: register %r8 is only available in 64-bit mode
jmp *%r8
^~~
[2/255] Building ASM object libs/context/CMakeFiles/boost_context.dir/src/asm/jump_x86_64_sysv_elf_gas.S.o
FAILED: libs/context/CMakeFiles/boost_context.dir/src/asm/jump_x86_64_sysv_elf_gas.S.o
C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe -target i686-none-linux-android21 -gcc-toolchain C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_SOURCE -DBOOST_CONTEXT_STATIC_LINK -I../libs/context/include -I../libs/assert/include -I../libs/config/include -I../libs/core/include -I../libs/static_assert/include -I../libs/throw_exception/include -I../libs/mp11/include -I../libs/pool/include -I../libs/integer/include -I../libs/type_traits/include -I../libs/winapi/include -I../libs/predef/include -I../libs/smart_ptr/include -I../libs/move/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -MD -MT libs/context/CMakeFiles/boost_context.dir/src/asm/jump_x86_64_sysv_elf_gas.S.o -MF libs\context\CMakeFiles\boost_context.dir\src\asm\jump_x86_64_sysv_elf_gas.S.o.d -o libs/context/CMakeFiles/boost_context.dir/src/asm/jump_x86_64_sysv_elf_gas.S.o -c ../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:33:16: error: register %rsp is only available in 64-bit mode
leaq -0x38(%rsp), %rsp
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:36:14: error: register %rsp is only available in 64-bit mode
stmxcsr (%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:37:16: error: register %rsp is only available in 64-bit mode
fnstcw 0x4(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:40:10: error: register %r12 is only available in 64-bit mode
movq %r12, 0x8(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:41:10: error: register %r13 is only available in 64-bit mode
movq %r13, 0x10(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:42:10: error: register %r14 is only available in 64-bit mode
movq %r14, 0x18(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:43:10: error: register %r15 is only available in 64-bit mode
movq %r15, 0x20(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:44:10: error: register %rbx is only available in 64-bit mode
movq %rbx, 0x28(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:45:10: error: register %rbp is only available in 64-bit mode
movq %rbp, 0x30(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:48:10: error: register %rsp is only available in 64-bit mode
movq %rsp, %rax
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:51:10: error: register %rdi is only available in 64-bit mode
movq %rdi, %rsp
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:53:15: error: register %rsp is only available in 64-bit mode
movq 0x38(%rsp), %r8
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:56:14: error: register %rsp is only available in 64-bit mode
ldmxcsr (%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:57:15: error: register %rsp is only available in 64-bit mode
fldcw 0x4(%rsp)
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:60:14: error: register %rsp is only available in 64-bit mode
movq 0x8(%rsp), %r12
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:61:15: error: register %rsp is only available in 64-bit mode
movq 0x10(%rsp), %r13
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:62:15: error: register %rsp is only available in 64-bit mode
movq 0x18(%rsp), %r14
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:63:15: error: register %rsp is only available in 64-bit mode
movq 0x20(%rsp), %r15
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:64:15: error: register %rsp is only available in 64-bit mode
movq 0x28(%rsp), %rbx
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:65:15: error: register %rsp is only available in 64-bit mode
movq 0x30(%rsp), %rbp
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:67:15: error: register %rsp is only available in 64-bit mode
leaq 0x40(%rsp), %rsp
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:75:15: error: register %rsi is only available in 64-bit mode
salq $32, %rsi
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:76:9: error: register %rsi is only available in 64-bit mode
orq %rsi, %rax
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:84:10: error: register %rax is only available in 64-bit mode
movq %rax, %rdi
^~~~
../libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:87:10: error: register %r8 is only available in 64-bit mode
jmp *%r8
^~~
[3/255] Building ASM object libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o
FAILED: libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o
C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe -target i686-none-linux-android21 -gcc-toolchain C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_SOURCE -DBOOST_CONTEXT_STATIC_LINK -I../libs/context/include -I../libs/assert/include -I../libs/config/include -I../libs/core/include -I../libs/static_assert/include -I../libs/throw_exception/include -I../libs/mp11/include -I../libs/pool/include -I../libs/integer/include -I../libs/type_traits/include -I../libs/winapi/include -I../libs/predef/include -I../libs/smart_ptr/include -I../libs/move/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -MD -MT libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o -MF libs\context\CMakeFiles\boost_context.dir\src\asm\make_x86_64_sysv_elf_gas.S.o.d -o libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o -c ../libs/context/src/asm/make_x86_64_sysv_elf_gas.S
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:34:10: error: register %rdi is only available in 64-bit mode
movq %rdi, %rax
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:37:16: error: register %rax is only available in 64-bit mode
andq $-16, %rax
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:41:16: error: register %rax is only available in 64-bit mode
leaq -0x40(%rax), %rax
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:45:10: error: register %rdx is only available in 64-bit mode
movq %rdx, 0x28(%rax)
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:48:14: error: register %rax is only available in 64-bit mode
stmxcsr (%rax)
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:50:16: error: register %rax is only available in 64-bit mode
fnstcw 0x4(%rax)
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:53:21: error: register %rip is only available in 64-bit mode
leaq trampoline(%rip), %rcx
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:56:10: error: register %rcx is only available in 64-bit mode
movq %rcx, 0x38(%rax)
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:59:17: error: register %rip is only available in 64-bit mode
leaq finish(%rip), %rcx
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:62:10: error: register %rcx is only available in 64-bit mode
movq %rcx, 0x30(%rax)
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:69:10: error: register %rbp is only available in 64-bit mode
push %rbp
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:71:10: error: register %rbx is only available in 64-bit mode
jmp *%rbx
^~~~
../libs/context/src/asm/make_x86_64_sysv_elf_gas.S:75:10: error: register %rdi is only available in 64-bit mode
xorq %rdi, %rdi
^~~~
[6/255] Building CXX object libs/fiber/CMakeFiles/boost_fiber.dir/src/algo/shared_work.cpp.o
ninja: build stopped: subcommand failed.
PS D:\project\andriod\boost\build_ninja>
解决办法找到了,在CMAKE_C_FLAGS中加入-m64如:
SET (CMAKE_C_FLAGS "-Wall -std=c99 -m64 -Wformat -Wno-error=deprecated-declarations -Wno-deprecated-declarations")
或直接在build.ninja中的FLAGS中加入-m64如:
build boost/libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o: ASM_COMPILER__boost_context D$:/project/andriod/trime-develop/app/src/main/jni/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S || cmake_object_order_depends_target_boost_context
DEFINES = -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_SOURCE -DBOOST_CONTEXT_STATIC_LINK
DEP_FILE = boost\libs\context\CMakeFiles\boost_context.dir\src\asm\make_x86_64_sysv_elf_gas.S.o.d
FLAGS = -m64 -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC
INCLUDES = -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/context/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/assert/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/config/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/core/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/static_assert/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/throw_exception/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/mp11/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/pool/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/integer/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/type_traits/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/winapi/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/predef/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/smart_ptr/include -ID:/project/andriod/trime-develop/app/src/main/jni/boost/libs/move/include
OBJECT_DIR = boost\libs\context\CMakeFiles\boost_context.dir
或者将cmake_command.txt中-DANDROID_ABI=x86改成-DANDROID_ABI=x86_64,DCMAKE_ANDROID_ARCH_ABI=x86改成DCMAKE_ANDROID_ARCH_ABI=x86_64,然后将cmake_command.txt改成cmake_command.bat拖到cmd中执行如:
C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -HD:\project\andriod\boost -DCMAKE_FIND_ROOT_PATH=D:\project\andriod\trime-develop\app\.cxx\cmake\debug\prefab\x86\prefab -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake -DANDROID_ABI=x86_64 -DANDROID_NDK=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620 -DANDROID_PLATFORM=android-21 -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_ANDROID_NDK=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\project\andriod\boost\build_ninja\libs -DCMAKE_MAKE_PROGRAM=C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -BD:\project\andriod\boost\build_ninja -GNinja
上面是一些方法尝试很多次以后仍然无法通过还是直接在build.ninja中添加-m64能通过。
|