Skip to content

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

@wsdxyz

Description

@wsdxyz

描述: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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions