Paddle CMake for a Unix platform that does not have -lrt

j5fpnvbx  于 2021-11-30  发布在  Java
关注(0)|答案(2)|浏览(458)
  • 标题:Mac编译错误 library not found for -lrt
  • 版本、环境信息:

   1)PaddlePaddle版本:https://paddle-inference-lib.bj.bcebos.com/mac/2.1.1/cpu_avx_openblas/paddle_inference_install_dir.tgz
   2)CPU:Inter i7
   3)GPU:无,
   4)系统环境:
Paddle version: 2.1.2
Paddle With CUDA: False
OS: macOs 11.5.2
Python version: 3.8.12
CUDA version: None
cuDNN version: None
Nvidia driver version: None

  • 安装方式信息:

cmake命令,编译命令
OPENCV_DIR=/usr/local/Cellar/opencv@3/3.4.14_3
LIB_DIR=/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference
CUDA_LIB_DIR=your_cuda_lib_dir
CUDNN_LIB_DIR=your_cudnn_lib_dir

CMAKE_TOOLCHAIN_FILE=/Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake
CMAKE_C_COMPILER=/usr/local/bin/gcc-11
CMAKE_CXX_COMPILER=/usr/local/bin/g++-11

BUILD_DIR=build
rm -rf ${BUILD_DIR}
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}

cmake ..
-DPADDLE_LIB=${LIB_DIR}
-DWITH_MKL=OFF
-DWITH_GPU=OFF
-DWITH_STATIC_LIB=OFF
-DWITH_TENSORRT=OFF
-DOPENCV_DIR=${OPENCV_DIR}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \

make -j

问题:

ESaIcEEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN2cv4globENS_6StringERSt6vectorIS0_SaIS0_EEb", referenced from:
main in main.cpp.o
"__ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE", referenced from:
__ZN9PaddleOCR7Utility15VisualizeBboxesERKN2cv3MatERKSt6vectorIS5_IS5_IiSaIiEESaIS7_EESaIS9_EE in utility.cpp.o
"
ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB", referenced from:
__Z41__static_initialization_and_destruction_0ii in main.cpp.o
"__ZN6paddle14AnalysisConfig22SetTRTDynamicShapeInfoESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEESH_SH_b", referenced from:
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"_ZN6paddle14AnalysisConfig8SetModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8", referenced from:
__ZN9PaddleOCR10Classifier9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm", referenced from:
__ZN6google26ProgramInvocationShortNameEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
"__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
_ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE21__push_back_slow_pathIKS6_EEvRT in libgflags.a(gflags.cc.o)
ZNSt3__16vectorIN6google19CommandLineFlagInfoENS_9allocatorIS2_EEE21__push_back_slow_pathIKS2_EEvRT in libgflags.a(gflags.cc.o)
"__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_112FlagRegistry14FindFlagLockedEPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
...
"__ZNKSt3__16locale9use_facetERNS0_2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNKSt3__18ios_base6getlocEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_118ReadFileIntoStringEPKc in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google11BoolFromEnvEPKcb in libgflags.a(gflags.cc.o)
__ZN6google12Int32FromEnvEPKci in libgflags.a(gflags.cc.o)
__ZN6google13Uint32FromEnvEPKcj in libgflags.a(gflags.cc.o)
__ZN6google12Int64FromEnvEPKcx in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm", referenced from:
ZN6google12_GLOBAL__N_112FlagRegistry19SplitArgumentLockedEPKcPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_SB in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm", referenced from:
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES6_NS_4lessIS6_EENS4_INS_4pairIKS6_S6_EEEEEixERSA in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_113ParseFlagListEPKcPNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev", referenced from:
__GLOBAL__sub_I_gflags.cc in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google15SetUsageMessageERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google16SetVersionStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google20GetCommandLineOptionEPKcPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google28SetCommandLineOptionWithModeEPKcS1_NS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
...
"
ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
"__ZNSt3__14cerrE", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__15ctypeIcE2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__16localeD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base5clearEj", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl -lrt -lgomp -lz -lm -lpthread

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:233 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/LI/Documents/Project/OCR/OCR_C/build
Scanning dependencies of target ppocr
[ 25%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o
[ 37%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o
[ 62%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o
[100%] Linking CXX executable ppocr
ld: warning: directory not found for option '-L/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/zlib/lib'
ld: library not found for -lrt
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBRT
linked by target "ppocr" in directory /Users/LI/Documents/Project/OCR/OCR_C

CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl  -lgomp -lz -lm -lpthread
LIBRT-NOTFOUND

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:235 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Scanning dependencies of target ppocr
[ 12%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o
[ 62%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o
[ 75%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o
[100%] Linking CXX executable ppocr
ld: warning: directory not found for option '-L/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/zlib/lib'
ld: library not found for -lLIBRT-NOTFOUND
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2
➜ OCR_C git:(master) ✗ sh start.sh
start.sh: line 1: ./build/ppocr: No such file or directory
➜ OCR_C git:(master) ✗ sh start.sh
start.sh: line 1: ./build/ppocr: No such file or directory
➜ OCR_C git:(master) ✗ sh start.sh
start.sh: line 1: ./build/ppocr: No such file or directory
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl  -lgomp -lz -lm -lpthread

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:235 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/LI/Documents/Project/OCR/OCR_C/build
Scanning dependencies of target ppocr
[ 12%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
[ 25%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o
[ 62%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o
[ 75%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o
[ 75%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o
[100%] Linking CXX executable ppocr
ld: warning: directory not found for option '-L/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/zlib/lib'
Undefined symbols for architecture x86_64:
"__ZN12paddle_infer6Tensor7ReshapeERKSt6vectorIiSaIiEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor13GetInputNamesB5cxx11Ev", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor14GetInputHandleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor14GetOutputNamesB5cxx11Ev", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor15GetOutputHandleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN2cv4globENS_6StringERSt6vectorIS0_SaIS0_EEb", referenced from:
main in main.cpp.o
"__ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE", referenced from:
__ZN9PaddleOCR7Utility15VisualizeBboxesERKN2cv3MatERKSt6vectorIS5_IS5_IiSaIiEESaIS7_EESaIS9_EE in utility.cpp.o
"
ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB", referenced from:
__Z41__static_initialization_and_destruction_0ii in main.cpp.o
"__ZN6paddle14AnalysisConfig22SetTRTDynamicShapeInfoESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEESH_SH_b", referenced from:
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"_ZN6paddle14AnalysisConfig8SetModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8", referenced from:
__ZN9PaddleOCR10Classifier9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm", referenced from:
__ZN6google26ProgramInvocationShortNameEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
"__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
_ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE21__push_back_slow_pathIKS6_EEvRT in libgflags.a(gflags.cc.o)
ZNSt3__16vectorIN6google19CommandLineFlagInfoENS_9allocatorIS2_EEE21__push_back_slow_pathIKS2_EEvRT in libgflags.a(gflags.cc.o)
"__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_112FlagRegistry14FindFlagLockedEPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
...
"__ZNKSt3__16locale9use_facetERNS0_2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNKSt3__18ios_base6getlocEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_118ReadFileIntoStringEPKc in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google11BoolFromEnvEPKcb in libgflags.a(gflags.cc.o)
__ZN6google12Int32FromEnvEPKci in libgflags.a(gflags.cc.o)
__ZN6google13Uint32FromEnvEPKcj in libgflags.a(gflags.cc.o)
__ZN6google12Int64FromEnvEPKcx in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm", referenced from:
ZN6google12_GLOBAL__N_112FlagRegistry19SplitArgumentLockedEPKcPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_SB in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm", referenced from:
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES6_NS_4lessIS6_EENS4_INS_4pairIKS6_S6_EEEEEixERSA in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_113ParseFlagListEPKcPNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev", referenced from:
__GLOBAL__sub_I_gflags.cc in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google15SetUsageMessageERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google16SetVersionStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google20GetCommandLineOptionEPKcPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google28SetCommandLineOptionWithModeEPKcS1_NS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
...
"
ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
"__ZNSt3__14cerrE", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__15ctypeIcE2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__16localeD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base5clearEj", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl  -lgomp -lz -lm -lpthread

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:236 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/LI/Documents/Project/OCR/OCR_C/build
Scanning dependencies of target ppocr
[ 25%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o
[ 25%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o
[ 75%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o
[100%] Linking CXX executable ppocr
ld: warning: directory not found for option '-L/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/zlib/lib'
Undefined symbols for architecture x86_64:
"__ZN12paddle_infer6Tensor7ReshapeERKSt6vectorIiSaIiEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor13GetInputNamesB5cxx11Ev", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor14GetInputHandleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor14GetOutputNamesB5cxx11Ev", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN12paddle_infer9Predictor15GetOutputHandleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
__ZN9PaddleOCR10Classifier3RunERN2cv3MatE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector3RunERN2cv3MatERSt6vectorIS4_IS4_IiSaIiEESaIS6_EESaIS8_EEPS4_IdSaIdEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer3RunERN2cv3MatEPSt6vectorIdSaIdEE in ocr_rec.cpp.o
"__ZN2cv4globENS_6StringERSt6vectorIS0_SaIS0_EEb", referenced from:
main in main.cpp.o
"__ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE", referenced from:
__ZN9PaddleOCR7Utility15VisualizeBboxesERKN2cv3MatERKSt6vectorIS5_IS5_IiSaIiEESaIS7_EESaIS9_EE in utility.cpp.o
"
ZN6google14FlagRegistererC1INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPKcS9_S9_PT_SB", referenced from:
__Z41__static_initialization_and_destruction_0ii in main.cpp.o
"__ZN6paddle14AnalysisConfig22SetTRTDynamicShapeInfoESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEESH_SH_b", referenced from:
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"_ZN6paddle14AnalysisConfig8SetModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8", referenced from:
__ZN9PaddleOCR10Classifier9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_cls.cpp.o
__ZN9PaddleOCR10DBDetector9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_det.cpp.o
__ZN9PaddleOCR14CRNNRecognizer9LoadModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ocr_rec.cpp.o
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5rfindEcm", referenced from:
__ZN6google26ProgramInvocationShortNameEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
"__ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7compareEmmPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
"__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
_ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE21__push_back_slow_pathIKS6_EEvRT in libgflags.a(gflags.cc.o)
ZNSt3__16vectorIN6google19CommandLineFlagInfoENS_9allocatorIS2_EEE21__push_back_slow_pathIKS2_EEvRT in libgflags.a(gflags.cc.o)
"__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_112FlagRegistry14FindFlagLockedEPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
...
"__ZNKSt3__16locale9use_facetERNS0_2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNKSt3__18ios_base6getlocEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm", referenced from:
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser30ProcessOptionsFromStringLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_118ReadFileIntoStringEPKc in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser12ReportErrorsEv in libgflags.a(gflags.cc.o)
__ZN6google11BoolFromEnvEPKcb in libgflags.a(gflags.cc.o)
__ZN6google12Int32FromEnvEPKci in libgflags.a(gflags.cc.o)
__ZN6google13Uint32FromEnvEPKcj in libgflags.a(gflags.cc.o)
__ZN6google12Int64FromEnvEPKcx in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm", referenced from:
ZN6google12_GLOBAL__N_112FlagRegistry19SplitArgumentLockedEPKcPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_SB in libgflags.a(gflags.cc.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm", referenced from:
__ZN6googleL31TheseCommandlineFlagsIntoStringERKNSt3__16vectorINS_19CommandLineFlagInfoENS0_9allocatorIS2_EEEE in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5", referenced from:
__ZN6google7SetArgvEiPPKc in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZNK6google12_GLOBAL__N_19FlagValue8ToStringEv in libgflags.a(gflags.cc.o)
ZNSt3__13mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES6_NS_4lessIS6_EENS4_INS_4pairIKS6_S6_EEEEEixERSA in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser21ProcessFlagfileLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser20ProcessFromenvLockedERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS_15FlagSettingModeEb in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_113ParseFlagListEPKcPNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE in libgflags.a(gflags.cc.o)
...
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev", referenced from:
__GLOBAL__sub_I_gflags.cc in libgflags.a(gflags.cc.o)
"
ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5", referenced from:
__ZN6google12_GLOBAL__N_115CommandLineFlag23FillCommandLineFlagInfoEPNS_19CommandLineFlagInfoE in libgflags.a(gflags.cc.o)
__ZN6google15SetUsageMessageERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google16SetVersionStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google20GetCommandLineOptionEPKcPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE in libgflags.a(gflags.cc.o)
__ZN6google28SetCommandLineOptionWithModeEPKcS1_NS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google12_GLOBAL__N_121CommandLineFlagParser25ProcessSingleOptionLockedEPNS0_15CommandLineFlagEPKcNS_15FlagSettingModeE in libgflags.a(gflags.cc.o)
__ZN6google13FlagSaverImpl16SaveFromRegistryEv in libgflags.a(gflags.cc.o)
...
"
ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEPKv", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
"__ZNSt3__14cerrE", referenced from:
__ZN6google12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE in libgflags.a(gflags.cc.o)
__ZN6googleL29ParseCommandLineFlagsInternalEPiPPPcbb in libgflags.a(gflags.cc.o)
"__ZNSt3__15ctypeIcE2idE", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__16localeD1Ev", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
"__ZNSt3__18ios_base5clearEj", referenced from:
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libgflags.a(gflags.cc.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBRT
linked by target "ppocr" in directory /Users/LI/Documents/Project/OCR/OCR_C

CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl -lrt -lgomp -lz -lm -lpthread
LIBRT-NOTFOUND

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:242 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Scanning dependencies of target ppocr
[ 37%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
➜ OCR_C git:(master) ✗ sh tools/build.sh
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-11
-- Check for working CXX compiler: /usr/local/bin/g++-11 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-11
-- Check for working C compiler: /usr/local/bin/gcc-11 - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenCV: /usr/local/Cellar/opencv@3/3.4.14_3 (found version "3.4.14")
cmake cxx flags -g -o3 -std=c++11
-- Found Git: /usr/local/bin/git (found version "2.33.0")
default cmake for auto_log, no need to compile
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBRT
linked by target "ppocr" in directory /Users/LI/Documents/Project/OCR/OCR_C

CMake Warning (dev) at /Users/LI/Documents/Project/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:536 (_add_executable):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to
cmake_minimum_required or cmake_policy(VERSION). This warning appears
because target "ppocr" links to some libraries for which the linker must
search:

glog, gflags, protobuf, z, xxhash, -ldl -lrt -lgomp -lz -lm -lpthread
LIBRT-NOTFOUND

and other libraries with known full path:

/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/openblas/lib/libopenblas.a
/usr/local/Cellar/opencv@3/3.4.14_3/lib/libopencv_stitching.3.4.14.dylib

CMake is adding directories in the second list to the linker search path in
case they are needed to find libraries from the first list (for backwards
compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
more information.
Call Stack (most recent call first):
CMakeLists.txt:242 (add_executable)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Scanning dependencies of target ppocr
[ 12%] Building CXX object CMakeFiles/ppocr.dir/src/main.cpp.o
[ 37%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_det.cpp.o
[ 37%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_cls.cpp.o
[ 50%] Building CXX object CMakeFiles/ppocr.dir/src/ocr_rec.cpp.o
[ 62%] Building CXX object CMakeFiles/ppocr.dir/src/postprocess_op.cpp.o
[ 75%] Building CXX object CMakeFiles/ppocr.dir/src/preprocess_op.cpp.o
[ 87%] Building CXX object CMakeFiles/ppocr.dir/src/utility.cpp.o
[100%] Linking CXX executable ppocr
ld: warning: directory not found for option '-L/Users/LI/Documents/Project/OCR/OCR_C/3rdparty/lib/paddle_inference/third_party/install/zlib/lib'
ld: library not found for -lrt
collect2: error: ld returned 1 exit status
make[2]:***[ppocr] Error 1
make[1]:***[CMakeFiles/ppocr.dir/all] Error 2
make:***[all] Error 2

nwlqm0z1

nwlqm0z11#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

vlju58qv

vlju58qv2#

您好,建议使用paddle的官方镜像编译paddle。

相关问题