• zhoulukuan

    tensorrt版本为6.0.1.5,直接下载了tar格式压缩包并添加了路径。
    项目为centernet_tensorrt,下载解压后cmake没有错误提醒make后有如下几段错误提示:

    [ 25%] Building NVCC (Device) object CMakeFiles/build_trt_engine.dir/src/build_t                                                          rt_engine_generated_ctdetLayer.cu.o
    Error copying file (if different) from "/home/zlk/centernet_tensorrt/build/CMake                                                          Files/build_trt_engine.dir/src/build_trt_engine_generated_ctdetLayer.cu.o.depend                                                          .tmp" to "/home/zlk/centernet_tensorrt/build/CMakeFiles/build_trt_engine.dir/src                                                          /build_trt_engine_generated_ctdetLayer.cu.o.depend".
    CMake Error at build_trt_engine_generated_ctdetLayer.cu.o.cmake:232 (message):
      Error generating
      /home/zlk/centernet_tensorrt/build/CMakeFiles/build_trt_engine.dir/src/./build                                                          _trt_engine_generated_ctdetLayer.cu.o
    
    
    CMakeFiles/demo_centernet_coco.dir/build.make:63: recipe for target 'CMakeFiles/                                                          build_trt_engine.dir/src/build_trt_engine_generated_ctdetLayer.cu.o' failed
    make[2]: *** [CMakeFiles/build_trt_engine.dir/src/build_trt_engine_generated_ctd                                                          etLayer.cu.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    
    CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/demo_centernet_coco.dir/                                                          all' failed
    make[1]: *** [CMakeFiles/demo_centernet_coco.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    Scanning dependencies of target demo_centernet_mb2_helmet
    [ 30%] Building CXX object CMakeFiles/demo_centernet_mb2_helmet.dir/example/demo                                                          _centernet_mb2_helmet.cc.o
    [ 35%] Building CXX object CMakeFiles/demo_centernet_mb2_helmet.dir/src/ctdetNet                                                          .cpp.o
    [ 40%] Building CXX object CMakeFiles/demo_centernet_mb2_helmet.dir/src/argparse                                                          .cpp.o
    [ 45%] Building CXX object CMakeFiles/demo_centernet_mb2_helmet.dir/src/utils.cp                                                          p.o
    Scanning dependencies of target build_trt_engine
    [ 55%] Building CXX object CMakeFiles/build_trt_engine.dir/src/argparse.cpp.o
    [ 55%] Building CXX object CMakeFiles/build_trt_engine.dir/src/utils.cpp.o
    [ 60%] Building CXX object CMakeFiles/build_trt_engine.dir/src/ctdetNet.cpp.o
    [ 65%] Building CXX object CMakeFiles/build_trt_engine.dir/example/build_trt_eng                                                          ine.cc.o
    /home/zlk/centernet_tensorrt/example/demo_centernet_mb2_helmet.cc:7:26: fatal er                                                          ror: thor/logging.h: No such file or directory
    compilation terminated.
    CMakeFiles/demo_centernet_mb2_helmet.dir/build.make:76: recipe for target 'CMake                                                          Files/demo_centernet_mb2_helmet.dir/example/demo_centernet_mb2_helmet.cc.o' fail                                                          ed
    make[2]: *** [CMakeFiles/demo_centernet_mb2_helmet.dir/example/demo_centernet_mb                                                          2_helmet.cc.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    In file included from /home/zlk/TensorRT/include/NvInferRuntime.h:59:0,
                     from /home/zlk/TensorRT/include/NvInfer.h:53,
                     from /home/zlk/TensorRT/include/NvInferPlugin.h:53,
                     from /home/zlk/centernet_tensorrt/include/ctdetNet.h:12,
                     from /home/zlk/centernet_tensorrt/example/build_trt_engine.cc:   
    
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/demo_centernet_mb2_helmet                                                          .dir/all' failed
    make[1]: *** [CMakeFiles/demo_centernet_mb2_helmet.dir/all] Error 2
    [ 70%] Linking CXX executable build_trt_engine
    /usr/bin/ld: cannot find -lthor
    collect2: error: ld returned 1 exit status
    CMakeFiles/build_trt_engine.dir/build.make:205: recipe for target 'build_trt_eng                                                          ine' failed
    make[2]: *** [build_trt_engine] Error 1
    CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/build_trt_engine.dir/all                                                          ' failed
    make[1]: *** [CMakeFiles/build_trt_engine.dir/all] Error 2
    Makefile:83: recipe for target 'all' failed
    make: *** [all] Error 2
    
    

    cmake的错误日志后,有如下提示:

    Determining if the pthread_create exist failed with the following output:
    Change Dir: /home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_09724/fast"
    /usr/bin/make -f CMakeFiles/cmTC_09724.dir/build.make CMakeFiles/cmTC_09724.dir/build
    make[1]: Entering directory '/home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_09724.dir/CheckSymbolExists.c.o
    /usr/bin/cc    -fPIC    -o CMakeFiles/cmTC_09724.dir/CheckSymbolExists.c.o   -c /home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
    Linking C executable cmTC_09724
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_09724.dir/link.txt --verbose=1
    /usr/bin/cc  -fPIC     CMakeFiles/cmTC_09724.dir/CheckSymbolExists.c.o  -o cmTC_09724 
    CMakeFiles/cmTC_09724.dir/CheckSymbolExists.c.o: In function `main':
    CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
    collect2: error: ld returned 1 exit status
    CMakeFiles/cmTC_09724.dir/build.make:97: recipe for target 'cmTC_09724' failed
    make[1]: *** [cmTC_09724] Error 1
    make[1]: Leaving directory '/home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_09724/fast' failed
    make: *** [cmTC_09724/fast] Error 2
    
    File /home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
    /* */
    #include <pthread.h>
    
    int main(int argc, char** argv)
    {
      (void)argv;
    #ifndef pthread_create
      return ((int*)(&pthread_create))[argc];
    #else
      (void)argc;
      return 0;
    #endif
    }
    
    Determining if the function pthread_create exists in the pthreads failed with the following output:
    Change Dir: /home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/make" "cmTC_c05f9/fast"
    /usr/bin/make -f CMakeFiles/cmTC_c05f9.dir/build.make CMakeFiles/cmTC_c05f9.dir/build
    make[1]: Entering directory '/home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_c05f9.dir/CheckFunctionExists.c.o
    /usr/bin/cc    -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_c05f9.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c
    Linking C executable cmTC_c05f9
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c05f9.dir/link.txt --verbose=1
    /usr/bin/cc  -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_c05f9.dir/CheckFunctionExists.c.o  -o cmTC_c05f9 -lpthreads 
    /usr/bin/ld: cannot find -lpthreads
    collect2: error: ld returned 1 exit status
    CMakeFiles/cmTC_c05f9.dir/build.make:97: recipe for target 'cmTC_c05f9' failed
    make[1]: *** [cmTC_c05f9] Error 1
    make[1]: Leaving directory '/home/zlk/centernet_tensorrt/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_c05f9/fast' failed
    make: *** [cmTC_c05f9/fast] Error 2
    

    请问下和trt版本等是否有关系,如何解决?

    发布在 社区求助区(SOS!!) 阅读更多

与 ManaAI社区 的连接断开,我们正在尝试重连,请耐心等待