PaddlePaddle / PaddlePaddle/FastDeploy

Jetson执行目标检测模型PPYOLOE测试代码报错libfastdeploy.so: undefined reference to `paddle2onnx::Export

Open
#1,922 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description


温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度


环境

  • 【FastDeploy版本】: 说明具体的版本,如fastdeploy-linux-gpu-1.0.6
  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
  • 【系统平台】: Linux x64(Ubuntu 18.04)
  • 【硬件】: Jetson 4.6.1, CUDA 10.2 CUDNN 8.2.1.32
  • 【编译语言】: C++

C++部署
确认开发环境已准备FastDeploy C++部署库,参考FastDeploy安装安装预编译的FastDeploy,或根据自己需求进行编译安装。

本文档以PaddleDetection目标检测模型PPYOLOE为例展示CPU上的推理示例:
假设当前目录已经准备好infer_demo.cc和CMakeLists.txt两个文件,即可进行编译

Linux & Mac
打开命令行终端,进入infer_demo.cc和CmakeLists.txt所在的目录,执行如下命令

mkdir build & cd build
cmake ..
make -j
执行make -j时候,报错
(fastdeploy) nvidia@nx:~/FastDeploy/test_demo/build$ make -j
[ 50%] Building CXX object CMakeFiles/infer_demo.dir/infer_demo.cc.o
[100%] Linking CXX executable infer_demo
/home/nvidia/FastDeploy/build/installed_fastdeploy/lib/libfastdeploy.so: undefined reference to paddle2onnx::Export(void const*, long, void const*, long, char**, int*, int, bool, bool, bool, bool, bool, paddle2onnx::CustomOp*, int, char const*, char**, int*, char const*, bool*, bool)' /home/nvidia/FastDeploy/build/installed_fastdeploy/lib/libfastdeploy.so: undefined reference to paddle2onnx::ConvertFP32ToFP16(char const*, int, char**, int*)'
collect2: error: ld returned 1 exit status
CMakeFiles/infer_demo.dir/build.make:119: recipe for target 'infer_demo' failed
make[2]: *** [infer_demo] Error 1
CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/infer_demo.dir/all' failed
make[1]: *** [CMakeFiles/infer_demo.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with infer_demo.cc and CMakeLists.txt, then reproduce the failure using cmake .. and make -j on the Jetson environment described. Inspect how libfastdeploy.so is linked and how the paddle2onnx symbols are supplied. Done means the PPYOLOE test executable links successfully without the reported undefined references.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, linux
Domain
build-system, embedded-iot, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.