[Build] FAILED BUILD libonnxruntime4j_jni.so #22835
Labels
api:Java
issues related to the Java API
build
build issues; typically submitted using template
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
Describe the issue
HELP!!!
I want onnxruntime to run on Android 4.4.
When I was compiling the code, the following error occurred:
$ ./build.bat --android --android_sdk_path D:/Android/SDK --android_ndk_path D:/Android/SDK/ndk/28.0.12433566 --android_abi armeabi-v7a --android_api 19 --cmake_generator Ninja --build_java
2024-11-14 10:41:51,694 tools_python_utils [INFO] - flatbuffers module is not installed. parse_config will not be available
2024-11-14 10:41:51,697 build [DEBUG] - Command line arguments:
--build_dir 'E:\onnxruntime\onnxruntime\build\Windows' --android --android_sdk_path D:/Android/SDK --android_ndk_path D:/Android/SDK/ndk/28.0.12433566 --android_abi armeabi-v7a --android_api 19 --cmake_generator Ninja --build_java
2024-11-14 10:41:51,708 build [DEBUG] - Defaulting to running update, build [and test for native builds].
2024-11-14 10:41:51,715 build [INFO] - Build started
2024-11-14 10:41:51,715 build [INFO] - git submodule sync --recursive
Synchronizing submodule url for 'cmake/external/emsdk'
Synchronizing submodule url for 'cmake/external/libprotobuf-mutator'
Synchronizing submodule url for 'cmake/external/onnx'
Synchronizing submodule url for 'cmake/external/onnx/third_party/benchmark'
Synchronizing submodule url for 'cmake/external/onnx/third_party/pybind11'
2024-11-14 10:41:52,300 build [INFO] - git submodule update --init --recursive
2024-11-14 10:41:52,875 build [INFO] - Generating CMake build tree
2024-11-14 10:41:52,875 build [INFO] - D:\cmake-3.28.0-windows-x86_64\bin\cmake.EXE E:\onnxruntime\onnxruntime\cmake -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=ON -DPython_EXECUTABLE=C:\Users\admin\AppData\Local\Programs\Python\Python311\python.exe -DPYTHON_EXECUTABLE=C:\Users\admin\AppData\Local\Programs\Python\Python311\python.exe -Donnxruntime_USE_VCPKG=OFF -Donnxruntime_USE_MIMALLOC=OFF -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_CSHARP=OFF -Donnxruntime_BUILD_JAVA=ON -Donnxruntime_BUILD_NODEJS=OFF -Donnxruntime_BUILD_OBJC=OFF -Donnxruntime_BUILD_SHARED_LIB=ON -Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF -Donnxruntime_USE_DNNL=OFF -Donnxruntime_USE_NNAPI_BUILTIN=OFF -Donnxruntime_USE_VSINPU=OFF -Donnxruntime_USE_RKNPU=OFF -Donnxruntime_USE_LLVM=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_VITISAI=OFF -Donnxruntime_USE_TENSORRT=OFF -Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON -Donnxruntime_USE_TVM=OFF -Donnxruntime_TVM_CUDA_RUNTIME=OFF -Donnxruntime_TVM_USE_HASH=OFF -Donnxruntime_USE_MIGRAPHX=OFF -Donnxruntime_DISABLE_CONTRIB_OPS=OFF -Donnxruntime_DISABLE_ML_OPS=OFF -Donnxruntime_DISABLE_RTTI=OFF -Donnxruntime_DISABLE_EXCEPTIONS=OFF -Donnxruntime_MINIMAL_BUILD=OFF -Donnxruntime_EXTENDED_MINIMAL_BUILD=OFF -Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF -Donnxruntime_REDUCED_OPS_BUILD=OFF -Donnxruntime_USE_DML=OFF -Donnxruntime_USE_WINML=OFF -Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF -Donnxruntime_USE_TELEMETRY=OFF -Donnxruntime_ENABLE_LTO=OFF -Donnxruntime_USE_ACL=OFF -Donnxruntime_USE_ARMNN=OFF -Donnxruntime_ARMNN_RELU_USE_CPU=ON -Donnxruntime_ARMNN_BN_USE_CPU=ON -Donnxruntime_USE_JSEP=OFF -Donnxruntime_USE_WEBGPU=OFF -Donnxruntime_USE_EXTERNAL_DAWN=OFF -Donnxruntime_ENABLE_NVTX_PROFILE=OFF -Donnxruntime_ENABLE_TRAINING=OFF -Donnxruntime_ENABLE_TRAINING_OPS=OFF -Donnxruntime_ENABLE_TRAINING_APIS=OFF -Donnxruntime_ENABLE_CPU_FP16_OPS=OFF -Donnxruntime_USE_NCCL=OFF -Donnxruntime_BUILD_BENCHMARKS=OFF -Donnxruntime_USE_ROCM=OFF -Donnxruntime_GCOV_COVERAGE=OFF -Donnxruntime_USE_MPI=OFF -Donnxruntime_ENABLE_MEMORY_PROFILE=OFF -Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF -Donnxruntime_USE_CUDA_NHWC_OPS=OFF -Donnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON -Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING=ON -Donnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_MEMORY64=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=OFF -Donnxruntime_ENABLE_LAZY_TENSOR=OFF -Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF -Donnxruntime_ENABLE_CUDA_PROFILING=OFF -Donnxruntime_ENABLE_ROCM_PROFILING=OFF -Donnxruntime_USE_XNNPACK=OFF -Donnxruntime_USE_WEBNN=OFF -Donnxruntime_USE_CANN=OFF -Donnxruntime_USE_TRITON_KERNEL=OFF -Donnxruntime_DISABLE_FLOAT8_TYPES=ON -Donnxruntime_DISABLE_SPARSE_TENSORS=OFF -Donnxruntime_DISABLE_OPTIONAL_TYPE=OFF -DCMAKE_TOOLCHAIN_FILE=D:\Android\SDK\ndk\28.0.12433566\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DANDROID_ABI=armeabi-v7a -DANDROID_MIN_SDK=19 -DCMAKE_VS_GLOBALS=UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true -DCMAKE_TLS_VERIFY=ON -DFETCHCONTENT_QUIET=OFF -DONNX_USE_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DABSL_MSVC_STATIC_RUNTIME=OFF -Dgtest_force_shared_crt=ON -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=E:\onnxruntime\onnxruntime\build\Windows/Debug/installed
CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
The OLD behavior for policy CMP0104 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- android-19 is unsupported. Using minimum supported version 21.
CMake Warning (dev) at CMakeLists.txt:62 (include):
Policy CMP0145 is not set: The Dart and FindDart modules are removed. Run
"cmake --help-policy CMP0145" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/cmake-3.28.0-windows-x86_64/share/cmake-3.28/Modules/Dart.cmake:47 (message):
Policy CMP0145 is not set: The Dart and FindDart modules are removed. Run
"cmake --help-policy CMP0145" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:62 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/cmake-3.28.0-windows-x86_64/share/cmake-3.28/Modules/Dart.cmake:57 (find_package):
Policy CMP0144 is not set: find_package uses upper-case _ROOT
variables. Run "cmake --help-policy CMP0144" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
CMake variable DART_ROOT is set to:
For compatibility, find_package is ignoring the variable, but code in a
.cmake module might still use it.
Call Stack (most recent call first):
CMakeLists.txt:62 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
F16C instruction set is not supported.
FMA instruction set is not supported.
AVX instruction set is not supported.
One or more AVX/F16C instruction flags are not supported.
Building ONNX Runtime for armv7-a CPU ARCH
Patch found: D:/Git/usr/bin/patch.exe
Doing crosscompiling
-- Loading Dependencies URLs ...
-- Loading Dependencies ...
-- Populating abseil_cpp
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/abseil_cpp-subbuild
ninja: no work to do.
-- Abseil source dir:E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/abseil_cpp-src
-- Populating re2
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/re2-subbuild
ninja: no work to do.
-- Populating googletest
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/googletest-subbuild
ninja: no work to do.
-- Populating utf8_range
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/utf8_range-subbuild
ninja: no work to do.
-- CMAKE_HOST_SYSTEM_NAME: Windows
-- Populating protoc_binary
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/protoc_binary-subbuild
ninja: no work to do.
-- Use prebuilt protoc
-- Populating protobuf
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/protobuf-subbuild
ninja: no work to do.
-- 3.21.12.0
-- Populating date
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/date-subbuild
ninja: no work to do.
-- Populating mp11
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/mp11-subbuild
ninja: no work to do.
-- Populating nlohmann_json
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/nlohmann_json-subbuild
ninja: no work to do.
CMake Deprecation Warning at E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/nlohmann_json-src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Using the single-header code from E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/nlohmann_json-src/single_include/
-- Populating pytorch_cpuinfo
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/pytorch_cpuinfo-subbuild
ninja: no work to do.
-- Populating gsl
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/gsl-subbuild
ninja: no work to do.
-- Populating safeint
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/safeint-subbuild
ninja: no work to do.
-- Populating flatbuffers
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/flatbuffers-subbuild
ninja: no work to do.
-- Proceeding with version: 23.5.26.0
-- CMAKE_CXX_FLAGS: -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -ffunction-sections -fdata-sections -DCPUINFO_SUPPORTED
-- Populating onnx
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/onnx-subbuild
ninja: no work to do.
CMake Warning (dev) at E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/onnx-src/CMakeLists.txt:107 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using custom protoc executable
Generated: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/onnx-build/onnx/onnx-ml.proto
Generated: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/onnx-build/onnx/onnx-operators-ml.proto
Generated: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/onnx-build/onnx/onnx-data.proto
-- ******** Summary ********
-- CMake version : 3.28.0
-- CMake command : D:/cmake-3.28.0-windows-x86_64/bin/cmake.exe
-- System : Android
-- C++ compiler : D:/Android/SDK/ndk/28.0.12433566/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- C++ compiler version : 19.0.0
-- CXX flags : -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -ffunction-sections -fdata-sections -DCPUINFO_SUPPORTED -Wnon-virtual-dtor
-- Build type : Debug
-- Compile definitions : ORT_ENABLE_STREAM;EIGEN_MPL2_ONLY;__STDC_FORMAT_MACROS
-- CMAKE_PREFIX_PATH : E:\onnxruntime\onnxruntime\build\Windows/Debug/installed;D:/Android/SDK/ndk/28.0.12433566/toolchains/llvm/prebuilt/windows-x86_64
-- CMAKE_INSTALL_PREFIX : C:/Program Files (x86)/onnxruntime
-- CMAKE_MODULE_PATH : E:/onnxruntime/onnxruntime/cmake/external
-- ONNX version : 1.16.1
-- ONNX NAMESPACE : onnx
-- ONNX_USE_LITE_PROTO : ON
-- USE_PROTOBUF_SHARED_LIBS : OFF
-- Protobuf_USE_STATIC_LIBS : ON
-- ONNX_DISABLE_EXCEPTIONS : OFF
-- ONNX_DISABLE_STATIC_REGISTRATION : OFF
-- ONNX_WERROR : OFF
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNX_BUILD_SHARED_LIBS :
-- BUILD_SHARED_LIBS : OFF
-- Protobuf compiler :
-- Protobuf includes :
-- Protobuf libraries :
-- BUILD_ONNX_PYTHON : OFF
-- Could NOT find Eigen3 (missing: Eigen3_DIR)
-- Populating eigen
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug/_deps/eigen-subbuild
ninja: no work to do.
-- Finished fetching external dependencies
NVCC_ERROR =
NVCC_OUT = no such file or directory
-- Java Build is enabled
-- GRADLE_ARGS: --console=plain;cmakeBuild;-DcmakeBuildDir=E:/onnxruntime/onnxruntime/build/Windows/Debug;--no-daemon
-- Enabling Java tests
-- Configuring done (3.2s)
-- Generating done (0.2s)
-- Build files have been written to: E:/onnxruntime/onnxruntime/build/Windows/Debug
2024-11-14 10:41:56,599 build [INFO] - Building targets for Debug configuration
2024-11-14 10:41:56,599 build [INFO] - D:\cmake-3.28.0-windows-x86_64\bin\cmake.EXE --build E:\onnxruntime\onnxruntime\build\Windows\Debug --config Debug
[0/2] Re-checking globbed directories...
[1/3] Generating E:/onnxruntime/onnxruntime/java/build/libs/onnxruntime.jar
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
BUILD SUCCESSFUL in 4s
4 actionable tasks: 4 executed
[2/3] Linking C shared module libonnxruntime4j_jni.so
FAILED: libonnxruntime4j_jni.so
C:\Windows\system32\cmd.exe /C "cd . && D:\Android\SDK\ndk\28.0.12433566\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi21 --sysroot=D:/Android/SDK/ndk/28.0.12433566/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -ffunction-sections -fdata-sections -fno-limit-debug-info -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -o libonnxruntime4j_jni.so CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/OrtJniUtil.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxMap.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxRuntime.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxSequence.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxSparseTensor.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxTensor.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtAllocator.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtEnvironment.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtEnvironment_ThreadingOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtLoraAdapter.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession_RunOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession_SessionOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtTrainingSession.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtTrainingSession_OrtCheckpointState.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_providers_OrtCUDAProviderOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_providers_OrtTensorRTProviderOptions.c.o libonnxruntime.so -latomic -lm && C:\Windows\system32\cmd.exe /C "cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/native-lib/ai/onnxruntime/native/android-armeabi-v7a/libonnxruntime.so && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime4j_jni.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/native-jni/ai/onnxruntime/native/android-armeabi-v7a/libonnxruntime4j_jni.so && cd /D E:\onnxruntime\onnxruntime\java && E:\onnxruntime\onnxruntime\java\gradlew --console=plain cmakeBuild -DcmakeBuildDir=E:/onnxruntime/onnxruntime/build/Windows/Debug --no-daemon && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android/armeabi-v7a/libonnxruntime.so && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime4j_jni.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android/armeabi-v7a/libonnxruntime4j_jni.so && cd /D E:\onnxruntime\onnxruntime\java && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E echo "Generating Android AAR package..." && E:\onnxruntime\onnxruntime\java\gradlew build -b build-android.gradle -c settings-android.gradle -DjniLibsDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android -DbuildDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/java/build/android -DminSdkVer=19 -DheadersDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/android/headers --stacktrace && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/java/build/android/outputs/aar/onnxruntime-debug.aar E:/onnxruntime/onnxruntime/build/Windows/Debug/java/androidtest/android/app/libs/onnxruntime-android.aar && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug\java\androidtest\android && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E echo "Building and running Android test for Android AAR package..." && E:\onnxruntime\onnxruntime\java\gradlew clean assembleDebug assembleDebugAndroidTest -DminSdkVer=19 --stacktrace""
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
BUILD SUCCESSFUL in 21s
8 actionable tasks: 6 executed, 2 up-to-date
Generating Android AAR package...
FAILURE: Build failed with an exception.
Execution failed for task ':lint'.
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lint'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$3(ExecuteActionsTaskExecuter.java:186)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:268)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
......
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.intellij.openapi.util.KeyedExtensionCollector.getPoint(KeyedExtensionCollector.java:203)
at com.intellij.openapi.util.KeyedExtensionCollector.getExtensions(KeyedExtensionCollector.java:135)
at com.intellij.openapi.util.KeyedExtensionCollector.buildExtensions(KeyedExtensionCollector.java:124)
at com.intellij.openapi.util.KeyedExtensionCollector.forKey(KeyedExtensionCollector.java:109)
at com.intellij.openapi.vfs.impl.VirtualFileManagerImpl.getFileSystem(VirtualFileManagerImpl.java:107)
at com.intellij.openapi.vfs.StandardFileSystems$1.compute(StandardFileSystems.java:24)
at com.intellij.openapi.vfs.StandardFileSystems$1.compute(StandardFileSystems.java:20)
at com.intellij.openapi.util.ClearableLazyValue.getValue(ClearableLazyValue.java:39)
at com.intellij.openapi.vfs.StandardFileSystems.local(StandardFileSystems.java:40)
at com.android.tools.lint.LintCliClient.readFile(LintCliClient.kt:547)
at com.android.tools.lint.LintCliClient$getSourceText$1.apply(LintCliClient.kt:479)
at com.android.tools.lint.LintCliClient$getSourceText$1.apply(LintCliClient.kt:116)
at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
at com.android.tools.lint.LintCliClient.getSourceText(LintCliClient.kt:479)
at com.android.tools.lint.HtmlReporter$writeIssueCard$1.invoke(HtmlReporter.kt:259)
at com.android.tools.lint.HtmlReporter$writeIssueCard$1.invoke(HtmlReporter.kt:56)
at com.android.tools.lint.HtmlReporter.writeCard(HtmlReporter.kt:764)
at com.android.tools.lint.HtmlReporter.writeIssueCard(HtmlReporter.kt:175)
at com.android.tools.lint.HtmlReporter.write(HtmlReporter.kt:120)
at com.android.tools.lint.gradle.LintGradleExecution.lintAllVariants(LintGradleExecution.kt:428)
at com.android.tools.lint.gradle.LintGradleExecution.analyze(LintGradleExecution.kt:74)
... 141 more
Get more help at https://help.gradle.org
BUILD FAILED in 4s
49 actionable tasks: 4 executed, 45 up-to-date
ninja: build stopped: subcommand failed.
Namespace(build_dir='E:\onnxruntime\onnxruntime\\build\Windows', config=['Debug'], update=False, build=False, clean=False, parallel=1, nvcc_threads=-1, test=False, skip_tests=False, compile_no_warning_as_error=False, enable_nvtx_profile=False, enable_memory_profile=False, enable_training=False, enable_training_apis=False, enable_training_ops=False, enable_nccl=False, mpi_home=None, nccl_home=None, use_mpi=False, enable_onnx_tests=False, path_to_protoc_exe=None, fuzz_testing=False, enable_symbolic_shape_infer_tests=False, gen_doc=None, gen_api_doc=False, use_cuda=False, cuda_version=None, cuda_home=None, cudnn_home=None, enable_cuda_line_info=False, enable_cuda_nhwc_ops=False, disable_cuda_nhwc_ops=False, enable_pybind=False, build_wheel=False, wheel_name_suffix=None, skip_keras_test=False, build_csharp=False, build_nuget=False, msbuild_extra_options=None, build_java=True, build_nodejs=False, build_objc=False, build_shared_lib=False, build_apple_framework=False, cmake_extra_defines=None, target=None, x86=False, rv64=False, arm=False, arm64=False, arm64ec=False, buildasx=False, riscv_toolchain_root='', riscv_qemu_path='', msvc_toolset=None, windows_sdk_version=None, android=True, android_abi='armeabi-v7a', android_api=19, android_sdk_path='D:\Android\SDK', android_ndk_path='D:\Android\SDK\ndk\28.0.12433566', android_cpp_shared=False, android_run_emulator=False, use_gdk=False, gdk_edition='.', gdk_platform='Scarlett', enable_wasm_memory64=False, ios=False, visionos=False, macos=None, apple_sysroot='', ios_toolchain_file='', visionos_toolchain_file='', xcode_code_signing_team_id='', xcode_code_signing_identity='', cmake_generator='Ninja', osx_arch='x86_64', apple_deploy_target=None, enable_address_sanitizer=False, use_binskim_compliant_compile_flags=False, disable_memleak_checker=False, use_vcpkg=False, build_wasm=False, build_wasm_static_lib=False, emsdk_version='3.1.59', enable_wasm_simd=False, enable_wasm_threads=False, disable_wasm_exception_catching=False, enable_wasm_api_exception_catching=False, enable_wasm_exception_throwing_override=True, wasm_run_tests_in_browser=False, enable_wasm_profiling=False, enable_wasm_debug_info=False, wasm_malloc=None, emscripten_settings=None, use_extensions=False, extensions_overridden_path=None, cmake_path='cmake', ctest_path='ctest', skip_submodule_sync=False, use_mimalloc=False, use_dnnl=False, dnnl_gpu_runtime='', dnnl_opencl_root='', use_openvino=None, dnnl_aarch64_runtime='', dnnl_acl_root='', use_coreml=False, use_webnn=False, use_snpe=False, snpe_root=None, use_nnapi=False, use_vsinpu=False, nnapi_min_api=None, use_jsep=False, use_webgpu=False, use_external_dawn=False, use_qnn=False, qnn_home=None, use_rknpu=False, use_preinstalled_eigen=False, eigen_path=None, enable_msinternal=False, llvm_path=None, use_vitisai=False, use_tvm=False, tvm_cuda_runtime=False, use_tvm_hash=False, use_tensorrt=False, use_tensorrt_builtin_parser=True, use_tensorrt_oss_parser=False, tensorrt_home=None, test_all_timeout='10800', use_migraphx=False, migraphx_home=None, use_full_protobuf=False, llvm_config='', skip_onnx_tests=False, skip_winml_tests=False, skip_nodejs_tests=False, enable_msvc_static_runtime=False, use_dml=False, dml_path='', use_winml=False, winml_root_namespace_override=None, dml_external_project=False, use_telemetry=False, enable_wcos=False, enable_lto=False, enable_transformers_tool_test=False, use_acl=False, acl_home=None, acl_libs=None, use_armnn=False, armnn_relu=False, armnn_bn=False, armnn_home=None, armnn_libs=None, build_micro_benchmarks=False, minimal_build=None, include_ops_by_config=None, enable_reduced_operator_type_support=False, disable_contrib_ops=False, disable_ml_ops=False, disable_rtti=False, disable_types=[], disable_exceptions=False, rocm_version=None, use_rocm=False, rocm_home=None, code_coverage=False, enable_lazy_tensor=False, ms_experimental=False, enable_external_custom_op_schemas=False, external_graph_transformer_path=None, enable_cuda_profiling=False, use_cann=False, cann_home=None, enable_rocm_profiling=False, use_xnnpack=False, use_avx512=False, use_azure=False, use_cache=False, use_triton_kernel=False, use_lock_free_queue=False)
Traceback (most recent call last):
File "E:\onnxruntime\onnxruntime\tools\ci_build\build.py", line 3011, in
sys.exit(main())
^^^^^^
File "E:\onnxruntime\onnxruntime\tools\ci_build\build.py", line 2901, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "E:\onnxruntime\onnxruntime\tools\ci_build\build.py", line 1752, in build_targets
run_subprocess(cmd_args, env=env)
File "E:\onnxruntime\onnxruntime\tools\ci_build\build.py", line 879, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\onnxruntime\onnxruntime\tools\python\util\run.py", line 49, in run
completed_process = subprocess.run(
^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['D:\cmake-3.28.0-windows-x86_64\bin\cmake.EXE', '--build', 'E:\onnxruntime\onnxruntime\\build\Windows\Debug', '--config', 'Debug']' returned non-zero exit status 1.
Urgency
No response
Target platform
Android4.4
Build script
./build.bat --android --android_sdk_path D:/Android/SDK --android_ndk_path D:/Android/SDK/ndk/28.0.12433566 --android_abi armeabi-v7a --android_api 19 --cmake_generator Ninja --build_java
Error / output
4 actionable tasks: 4 executed
[2/3] Linking C shared module libonnxruntime4j_jni.so
FAILED: libonnxruntime4j_jni.so
C:\Windows\system32\cmd.exe /C "cd . && D:\Android\SDK\ndk\28.0.12433566\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi21 --sysroot=D:/Android/SDK/ndk/28.0.12433566/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -ffunction-sections -fdata-sections -fno-limit-debug-info -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -o libonnxruntime4j_jni.so CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/OrtJniUtil.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxMap.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxRuntime.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxSequence.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxSparseTensor.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OnnxTensor.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtAllocator.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtEnvironment.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtEnvironment_ThreadingOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtLoraAdapter.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession_RunOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtSession_SessionOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtTrainingSession.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_OrtTrainingSession_OrtCheckpointState.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_providers_OrtCUDAProviderOptions.c.o CMakeFiles/onnxruntime4j_jni.dir/E_/onnxruntime/onnxruntime/java/src/main/native/ai_onnxruntime_providers_OrtTensorRTProviderOptions.c.o libonnxruntime.so -latomic -lm && C:\Windows\system32\cmd.exe /C "cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/native-lib/ai/onnxruntime/native/android-armeabi-v7a/libonnxruntime.so && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime4j_jni.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/native-jni/ai/onnxruntime/native/android-armeabi-v7a/libonnxruntime4j_jni.so && cd /D E:\onnxruntime\onnxruntime\java && E:\onnxruntime\onnxruntime\java\gradlew --console=plain cmakeBuild -DcmakeBuildDir=E:/onnxruntime/onnxruntime/build/Windows/Debug --no-daemon && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android/armeabi-v7a/libonnxruntime.so && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/libonnxruntime4j_jni.so E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android/armeabi-v7a/libonnxruntime4j_jni.so && cd /D E:\onnxruntime\onnxruntime\java && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E echo "Generating Android AAR package..." && E:\onnxruntime\onnxruntime\java\gradlew build -b build-android.gradle -c settings-android.gradle -DjniLibsDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/java/android -DbuildDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/java/build/android -DminSdkVer=19 -DheadersDir=E:/onnxruntime/onnxruntime/build/Windows/Debug/android/headers --stacktrace && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E copy_if_different E:/onnxruntime/onnxruntime/build/Windows/Debug/java/build/android/outputs/aar/onnxruntime-debug.aar E:/onnxruntime/onnxruntime/build/Windows/Debug/java/androidtest/android/app/libs/onnxruntime-android.aar && cd /D E:\onnxruntime\onnxruntime\build\Windows\Debug\java\androidtest\android && D:\cmake-3.28.0-windows-x86_64\bin\cmake.exe -E echo "Building and running Android test for Android AAR package..." && E:\onnxruntime\onnxruntime\java\gradlew clean assembleDebug assembleDebugAndroidTest -DminSdkVer=19 --stacktrace""
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
Visual Studio Version
No response
GCC / Compiler Version
28
The text was updated successfully, but these errors were encountered: