PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.28k stars 7.82k forks source link

fastDeploy Python编译安装失败 #9587

Closed kerry-weic closed 1 year ago

kerry-weic commented 1 year ago

看报错是因为g++版本太低,但是我后面重新安装g++但视乎没有生效,重新编译前已尝试删除setuptools-cmake-build文件夹。参考文档:https://github.com/PaddlePaddle/FastDeploy/blob/develop/docs/cn/build_and_install/gpu.md#python%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85

Decompress file /home/ocr/FastDeploy/python/.setuptools-cmake-build/patchelf-0.15.0-x86_64.tar.gz ... -- Use the default onnxruntime lib. The ONNXRuntime path: /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/install/onnxruntime Decompress file /home/ocr/FastDeploy/python/.setuptools-cmake-build/openvino-linux-x64-20230302.tgz ... -- Could NOT find TBB (missing: TBB_DIR) OPENVINO_LIBS = /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/install/openvino/runtime/lib/libopenvino.so;/home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/install/openvino/runtime/3rdparty/omp/lib/libiomp5.so -- CUDA compiler: /usr/local/cuda-11.7/bin/nvcc, version: NVIDIA 11.7.99 Using New Release Strategy - All Arches Packge -- CUDA detected: 11.7.99 -- NVCC_FLAGS_EXTRA: -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -- Copying /home/ocr/pkg/TensorRT-8.4.3.1/lib to /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/install/tensorrt/lib ... -- result:0 out: -- Use the default OpenCV lib from: https://bj.bcebos.com/paddle2onnx/libs/opencv-linux-x64-3.4.16.tgz Decompress file /home/ocr/FastDeploy/python/.setuptools-cmake-build/opencv-linux-x64-3.4.16.tgz ... FASTTOKENIZER_COMPILE_LIB = /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/install/fast_tokenizer/lib/libcore_tokenizers.so Decompress file /home/ocr/FastDeploy/python/.setuptools-cmake-build/protobuf-linux-3.16.0.tgz ... Generated: /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx_paddle2onnx-ml.proto Generated: /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx-operators_paddle2onnx-ml.proto Generated: /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_party/onnx/onnx/onnx-data_paddle2onnx.proto -- -- **** Summary **** -- CMake version : 3.18.0 -- CMake command : /home/ocr/pkg/cmake-3.18.0-Linux-x86_64/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 4.8.5 -- CXX flags : -Wno-format -g0 -O3 -Wnon-virtual-dtor -- Build type : Release -- Compile definitions : _GLIBCXX_USE_CXX11_ABI=1;FASTDEPLOY_LIB;CMAKE_BUILD_TYPE=Release;ENABLE_ORT_BACKEND;ENABLE_PADDLE_BACKEND;ENABLE_OPENVINO_BACKEND;WITH_GPU;ENABLE_NVJPEG;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_TEXT;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESPACE=paddle2onnx;__STDC_FORMAT_MACROS -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /usr/local -- CMAKE_MODULE_PATH : -- -- ONNX version : 1.11.0 -- ONNX NAMESPACE : paddle2onnx -- ONNX_USE_LITE_PROTO : OFF -- USE_PROTOBUF_SHARED_LIBS : OFF -- Protobuf_USE_STATIC_LIBS : ON -- ONNX_DISABLE_EXCEPTIONS : OFF -- ONNX_WERROR : OFF -- ONNX_BUILD_TESTS : OFF -- ONNX_BUILD_BENCHMARKS : OFF -- ONNXIFI_DUMMY_BACKEND : OFF -- ONNXIFI_ENABLE_EXT : OFF -- -- Protobuf compiler : /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/protobuf/bin/protoc -- Protobuf includes : /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/protobuf/include -- Protobuf libraries : /home/ocr/FastDeploy/python/.setuptools-cmake-build/third_libs/protobuf/lib/libprotobuf.a -- BUILD_ONNX_PYTHON : OFF -- -- *****FastDeploy Building Summary** -- CMake version : 3.18.0 -- CMake command : /home/ocr/pkg/cmake-3.18.0-Linux-x86_64/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 4.8.5 -- CXX flags : -Wno-format -g0 -O3 -- EXE linker flags : -- Shared linker flags : -- Build type : Release -- Compile definitions : _GLIBCXX_USE_CXX11_ABI=1;FASTDEPLOY_LIB;CMAKE_BUILD_TYPE=Release;ENABLE_ORT_BACKEND;ENABLE_PADDLE_BACKEND;ENABLE_OPENVINO_BACKEND;WITH_GPU;ENABLE_NVJPEG;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_TEXT;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESPACE=paddle2onnx -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /usr/local -- CMAKE_MODULE_PATH : -- -- FastDeploy version : 0.0.0 -- ENABLE_ORT_BACKEND : ON -- ENABLE_RKNPU2_BACKEND : OFF -- ENABLE_SOPHGO_BACKEND : OFF -- ENABLE_PADDLE_BACKEND : ON -- ENABLE_LITE_BACKEND : OFF -- ENABLE_POROS_BACKEND : OFF -- ENABLE_TRT_BACKEND : ON -- ENABLE_OPENVINO_BACKEND : ON -- ENABLE_BENCHMARK : OFF -- ENABLE_VISION : ON -- ENABLE_TEXT : ON -- ENABLE_ENCRYPTION : OFF -- ENABLE_FLYCV : OFF -- ENABLE_CVCUDA : OFF -- WITH_GPU : ON -- WITH_IPU : OFF -- WITH_TESTING : OFF -- WITH_ASCEND : OFF -- WITH_DIRECTML : OFF -- WITH_TIMVX : OFF -- WITH_KUNLUNXIN : OFF -- WITH_CAPI : OFF -- WITH_CSHARPAPI : OFF -- ONNXRuntime version : 1.12.0 -- Paddle Inference version : 2.4-dev7 -- OpenVINO version : dev.2023.03.2 -- CUDA_DIRECTORY : /usr/local/cuda-11.7 -- TRT_DRECTORY : /home/ocr/pkg/TensorRT-8.4.3.1 -- Python executable : /usr/local/bin/python3 -- Python includes : /usr/local/include/python3.8 CMake Error at CMakeLists.txt:718 (message): [ERROR] FastDeploy require g++ version >= 5.4.0, but now your g++ version is 4.8.5, this may cause failure! Use -DCMAKE_CXX_COMPILER to define path of your compiler.

