didi / AoE

AoE (AI on Edge,终端智能,边缘计算) 是一个终端侧AI集成运行时环境 (IRE),帮助开发者提升效率。
https://didi.github.io/AoE
Apache License 2.0
877 stars 130 forks source link

osX 编译android demo异常 #13

Closed GainLee closed 5 years ago

GainLee commented 5 years ago

Android studio assembleRelease编译examples-demo异常,如下异常log

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 17s

GainLee commented 5 years ago

SIMPLE: Build command failed.

SIMPLE: Error while executing process /Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/Users/Gain/job/code/github/AoE/Android/third_party/ncnn -B/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/build/intermediates/cmake/release/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=/Users/Gain/Library/Android/sdk/ndk-bundle -DCMAKE_C_FLAGS=-fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -DCMAKE_CXX_FLAGS=-fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=/Users/Gain/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja -GAndroid Gradle - Ninja -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_shared}

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- broken

ERROR: The C compiler "/Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" is not able to compile a simple test program. Open File

SIMPLE: It fails with the following output:

SIMPLE: Change Dir: /Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeTmp

SIMPLE: Run Build

SIMPLE: Command:"/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja"

SIMPLE: "cmTC_d5bf2"

SIMPLE: [1/2] Building C object CMakeFiles/cmTC_d5bf2.dir/testCCompiler.c.o

SIMPLE: [2/2] Linking C executable cmTC_d5bf2

SIMPLE: FAILED: : &&

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -target aarch64-none-linux-android -gcc-toolchain

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64

SIMPLE: --sysroot=/Users/Gain/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm64

SIMPLE: -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong

SIMPLE: -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security

SIMPLE: -fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing

SIMPLE: -ffunction-sections -fdata-sections -ffast-math -Wl,--build-id

SIMPLE: -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined

SIMPLE: -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now

SIMPLE: -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE -Wl,--build-id

SIMPLE: -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE

SIMPLE: CMakeFiles/cmTC_d5bf2.dir/testCCompiler.c.o -o cmTC_d5bf2 -lm && :

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarc-- Configuring incomplete, errors occurred!

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeOutput.log".

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeError.log".

SIMPLE: h64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld:

SIMPLE: cannot find -lrt

ERROR: error: linker command failed with exit code 1 (use -v to see

SIMPLE: invocation)

SIMPLE: ninja: build stopped: subcommand failed.

SIMPLE: CMake will not be able to correctly generate this project.

SIMPLE: Call Stack (most recent call first):

SIMPLE: CMakeLists.txt

SIMPLE: Build command failed.

SIMPLE: Error while executing process /Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/Users/Gain/job/code/github/AoE/Android/third_party/ncnn -B/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/build/intermediates/cmake/debug/obj/armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=/Users/Gain/Library/Android/sdk/ndk-bundle -DCMAKE_C_FLAGS=-fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -DCMAKE_CXX_FLAGS=-fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=/Users/Gain/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja -GAndroid Gradle - Ninja -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_shared}

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- broken

ERROR: The C compiler "/Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" is not able to compile a simple test program. Open File

SIMPLE: It fails with the following output:

SIMPLE: Change Dir: /Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp

SIMPLE: Run Build

SIMPLE: Command:"/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja"

SIMPLE: "cmTC_7ef21"

SIMPLE: [1/2] Building C object CMakeFiles/cmTC_7ef21.dir/testCCompiler.c.o

SIMPLE: [2/2] Linking C executable cmTC_7ef21

SIMPLE: FAILED: : &&

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -target armv7-none-linux-androideabi -gcc-toolchain

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

SIMPLE: --sysroot=/Users/Gain/Library/Android/sdk/ndk-bundle/platforms/android-15/arch-arm

SIMPLE: -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong

SIMPLE: -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16

SIMPLE: -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat

SIMPLE: -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables

SIMPLE: -fstack-protector-strong -no-canonical-prefixes -march=armv7-a

SIMPLE: -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb

SIMPLE: -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2

SIMPLE: -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing

SIMPLE: -ffunction-sections -fdata-sections -ffast-math -Wl,--build-id

SIMPLE: -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8

SIMPLE: -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Wl,-z,noexecstack

SIMPLE: -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections

SIMPLE: -Wl,-z,nocopyreloc -Wl,--build-id -Wl,--warn-shared-textrel

SIMPLE: -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a

SIMPLE: -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relr-- Configuring incomplete, errors occurred!

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".

SIMPLE: o

SIMPLE: -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc

SIMPLE: CMakeFiles/cmTC_7ef21.dir/testCCompiler.c.o -o cmTC_7ef21 -lm && :

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:

ERROR: cannot find -lrt

ERROR: error: linker command failed with exit code 1 (use -v to see

SIMPLE: invocation)

SIMPLE: ninja: build stopped: subcommand failed.

SIMPLE: CMake will not be able to correctly generate this project.

SIMPLE: Call Stack (most recent call first):

SIMPLE: CMakeLists.txt

SIMPLE: Build command failed.

SIMPLE: Error while executing process /Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/Users/Gain/job/code/github/AoE/Android/third_party/ncnn -B/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/build/intermediates/cmake/release/obj/armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=/Users/Gain/Library/Android/sdk/ndk-bundle -DCMAKE_C_FLAGS=-fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -DCMAKE_CXX_FLAGS=-fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=/Users/Gain/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja -GAndroid Gradle - Ninja -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_shared}

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- broken

ERROR: The C compiler "/Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" is not able to compile a simple test program. Open File

SIMPLE: It fails with the following output:

SIMPLE: Change Dir: /Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeTmp

SIMPLE: Run Build

SIMPLE: Command:"/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja"

SIMPLE: "cmTC_a708f"

SIMPLE: [1/2] Building C object CMakeFiles/cmTC_a708f.dir/testCCompiler.c.o

SIMPLE: [2/2] Linking C executable cmTC_a708f

SIMPLE: FAILED: : &&

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -target armv7-none-linux-androideabi -gcc-toolchain

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64

SIMPLE: --sysroot=/Users/Gain/Library/Android/sdk/ndk-bundle/platforms/android-15/arch-arm

SIMPLE: -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong

SIMPLE: -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16

SIMPLE: -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat

SIMPLE: -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables

SIMPLE: -fstack-protector-strong -no-canonical-prefixes -march=armv7-a

SIMPLE: -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb

SIMPLE: -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2

SIMPLE: -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing

SIMPLE: -ffunction-sections -fdata-sections -ffast-math -Wl,--build-id

SIMPLE: -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8

SIMPLE: -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Wl,-z,noexecstack

SIMPLE: -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections

SIMPLE: -Wl,-z,nocopyreloc -Wl,--build-id -Wl,--warn-shared-textrel

SIMPLE: -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a

SIMPLE: -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,re-- Configuring incomplete, errors occurred!

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeOutput.log".

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeError.log".

SIMPLE: lro

SIMPLE: -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc

SIMPLE: CMakeFiles/cmTC_a708f.dir/testCCompiler.c.o -o cmTC_a708f -lm && :

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld:

ERROR: cannot find -lrt

ERROR: error: linker command failed with exit code 1 (use -v to see

SIMPLE: invocation)

SIMPLE: ninja: build stopped: subcommand failed.

SIMPLE: CMake will not be able to correctly generate this project.

SIMPLE: Call Stack (most recent call first):

SIMPLE: CMakeLists.txt

SIMPLE: Build command failed.

SIMPLE: Error while executing process /Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/Users/Gain/job/code/github/AoE/Android/third_party/ncnn -B/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/build/intermediates/cmake/debug/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=/Users/Gain/Library/Android/sdk/ndk-bundle -DCMAKE_C_FLAGS=-fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -DCMAKE_CXX_FLAGS=-fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=/Users/Gain/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja -GAndroid Gradle - Ninja -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_shared}

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -- Check for working C compiler: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- broken

ERROR: The C compiler "/Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" is not able to compile a simple test program. Open File

SIMPLE: It fails with the following output:

SIMPLE: Change Dir: /Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeTmp

SIMPLE: Run Build

SIMPLE: Command:"/Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/ninja"

SIMPLE: "cmTC_18e57"

SIMPLE: [1/2] Building C object CMakeFiles/cmTC_18e57.dir/testCCompiler.c.o

SIMPLE: [2/2] Linking C executable cmTC_18e57

SIMPLE: FAILED: : &&

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

SIMPLE: -target aarch64-none-linux-android -gcc-toolchain

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64

SIMPLE: --sysroot=/Users/Gain/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm64

SIMPLE: -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong

SIMPLE: -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security

SIMPLE: -fopenmp -O2 -fvisibility=hidden -fomit-frame-pointer -fstrict-aliasing

SIMPLE: -ffunction-sections -fdata-sections -ffast-math -Wl,--build-id

SIMPLE: -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined

SIMPLE: -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now

SIMPLE: -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE -Wl,--build-id

SIMPLE: -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE

SIMPLE: CMakeFiles/cmTC_18e57.dir/testCCompiler.c.o -o cmTC_18e57 -lm && :

SIMPLE: /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch6-- Configuring incomplete, errors occurred!

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeOutput.log".

SIMPLE: See also "/Users/Gain/job/code/github/AoE/Android/third_party/ncnn/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeError.log".

SIMPLE: 4-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld:

SIMPLE: cannot find -lrt

ERROR: error: linker command failed with exit code 1 (use -v to see

SIMPLE: invocation)

SIMPLE: ninja: build stopped: subcommand failed.

SIMPLE: CMake will not be able to correctly generate this project.

SIMPLE: Call Stack (most recent call first):

SIMPLE: CMakeLists.txt

zouyuefu commented 5 years ago

Android studio assembleRelease编译examples-demo异常,如下异常log

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':runtime-mnn:externalNativeBuildRelease'.

Build command failed. Error while executing process /Users/Gain/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/Gain/job/code/github/AoE/Android/third_party/mnn/.externalNativeBuild/cmake/release/arm64-v8a --target mnncore} [1/3] Building CXX object CMakeFiles/mnncore.dir/src/main/jni/mnnnetnative.cpp.o [2/3] Building CXX object CMakeFiles/mnncore.dir/src/main/jni/mnnportraitnative.cpp.o [3/3] Linking CXX shared library ../../../../build/intermediates/cmake/release/obj/arm64-v8a/libmnncore.so FAILED: : && /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target aarch64-none-linux-android -gcc-toolchain /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/Gain/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-arm64 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=c++11 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=c++11 -fopenmp -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fno-rtti -fno-exceptions -flax-vector-conversions -O2 -DNDEBUG -O2 -DNDEBUG -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmnncore.so -o ../../../../build/intermediates/cmake/release/obj/arm64-v8a/libmnncore.so CMakeFiles/mnncore.dir/src/main/jni/mnnnetnative.cpp.o CMakeFiles/mnncore.dir/src/main/jni/mnnportraitnative.cpp.o ../../../../libs/arm64-v8a/libMNN.so -llog -ljnigraphics -lm "/Users/Gain/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so" && : /Users/Gain/Library/Android/sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lrt clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 17s

这个错误跟NDK有关,你试一下新一点的的ndk版本,看看问题是否能解决?如果还有问题加我们的QQ群815254379交流。 ndk.dir=/Users/{your path}/Library/Android/sdk/ndk/20.0.5594570

GainLee commented 5 years ago

NDK 从13升到20解决问题