-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There was an error linking dynamic libraries during cross compilation(without docker) #1616
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
When I used build.md to compile the dynamic library for ARM, the following error occurred.
The compile command I used was " cmake -DCMAKE_TOOLCHAIN_FILE=/home/linux/onnxruntime/tool.cmake -DONNX_CUSTOM_PROTOC_EXECUTABLE=/home/linux/onnxruntime/protoc-3.6.1-linux-x86_64/bin/protoc -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=OFF -Donnxruntime_DEV_MODE=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_SHARED_LIB=ON -Donnxruntime_USE_EIGEN_FOR_BLAS=OFF -Donnxruntime_USE_BRAINSLICE=OFF -Donnxruntime_USE_EIGEN_THREADPOOL=OFF -Donnxruntime_CROSS_COMPILING=OFF -Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF -DCMAKE_BUILD_TYPE=Debug -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 -DPYTHON_LIBRARY=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5.so -DBUILD_SHARED_LIBS=OFF -Donnxruntime_ENABLE_STATIC_ANALYSIS=OFF"
[ 74%] Linking CXX shared library libonnxruntime.so
[ 74%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/optimizer/graph_transform_test.cc.o
[ 74%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/optimizer/graph_transform_utils_test.cc.o
[ 74%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/optimizer/optimizer_test.cc.o
[ 74%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/optimizer/rule_based_graph_transformer_test.cc.o
[ 74%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/framework/TestAllocatorManager.cc.o
[ 75%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/home/linux/onnxruntime/onnxruntime/test/framework/allocation_planner_test.cc.o
libonnxruntime_util.a(math_cpu.cc.o): In function
void onnxruntime::math::Gemm<float, onnxruntime::CPUMathUtil>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, long long, long long, long long, float, float const*, float const*, float, float*, onnxruntime::CPUMathUtil*, onnxruntime::DataTypeImpl const*)': /home/linux/onnxruntime/onnxruntime/core/util/math_cpu.cc:317: undefined reference to
cblas_sgemm'libonnxruntime_util.a(math_cpu.cc.o): In function
void onnxruntime::math::Gemm<double, onnxruntime::CPUMathUtil>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, long long, long long, long long, float, double const*, double const*, float, double*, onnxruntime::CPUMathUtil*, onnxruntime::DataTypeImpl const*)': /home/linux/onnxruntime/onnxruntime/core/util/math_cpu.cc:328: undefined reference to
cblas_dgemm'libonnxruntime_util.a(math_cpu.cc.o): In function
void onnxruntime::math::GemmEx<float, onnxruntime::CPUMathUtil>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, int, float const*, int, float, float*, int, onnxruntime::CPUMathUtil*)': /home/linux/onnxruntime/onnxruntime/core/util/math_cpu.cc:368: undefined reference to
cblas_sgemm'libonnxruntime_util.a(math_cpu.cc.o): In function
void onnxruntime::math::Gemv<float, onnxruntime::CPUMathUtil>(CBLAS_TRANSPOSE, int, int, float, float const*, float const*, float, float*, onnxruntime::CPUMathUtil*, onnxruntime::DataTypeImpl const*)': /home/linux/onnxruntime/onnxruntime/core/util/math_cpu.cc:374: undefined reference to
cblas_sgemv'libonnxruntime_util.a(math_cpu.cc.o): In function
void onnxruntime::math::Axpy<float, onnxruntime::CPUMathUtil>(int, float, float const*, float*, onnxruntime::CPUMathUtil*)': /home/linux/onnxruntime/onnxruntime/core/util/math_cpu.cc:408: undefined reference to
cblas_saxpy'collect2: error: ld returned 1 exit status
CMakeFiles/onnxruntime.dir/build.make:185: recipe for target 'libonnxruntime.so.0.4.0' failed
make[2]: *** [libonnxruntime.so.0.4.0] Error 1
CMakeFiles/Makefile2:144: recipe for target 'CMakeFiles/onnxruntime.dir/all' failed
make[1]: *** [CMakeFiles/onnxruntime.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
3.log
Urgency
If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none.
System information
To Reproduce
Describe steps/code to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging.
The text was updated successfully, but these errors were encountered: