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

Rebuild crnn torch2trt 的过程中报错 #2

Open
apple2333cream opened this issue Apr 16, 2021 · 1 comment
Open

Rebuild crnn torch2trt 的过程中报错 #2

apple2333cream opened this issue Apr 16, 2021 · 1 comment

Comments

@apple2333cream
Copy link

我试着重新make的时候报了这样的错,大佬知道是哪里的错误吗?

wzp@i-5DB1BBD8:~/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/build$ make
Scanning dependencies of target crnn
[ 50%] Building CXX object CMakeFiles/crnn.dir/crnn.cpp.o
/home/wzp/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/crnn.cpp:5:21: fatal error: NvInfer.h: No such file or directory
#include "NvInfer.h"
^
compilation terminated.
CMakeFiles/crnn.dir/build.make:62: recipe for target 'CMakeFiles/crnn.dir/crnn.cpp.o' failed
make[2]: *** [CMakeFiles/crnn.dir/crnn.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/crnn.dir/all' failed
make[1]: *** [CMakeFiles/crnn.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

image

@ygfrancois
Copy link
Owner

我试着重新make的时候报了这样的错,大佬知道是哪里的错误吗?

wzp@i-5DB1BBD8:~/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/build$ make
Scanning dependencies of target crnn
[ 50%] Building CXX object CMakeFiles/crnn.dir/crnn.cpp.o
/home/wzp/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/crnn.cpp:5:21: fatal error: NvInfer.h: No such file or directory
#include "NvInfer.h"
^
compilation terminated.
CMakeFiles/crnn.dir/build.make:62: recipe for target 'CMakeFiles/crnn.dir/crnn.cpp.o' failed
make[2]: *** [CMakeFiles/crnn.dir/crnn.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/crnn.dir/all' failed
make[1]: *** [CMakeFiles/crnn.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

image

这个问题是因为没有找到NvInfer.h。
tensorrt安装成功了吗?按照官网的说明安装,如果是tar安装的,记得设置环境变量, 如果还是不行,大概率你能找到NvInfer.h,只是编译的时候系统找不到, 可以考虑粗暴办法手动把NvInfer.h copy到系统include的地方试试
/usr/include/x86_64-linux-gnu/NvInfer.h
/usr/include/x86_64-linux-gnu/NvInferRuntime.h
/usr/include/x86_64-linux-gnu/NvInferRuntimeCommon.h
/usr/include/x86_64-linux-gnu/NvInferVersion.h
/usr/include/x86_64-linux-gnu/NvUtils.h

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

2 participants