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

A problem when make #18

Open
fujingling opened this issue May 24, 2018 · 8 comments
Open

A problem when make #18

fujingling opened this issue May 24, 2018 · 8 comments

Comments

@fujingling
Copy link

I got a error when I make the project, who knows how can I solve it?
cuda version :8.0
TensorRT :3.0.4
env: Ubantu

The following is the error information:
`project/tf_to_trt_image_classification-master/examples/classify_image/classify_image.cu:10:21: fatal error: NvInfer.h: No such file or directory
#include <NvInfer.h>
^
compilation terminated.
CMake Error at classify_image_generated_classify_image.cu.o.cmake:207 (message):
Error generating
/project/tf_to_trt_image_classification-master/build/examples/classify_image/CMakeFiles/classify_image.dir//./classify_image_generated_classify_image.cu.o

make[2]: *** [examples/classify_image/CMakeFiles/classify_image.dir/classify_image_generated_classify_image.cu.o] Error 1
make[1]: *** [examples/classify_image/CMakeFiles/classify_image.dir/all] Error 2
make: *** [all] Error 2`

@ghost
Copy link

ghost commented May 24, 2018

Hello. This project is currently targeting Jetson TX2 / JetPack 3.2.

Did you flash your Jetson using the latest JetPack 3.2? This should install CUDA 9.0 and TensorRT 3.0.4 (which includes NvInfer.h).

@mikeliao97
Copy link

Hi, is there a way to make this work for 1080ti? A cmake beginner here, any help would be appreciated!

@jma100
Copy link

jma100 commented Jul 13, 2018

Hi Mike,

I was able to get over this error by installing tensorrt with tar and adding the header files to LD_LIBRARY_PATH

All header files are under TensorRT-3.0.4/include/
NvCaffeParser.h NvInfer.h NvInferPlugin.h NvUffParser.h NvUtils.h

But I ran into the error below haha
[ 25%] Building NVCC (Device) object examples/classify_image/CMakeFiles/classify_image.dir/classify_image_generated_classify_image.cu.o
[ 50%] Linking CXX executable classify_image
[ 50%] Built target classify_image
Scanning dependencies of target uff_to_plan
[ 75%] Building CXX object src/CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o
[100%] Linking CXX executable uff_to_plan
CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o: In function nvinfer1::(anonymous namespace)::createInferBuilder(nvinfer1::ILogger&)': uff_to_plan.cpp:(.text+0x19): undefined reference to createInferBuilder_INTERNAL'
CMakeFiles/uff_to_plan.dir/uff_to_plan.cpp.o: In function main': uff_to_plan.cpp:(.text+0x529): undefined reference to nvuffparser::createUffParser()'
collect2: error: ld returned 1 exit status
src/CMakeFiles/uff_to_plan.dir/build.make:94: recipe for target 'src/uff_to_plan' failed
make[2]: *** [src/uff_to_plan] Error 1
CMakeFiles/Makefile2:158: recipe for target 'src/CMakeFiles/uff_to_plan.dir/all' failed
make[1]: *** [src/CMakeFiles/uff_to_plan.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@HilmiK
Copy link

HilmiK commented Jul 26, 2018

I solved this problem by replacing cv::Mat image= cv::imread(imageFilename, CV_LOAD_IMAGE_COLOR); line with cv::Mat image = cv::imread(imageFileName);

@vinayak-gosale
Copy link

Another make error

screenshot from 2018-09-01 15-48-03

Installed TensorRT-3.0.4.Ubuntu-16.04.3.x86_64.cuda-9.0.cudnn7.0.tar.gz, error same for latest TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz

Any help would be appreciated.

Thanks a lot!

@VincentDuf
Copy link

Any news for this error ? I met the exact same error even with TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz..

@Jonas1302
Copy link

Another make error

screenshot from 2018-09-01 15-48-03

Installed TensorRT-3.0.4.Ubuntu-16.04.3.x86_64.cuda-9.0.cudnn7.0.tar.gz, error same for latest TensorRT-4.0.1.6.Ubuntu-16.04.4.x86_64-gnu.cuda-9.0.cudnn7.1.tar.gz

Any help would be appreciated.

Thanks a lot!

As stated in the log, the nvuffparser::IUffParser::registerInput method requires 3 arguments (see the docs).

Try to use UffInputOrder::kNCHW as third argument or any other enum value declared in NvUffParser.h.

@mcmindcoder
Copy link

Try sudo aptitude install libnvinfer5 libnvinfer-dev

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

8 participants