PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
3k stars 465 forks source link

Jetson Xavier NX编译fastdeploy(C++方式)出现的Makefile:155: recipe for target 'all' failed错误? #1721

Closed MrMzl closed 1 year ago

MrMzl commented 1 year ago

运行日志如下: racobit@ubuntu:/code/FastDeploy-develop/build$ cmake .. -DBUILD_ON_JETSON=ON -DENABLE_VISION=ON -DENABLE_PADDLE_BACKEND=ON -DPADDLEINFERENCE_DIRECTORY=/code/paddle_inference_install_dir -DCMAKE_INSTALL_PREFIX=${PWD}/installed_fastdeploy -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done Downloading file from https://bj.bcebos.com/fastdeploy/third_libs/patchelf-0.15.0-aarch64.tar.gz to /code/FastDeploy-develop/build/patchelf-0.15.0-aarch64.tar.gz ... -- [download 1% complete] -- [download 6% complete] -- [download 11% complete] -- [download 16% complete] -- [download 21% complete] -- [download 27% complete] -- [download 32% complete] -- [download 37% complete] -- [download 42% complete] -- [download 47% complete] -- [download 52% complete] -- [download 57% complete] -- [download 63% complete] -- [download 68% complete] -- [download 73% complete] -- [download 78% complete] -- [download 83% complete] -- [download 88% complete] -- [download 93% complete] -- [download 99% complete] -- [download 100% complete] Decompress file /code/FastDeploy-develop/build/patchelf-0.15.0-aarch64.tar.gz ... -- Use the default onnxruntime lib. The ONNXRuntime path: /code/FastDeploy-develop/build/third_libs/install/onnxruntime Cannot compile with onnxruntime-gpu while in linux-aarch64 platform, fallback to onnxruntime-cpu CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/ExternalProject.cmake:3074 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): /usr/local/share/cmake-3.25/Modules/ExternalProject.cmake:4184 (_ep_add_download_command) cmake/onnxruntime.cmake:104 (ExternalProject_Add) CMakeLists.txt:217 (include) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Python: /usr/bin/python3.6 (found version "3.6.9") found components: Interpreter Development Development.Module Development.Embed -- Copying /code/paddle_inference_install_dir to /code/FastDeploy-develop/build/third_libs/install/paddle_inference ... -- The CUDA compiler identification is NVIDIA 10.2.300 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: /usr/local/cuda-10.2/bin/nvcc - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- CUDA compiler: /usr/local/cuda-10.2/bin/nvcc, version: NVIDIA 10.2.300 -- CUDA detected: 10.2.300 -- NVCC_FLAGS_EXTRA: -gencode arch=compute_53,code=sm_53 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_72,code=sm_72 -- Use the opencv lib specified by user. The OpenCV path: /usr/lib/aarch64-linux-gnu/cmake/opencv4/ -- Found OpenCV: /usr (found version "4.1.1") Downloading file from https://bj.bcebos.com/fastdeploy/third_libs/protobuf-linux-aarch64-3.16.0.tgz to /code/FastDeploy-develop/build/protobuf-linux-3.16.0.tgz ... -- [download 0% complete] -- [download 1% complete] -- [download 2% complete] -- [download 3% complete] -- [download 4% complete] -- [download 5% complete] -- [download 6% complete] -- [download 7% complete] -- [download 8% complete] -- [download 9% complete] -- [download 10% complete] -- [download 11% complete] -- [download 12% complete] -- [download 13% complete] -- [download 14% complete] -- [download 15% complete] -- [download 16% complete] -- [download 17% complete] -- [download 18% complete] -- [download 19% complete] -- [download 20% complete] -- [download 21% complete] -- [download 22% complete] -- [download 23% complete] -- [download 24% complete] -- [download 25% complete] -- [download 26% complete] -- [download 27% complete] -- [download 28% complete] -- [download 29% complete] -- [download 30% complete] -- [download 31% complete] -- [download 32% complete] -- [download 33% complete] -- [download 34% complete] -- [download 35% complete] -- [download 36% complete] -- [download 37% complete] -- [download 38% complete] -- [download 39% complete] -- [download 40% complete] -- [download 41% complete] -- [download 42% complete] -- [download 43% complete] -- [download 44% complete] -- [download 45% complete] -- [download 46% complete] -- [download 47% complete] -- [download 48% complete] -- [download 49% complete] -- [download 50% complete] -- [download 51% complete] -- [download 52% complete] -- [download 53% complete] -- [download 54% complete] -- [download 55% complete] -- [download 56% complete] -- [download 57% complete] -- [download 58% complete] -- [download 59% complete] -- [download 60% complete] -- [download 61% complete] -- [download 62% complete] -- [download 63% complete] -- [download 64% complete] -- [download 65% complete] -- [download 66% complete] -- [download 67% complete] -- [download 68% complete] -- [download 69% complete] -- [download 70% complete] -- [download 71% complete] -- [download 72% complete] -- [download 73% complete] -- [download 74% complete] -- [download 75% complete] -- [download 76% complete] -- [download 77% complete] -- [download 78% complete] -- [download 79% complete] -- [download 80% complete] -- [download 81% complete] -- [download 82% complete] -- [download 83% complete] -- [download 84% complete] -- [download 85% complete] -- [download 86% complete] -- [download 87% complete] -- [download 88% complete] -- [download 89% complete] -- [download 90% complete] -- [download 91% complete] -- [download 92% complete] -- [download 93% complete] -- [download 94% complete] -- [download 95% complete] -- [download 96% complete] -- [download 97% complete] -- [download 98% complete] -- [download 99% complete] -- [download 100% complete] Decompress file /code/FastDeploy-develop/build/protobuf-linux-3.16.0.tgz ... -- Build type not set - defaulting to Release -- Found PythonInterp: /usr/bin/python (found version "2.7.17") -- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so (found version "2.7.17") -- Found Protobuf: /code/FastDeploy-develop/build/third_libs/protobuf/lib/libprotobuf.a (found version "3.16.0") Generated: /code/FastDeploy-develop/build/third_party/onnx/onnx/onnx_paddle2onnx-ml.proto Generated: /code/FastDeploy-develop/build/third_party/onnx/onnx/onnx-operators_paddle2onnx-ml.proto Generated: /code/FastDeploy-develop/build/third_party/onnx/onnx/onnx-data_paddle2onnx.proto -- -- **** Summary **** -- CMake version : 3.25.3 -- CMake command : /usr/local/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 7.5.0 -- 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;WITH_GPU;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESPACE=paddle2onnx;__STDC_FORMAT_MACROS -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /code/FastDeploy-develop/build/installed_fastdeploy -- 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 : /code/FastDeploy-develop/build/third_libs/protobuf/bin/protoc -- Protobuf includes : /code/FastDeploy-develop/build/third_libs/protobuf/include -- Protobuf libraries : /code/FastDeploy-develop/build/third_libs/protobuf/lib/libprotobuf.a -- BUILD_ONNX_PYTHON : OFF -- -- ***FastDeploy Building Summary** -- CMake version : 3.25.3 -- CMake command : /usr/local/bin/cmake -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 7.5.0 -- 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;WITH_GPU;ENABLE_TRT_BACKEND;ENABLE_VISION;ENABLE_PADDLE2ONNX;MAX_ONNX_OPSET_VERSION=16;PADDLE2ONNX_LIB;ONNX_NAMESPACE=paddle2onnx -- CMAKE_PREFIX_PATH : -- CMAKE_INSTALL_PREFIX : /code/FastDeploy-develop/build/installed_fastdeploy -- 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 : OFF -- ENABLE_BENCHMARK : OFF -- ENABLE_VISION : ON -- ENABLE_TEXT : OFF -- 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 : -- CUDA_DIRECTORY : /usr/local/cuda -- TRT_DRECTORY : -- Configuring done -- Generating done -- Build files have been written to: /code/FastDeploy-develop/build racobit@ubuntu:/code/FastDeploy-develop/build$ make -j6 [ 0%] Running cpp protocol buffer compiler on p2o_paddle.proto [ 0%] Running gen_proto.py on onnx/onnx.in.proto [ 0%] Creating directories for 'extern_onnxruntime' [ 0%] Building C object third_party/onnx/CMakeFiles/onnxifi_loader.dir/onnx/onnxifi_loader.c.o [ 1%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilder.cpp.o [ 2%] Building C object third_party/onnx/CMakeFiles/onnxifi_dummy.dir/onnx/onnxifi_dummy.c.o File "/code/FastDeploy-develop/third_party/onnx/onnx/gen_proto.py", line 36 def process_ifs(lines: Iterable[Text], onnx_ml: bool) -> Iterable[Text]: ^ SyntaxError: invalid syntax [ 2%] Performing download step (download, verify and extract) for 'extern_onnxruntime' third_party/onnx/CMakeFiles/gen_onnx_proto.dir/build.make:80: recipe for target 'third_party/onnx/onnx/onnx_paddle2onnx-ml.proto' failed make[2]: * [third_party/onnx/onnx/onnx_paddle2onnx-ml.proto] Error 1 CMakeFiles/Makefile2:402: recipe for target 'third_party/onnx/CMakeFiles/gen_onnx_proto.dir/all' failed make[1]: [third_party/onnx/CMakeFiles/gen_onnx_proto.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... -- Downloading... dst='/code/FastDeploy-develop/build/third_libs/onnxruntime/src/onnxruntime-linux-aarch64-1.12.0.tgz' timeout='none' inactivity timeout='none' -- Using src='https://bj.bcebos.com/paddle2onnx/libs/onnxruntime-linux-aarch64-1.12.0.tgz' [ 2%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/contrib/graphbuilderadapter.cpp.o [ 2%] Building CXX object paddle2onnx/proto/CMakeFiles/p2o_paddle_proto.dir/p2o_paddle.pb.cc.o [ 2%] Linking C static library libonnxifi_loader.a [ 2%] Built target onnxifi_loader [ 2%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/binary.cpp.o [ 2%] Linking C shared library libonnxifi_dummy.so [ 2%] Built target onnxifi_dummy [ 2%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/convert.cpp.o [ 3%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/depthguard.cpp.o [ 3%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/directives.cpp.o [ 3%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emit.cpp.o -- Downloading... done -- extracting... src='/code/FastDeploy-develop/build/third_libs/onnxruntime/src/onnxruntime-linux-aarch64-1.12.0.tgz' dst='/code/FastDeploy-develop/build/third_libs/onnxruntime/src/extern_onnxruntime' -- extracting... [tar xfz] -- extracting... [analysis] -- extracting... [rename] -- extracting... [clean up] -- extracting... done [ 3%] No update step for 'extern_onnxruntime' [ 3%] No patch step for 'extern_onnxruntime' [ 3%] No configure step for 'extern_onnxruntime' [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitfromevents.cpp.o [ 4%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitter.cpp.o [ 4%] No build step for 'extern_onnxruntime' [ 5%] Performing install step for 'extern_onnxruntime' [ 5%] Completed 'extern_onnxruntime' [ 5%] Built target extern_onnxruntime [ 5%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitterstate.cpp.o [ 5%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o [ 5%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/exceptions.cpp.o [ 6%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/exp.cpp.o [ 6%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/memory.cpp.o [ 6%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/node.cpp.o [ 6%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/node_data.cpp.o [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/nodebuilder.cpp.o [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/nodeevents.cpp.o [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/null.cpp.o [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/ostream_wrapper.cpp.o [ 7%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parse.cpp.o [ 8%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parser.cpp.o [ 8%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/regex_yaml.cpp.o [ 8%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scanner.cpp.o [ 8%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scanscalar.cpp.o [ 9%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scantag.cpp.o [ 9%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/scantoken.cpp.o [ 9%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/simplekey.cpp.o [ 9%] Linking CXX static library libp2o_paddle_proto.a [ 9%] Built target p2o_paddle_proto [ 9%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/singledocparser.cpp.o [ 10%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/stream.cpp.o [ 10%] Building CXX object third_party/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/tag.cpp.o [ 10%] Linking CXX static library libyaml-cpp.a [ 10%] Built target yaml-cpp Makefile:155: recipe for target 'all' failed make: *** [all] Error 2

DefTruth commented 1 year ago

需要升级python到python3

MrMzl commented 1 year ago

收到,感谢回复,可以正常编译