-- Configuring incomplete, errors occurred! See also "/home/ocr/FastDeploy/python/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log". See also "/home/ocr/FastDeploy/python/.setuptools-cmake-build/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "setup.py", line 417, in setuptools.setup( File "/usr/local/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "setup.py", line 280, in run self.run_command('cmake_build') File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "setup.py", line 266, in run subprocess.check_call(cmake_args) File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/ocr/pkg/cmake-3.18.0-Linux-x86_64/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/local/include/python3.8', '-DPYTHON_EXECUTABLE=/usr/local/bin/python3', '-DBUILD_FASTDEPLOY_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=paddle2onnx', '-DPY_EXT_SUFFIX=.cpython-38-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DENABLE_RKNPU2_BACKEND=OFF', '-DENABLE_SOPHGO_BACKEND=OFF', '-DWITH_ASCEND=OFF', '-DENABLE_ORT_BACKEND=ON', '-DENABLE_OPENVINO_BACKEND=ON', '-DENABLE_PADDLE_BACKEND=ON', '-DENABLE_POROS_BACKEND=OFF', '-DENABLE_TRT_BACKEND=ON', '-DENABLE_LITE_BACKEND=OFF', '-DPADDLELITE_URL=OFF', '-DENABLE_VISION=ON', '-DENABLE_ENCRYPTION=OFF', '-DENABLE_FLYCV=OFF', '-DENABLE_CVCUDA=OFF', '-DENABLE_TEXT=ON', '-DENABLE_BENCHMARK=OFF', '-DWITH_GPU=ON', '-DWITH_IPU=OFF', '-DWITH_KUNLUNXIN=OFF', '-DBUILD_ON_JETSON=OFF', '-DTRT_DIRECTORY=/home/ocr/pkg/TensorRT-8.4.3.1', '-DCUDA_DIRECTORY=/usr/local/cuda-11.7', '-DLIBRARY_NAME=fastdeploy', '-DPY_LIBRARY_NAME=fastdeploy_main', '-DOPENCV_DIRECTORY=', '-DORT_DIRECTORY=', '-DPADDLEINFERENCE_DIRECTORY=', '-DRKNN2_TARGET_SOC=', '/home/ocr/FastDeploy']' returned non-zero exit status 1.

kerry-weic commented 1 year ago

再次重新安装gcc问题已解决