Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake 编译过程中提示缺少 libphi.a #523

Open
wsdxyz opened this issue Jun 28, 2024 · 3 comments
Open

cmake 编译过程中提示缺少 libphi.a #523

wsdxyz opened this issue Jun 28, 2024 · 3 comments
Assignees

Comments

@wsdxyz
Copy link

wsdxyz commented Jun 28, 2024

描述:jetson nano 下使用make从源码编译,cmake 构建成功后,使用make -j4编译,提示 缺少 libphi.a文件;
问题: 原因,如何解决?
日志如下:,环境 如下,cmakelists.txt 见附件
27

[ 11%] Building CUDA object paddle/phi/CMakeFiles/phi.dir/kernels/sparse/gpu/softmax_kernel.cu.o
[ 11%] Building CXX object paddle/phi/CMakeFiles/phi.dir/kernels/cpu/activation_grad_kernel.cc.o
[ 11%] Building CXX object paddle/phi/CMakeFiles/phi.dir/kernels/cpu/warprnnt_kernel.cc.o
[ 11%] Linking CXX static library libphi.a
[ 42%] Built target phi
[ 42%] Built target string_helper
[ 42%] Built target pretty_log
make[2]: *** No rule to make target 'paddle/phi/libphi.a', needed by 'paddle/phi/kernels/funcs/jit/jit_ker nel_benchmark'. Stop.
CMakeFiles/Makefile2:5471: recipe for target 'paddle/phi/kernels/funcs/jit/CMakeFiles/jit_kernel_benchmark .dir/all' failed
make[1]: *** [paddle/phi/kernels/funcs/jit/CMakeFiles/jit_kernel_benchmark.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 42%] Built target pybind_util
make[2]: *** No rule to make target 'paddle/phi/libphi.a', needed by 'paddle/phi/tools/print_phi_kernels'. Stop.
CMakeFiles/Makefile2:5510: recipe for target 'paddle/phi/tools/CMakeFiles/print_phi_kernels.dir/all' faile d
make[1]: *** [paddle/phi/tools/CMakeFiles/print_phi_kernels.dir/all] Error 2
[ 42%] Built target enforce
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

更多细节:
硬件环境:
cuda 10.2.89
cudnn 8.2.1
jetpack 4.6.4
tensorRT 8.x (32G 的是8.2.1,单独安装见3.1)
sudo find / -name "libnvinfer.so" /usr/lib/aarch64-linux-gnu/libnvinfer.so
ubuntu 18.4 LTS
GPU架构 maxwell (Jetson Nano | NVIDIA Developer)
python 3.9.11
paddlepaddle 2.5.0
paddleDetection 2.6.1
gcc 7.5 --> 转 8.2
gfortran :
cmake 3.10 ->3.16 /usr/local/ --> 3.19.8 (必须,见4.1)
nvidia-docker Docker version 20.10.21, build 20.10.21-0ubuntu1~18.04.3
nccl= 无

CMakeLists.txt 见附件
CMakeLists.txt

@zoooo0820
Copy link

你好,
可以先在 https://www.paddlepaddle.org.cn/inference/v2.6/guides/install/download_lib.html 这里获取jetson对应的预测库;
此外,可以参考 https://github.com/PaddlePaddle/Paddle-Inference-Demo/tree/master/c%2B%2B/gpu/resnet50 实现编译和部署

@vivienfanghuagood
Copy link
Collaborator

你好,请切换Paddle分支到develop之后再编译试试呢。

@wsdxyz
Copy link
Author

wsdxyz commented Jul 13, 2024

谢谢你们的告知,我先尝试下另一个jetson nano环境下编译paddlepaddle,之后再反馈,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants