mac下编译预测库报libopenblas找不到的错误
Created by: WenmuZhou
为使您的问题得到快速解决,在建立Issue前,请您先通过如下方式搜索是否有相似问题:【搜索issue关键字】【使用labels筛选】【官方文档】
如果您没有查询到相似问题,为快速解决您的提问,建立issue时请提供如下细节信息:
- 标题:简洁、精准描述您的问题,例如“最新预测库的API文档在哪儿 ”
- 版本、环境信息: 1)PaddlePaddle版本:1.8.4 2)CPU:双核Intel Core i5 3)GPU:无 4)系统环境:Mac OS 10.15.6,Python: 3.7 描述:编译过程无问题,使用过程报错 报错信息
-- Build files have been written to: /Users/zhoujun20/Desktop/code/PaddleOCR/deploy/cpp_infer/build
Scanning dependencies of target ocr_system
[ 10%] Building CXX object CMakeFiles/ocr_system.dir/src/clipper.o
make[2]: *** No rule to make target `/Users/zhoujun20/Desktop/code/opencv3/paddle/inference/third_party/install/openblas/lib/libopenblas.a', needed by `ocr_system'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object CMakeFiles/ocr_system.dir/src/config.o
[ 30%] Building CXX object CMakeFiles/ocr_system.dir/src/main.o
[ 40%] Building CXX object CMakeFiles/ocr_system.dir/src/ocr_cls.o
[ 50%] Building CXX object CMakeFiles/ocr_system.dir/src/ocr_det.o
[ 60%] Building CXX object CMakeFiles/ocr_system.dir/src/ocr_rec.o
[ 70%] Building CXX object CMakeFiles/ocr_system.dir/src/postprocess_op.o
[ 80%] Building CXX object CMakeFiles/ocr_system.dir/src/preprocess_op.o
[ 90%] Building CXX object CMakeFiles/ocr_system.dir/src/utility.o
make[1]: *** [CMakeFiles/ocr_system.dir/all] Error 2
make: *** [all] Error 2
- 编译命令
git clone https://github.com/paddlepaddle/paddle
# 建议使用git checkout切换到Paddle稳定的版本,如:
git checkout v1.8.4
PADDLE_ROOT=~/Desktop/paddle/inference
rm -rf build
mkdir build
cd build
cmake .. \
-DFLUID_INFERENCE_INSTALL_DIR=$PADDLE_ROOT \
-DWITH_CONTRIB=OFF \
-DWITH_MKL=OFF \
-DWITH_MKLDNN=OFF \
-DWITH_GPU=OFF \
-DWITH_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_INFERENCE_API_TEST=OFF \
-DON_INFER=ON \
-DWITH_PYTHON=OFF
make -j 4
make inference_lib_dist
编译日志
-- Found Paddle host system: macosx, version: 10.15.6
-- Found Paddle host system's CPU: 4 cores
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- The C compiler identification is AppleClang 11.0.3.11030032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++, version: AppleClang 11.0.3.11030032
-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc, version: AppleClang 11.0.3.11030032
-- AR tools: /Library/Developer/CommandLineTools/usr/bin/ar
-- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test MMX_FOUND
-- Performing Test MMX_FOUND - Success
-- Performing Test SSE2_FOUND
-- Performing Test SSE2_FOUND - Success
-- Performing Test SSE3_FOUND
-- Performing Test SSE3_FOUND - Success
-- Performing Test AVX_FOUND
-- Performing Test AVX_FOUND - Success
-- Performing Test AVX2_FOUND
-- Performing Test AVX2_FOUND - Success
-- Performing Test AVX512F_FOUND
-- Performing Test AVX512F_FOUND - Failed
CMake Warning at CMakeLists.txt:134 (MESSAGE):
Disable NCCL when compiling without GPU. Force WITH_NCCL=OFF.
CMake Warning at cmake/third_party.cmake:134 (MESSAGE):
Mac is not supported with MKL in Paddle yet. Force WITH_MKL=OFF.
Call Stack (most recent call first):
CMakeLists.txt:161 (include)
-- Disable XBYAK in Windows and MacOS
-- Do not have AVX2 intrinsics and disabled MKL-DNN
-- BOOST_VERSION: 1.41.0, BOOST_URL: http://paddlepaddledeps.bj.bcebos.com/boost_1_41_0.tar.gz
-- warp-ctc library: /Users/zhoujun20/Desktop/code/opencv3/paddle/build/third_party/install/warpctc/lib/libwarpctc.dylib
-- Download dependence[cudaerror] from http://paddlepaddledeps.bj.bcebos.com/cudaErrorMessage.tar.gz
-- Found OpenBLAS (include: /usr/local/opt/openblas/include, library: /usr/local/opt/openblas/lib/libopenblas.dylib)
-- Found lapack in OpenBLAS (include: /usr/local/opt/openblas/include)
-- Protobuf protoc executable: /Users/zhoujun20/Desktop/code/opencv3/paddle/build/third_party/install/protobuf/bin/protoc
-- Protobuf-lite library: /Users/zhoujun20/Desktop/code/opencv3/paddle/build/third_party/install/protobuf/lib/libprotobuf-lite.a
-- Protobuf library: /Users/zhoujun20/Desktop/code/opencv3/paddle/build/third_party/install/protobuf/lib/libprotobuf.a
-- Protoc library: /Users/zhoujun20/Desktop/code/opencv3/paddle/build/third_party/install/protobuf/lib/libprotoc.a
-- Protobuf version: 3.1.0
-- Looking for UINT64_MAX
-- Looking for UINT64_MAX - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of pthread_spinlock_t
-- Check size of pthread_spinlock_t - failed
-- Check size of pthread_barrier_t
-- Check size of pthread_barrier_t - failed
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_deprecated_register
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_deprecated_register - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_deprecated_register
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_deprecated_register - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Failed
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds - Success
-- Paddle version is 1.8.4
CMake Warning at CMakeLists.txt:224 (message):
On inference mode, will take place some specific optimization. Turn on the
ON_INFER flag when building inference_lib only.
-- commit: 1e01335e19
-- branch: HEAD
-- Configuring done
~/Desktop/code/opencv3/paddle/inference/third_party/install 路径下文件 ~/Desktop/code/opencv3/paddle/build/third_party 路径下文件
如何复现 https://github.com/PaddlePaddle/PaddleOCR/blob/develop/deploy/cpp_infer/readme.md