NVIDIA / TensorRT

NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.
https://developer.nvidia.com/tensorrt
Apache License 2.0
10.89k stars 2.14k forks source link

How should I compile ARM based on x86_64? #673

Closed Shaked closed 4 years ago

Shaked commented 4 years ago

Hello,

I'm trying to compile this repository for ARM. This is the steps I have taken so far:

sdkmanager --cli install --user email@myemail.com --logintype devzone --product Jetson --version DP_4.4 --targetos Linux --host --target P3448-0020  --flash all --flash all --license accept --downloadfolder  ./docker/jetpack_files/
 cd $TRT_SOURCE
 mkdir -p build && cd build
 cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out
 make -j$(nproc)

Also fails as it wants the following to in /usr/include, which I symlinked:

sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_ops_infer_v8.h /usr/include/cudnn_ops_infer.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_ops_train_v8.h /usr/include/cudnn_ops_train.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_adv_infer_v8.h /usr/include/cudnn_adv_infer.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_adv_train_v8.h /usr/include/cudnn_adv_train.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_cnn_train_v8.h /usr/include/cudnn_cnn_train.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_cnn_infer_v8.h /usr/include/cudnn_cnn_infer.h
sudo ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_backend_v8.h /usr/include/cudnn_backend.h
[ 22%] Building CUDA object plugin/CMakeFiles/nvinfer_plugin.dir/geluPlugin/geluKernel.cu.o
[ 22%] Building CUDA object plugin/CMakeFiles/nvinfer_plugin.dir/bertQKVToContextPlugin/qkvToContext.cu.o
[ 22%] Building CUDA object plugin/CMakeFiles/nvinfer_plugin.dir/skipLayerNormPlugin/skipLayerNormKernel.cu.o
[ 23%] Building CXX object plugin/CMakeFiles/nvinfer_plugin.dir/InferPlugin.cpp.o
[ 23%] Building CXX object plugin/CMakeFiles/nvinfer_plugin.dir/__/samples/common/logger.cpp.o
[ 23%] Linking CUDA device code CMakeFiles/nvinfer_plugin.dir/cmake_device_link.o
[ 23%] Linking CXX shared library ../out/libnvinfer_plugin.so
/pdk_files/tensorrt/lib/stubs/libnvinfer.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
plugin/CMakeFiles/nvinfer_plugin.dir/build.make:1351: recipe for target 'out/libnvinfer_plugin.so.7.1.3' failed
make[2]: *** [out/libnvinfer_plugin.so.7.1.3] Error 1
CMakeFiles/Makefile2:280: recipe for target 'plugin/CMakeFiles/nvinfer_plugin.dir/all' failed
make[1]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

Not sure what to do from here. I was thinking maybe cmake/make needs a flag to use the right g++/gcc same as with the stub, so I tried also adding the following code taken from this post:

# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER   /usr/bin/aarch64-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# end of the file

But this complains on a different issue:

trtuser@986425528e26:/workspace/TensorRT/build$ sudo cmake .. -DTRT_LIB_DIR=/pdk_files/tensorrt/lib/stubs/ -DTRT_OUT_DIR=`pwd`/out -DCUDNN_LIB=/usr/local/cuda/lib64 -DTENSORRT_LIBRARY_INFER=/pdk_files/tensorrt/lib/stubs/ -DTENSORRT_LIBRARY_INFER_PLUGIN=/pdk_files/tensorrt/lib/stubs/ -DTENSORRT_LIBRARY_MYELIN=/pdk_files/tensorrt/lib/ -DCUDA_INCLUDE_DIRS=/usr/local/cuda/include -DCUDA_CUDART_LIBRARY=/usr/local/cuda -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/nvcc -DCUDA_VERSION=10.2
Building for TensorRT version: 7.1.3, library version: 7
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Targeting TRT Platform: x86_64
-- CUDA version set to 10.2
-- cuDNN version set to 8.0
-- Protobuf version set to 3.0.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'zlib'
CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (found
  suitable version "10.2", minimum required is "10.2")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.14/Modules/FindCUDA.cmake:1092 (find_package_handle_standard_args)
  CMakeLists.txt:115 (find_package)

-- Configuring incomplete, errors occurred!
See also "/workspace/TensorRT/build/CMakeFiles/CMakeOutput.log".
See also "/workspace/TensorRT/build/CMakeFiles/CMakeError.log".
trtuser@986425528e26:/workspace/TensorRT/build$ echo $CUDA_INCLUDE_DIRS
/usr/local/cuda/include
trtuser@986425528e26:/workspace/TensorRT/build$ echo $CUDA_CUDART_LIBRARY
/usr/local/cuda

Even though these variables are defined within the cmake execution.

My main goal is to build TensorRT components on a x86 VM for ARM and then use it on:

  1. my Jetson Xavier
  2. a QEMU ARM based docker container

Did I understand this completely wrong? Is this even possible?

Thank you! Shaked

UPDATE 1:

Following https://github.com/NVIDIA/TensorRT/issues/643 and https://github.com/NVIDIA/TensorRT/issues/9#issuecomment-575106079, I have ran:

 sudo cmake -DCUBLASLT_LIB=/usr/local/cuda-10.0/targets/aarch64-linux/lib/libcublas.so -DCUDNN_VERSION=8.0 -DCUDA_VERSION=10.2 -DPROTOBUF_VERSION=3.8.0 -DTRT_LIB_DIR=/pdk_files/tensorrt/lib/stubs/ -DTRT_OUT_DIR=`pwd`/out -DCUDNN_LIB=/usr/local/cuda/lib64 -DTENSORRT_LIBRARY_INFER=/pdk_files/tensorrt/lib/stubs/ -DTENSORRT_LIBRARY_INFER_PLUGIN=/pdk_files/tensorrt/lib/stubs/ -DTENSORRT_LIBRARY_MYELIN=/pdk_files/tensorrt/lib/ -DCUDA_INCLUDE_DIRS=/usr/local/cuda/include -DCUDA_CUDART_LIBRARY=/usr/local/cuda -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/nvcc -DCUDA_VERSION=10.2 ..
Building for TensorRT version: 7.1.3, library version: 7
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Targeting TRT Platform: x86_64
-- CUDA version set to 10.2
-- cuDNN version set to 8.0
-- Protobuf version set to 3.8.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'zlib'
-- Found CUDA: /usr/local/cuda (found suitable version "10.2", minimum required is "10.2")
-- Using libprotobuf /workspace/TensorRT/build/third_party.protobuf/lib/libprotobuf.a
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /pdk_files/tensorrt/lib/stubs/libnvinfer.so
-- ==========================================================================================
-- ========================= Importing and creating target nvuffparser ==========================
-- Looking for library nvparsers
-- Library that was found /pdk_files/tensorrt/lib/stubs/libnvparsers.so
-- ==========================================================================================
CMake Warning at CMakeLists.txt:160 (message):
  Detected CUDA version is < 11.0.  SM80 not supported.

-- GPU_ARCHS is not defined. Generating CUDA code for default SMs: 35;53;61;70;75
-- Protobuf proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
-- /workspace/TensorRT/build/parsers/caffe
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not set - defaulting to Release
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
--
-- ******** Summary ********
--   CMake version         : 3.14.4
--   CMake command         : /usr/local/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/g++
--   C++ compiler version  : 7.5.0
--   CXX flags             : -Wno-deprecated-declarations  -DBUILD_SYSTEM=cmake_oss -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : _PROTOBUF_INSTALL_DIR=/workspace/TensorRT/build;ONNX_NAMESPACE=onnx2trt_onnx
--   CMAKE_PREFIX_PATH     :
--   CMAKE_INSTALL_PREFIX  : /pdk_files/tensorrt/lib/stubs/..
--   CMAKE_MODULE_PATH     :
--
--   ONNX version          : 1.6.0
--   ONNX NAMESPACE        : onnx2trt_onnx
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
--
--   Protobuf compiler     :
--   Protobuf includes     :
--   Protobuf libraries    :
--   BUILD_ONNX_PYTHON     : OFF
-- Found TensorRT headers at /workspace/TensorRT/include
-- Find TensorRT libs at /pdk_files/tensorrt/lib/stubs;/pdk_files/tensorrt/lib/stubs;/pdk_files/tensorrt/lib
-- Found TENSORRT: /workspace/TensorRT/include
-- Adding new sample: sample_algorithm_selector
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_char_rnn
--     - Parsers Used: uff;caffe;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_dynamic_reshape
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_fasterRCNN
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_googlenet
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_int8
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_int8_api
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mlp
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist_api
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens_mps
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_nmt
--     - Parsers Used: none
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_plugin
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_reformat_free_io
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_ssd
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_fasterRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_maskRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_mnist
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_plugin_v2_ext
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_ssd
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist_coord_conv_ac
--     - Parsers Used: onnx
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: trtexec
--     - Parsers Used: caffe;uff;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Configuring done
WARNING: Target "nvinfer_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "onnx2trt" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "onnx2trt" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "getSupportedAPITest" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "getSupportedAPITest" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_algorithm_selector" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_char_rnn" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_char_rnn" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_char_rnn" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_dynamic_reshape" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_dynamic_reshape" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_dynamic_reshape" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_googlenet" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8_api" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8_api" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8_api" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mlp" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mnist_api" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_movielens" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_movielens_mps" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_nmt" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_reformat_free_io" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_maskRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_maskRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_plugin_v2_ext" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trtexec" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trtexec" requests linking to directory "/pdk_files/tensorrt/lib/stubs".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trtexec" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /workspace/TensorRT/build

Then

sudo CC=aarch64-linux-gnu-gcc make -j8
...
...
...

[ 62%] Linking CXX static library ../../out/libnvcaffeparser_static.a
[ 62%] Built target nvcaffeparser_static
Scanning dependencies of target nvonnxparser_static
[ 63%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/NvOnnxParser.cpp.o
[ 63%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseReshape.cpp.o
[ 63%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseScale.cpp.o
[ 63%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseSigmoid.cpp.o
[ 64%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseSoftMax.cpp.o
[ 64%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseTanH.cpp.o
[ 64%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeWeightFactory/caffeWeightFactory.cpp.o
CMakeFiles/Makefile2:280: recipe for target 'plugin/CMakeFiles/nvinfer_plugin.dir/all' failed
make[1]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 64%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/caffeParser.cpp.o
[ 64%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/ModelImporter.cpp.o
[ 65%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/NvCaffeParser.cpp.o
[ 65%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/builtin_op_importers.cpp.o
[ 65%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/onnx2trt_utils.cpp.o
[ 67%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/ShapedWeights.cpp.o
[ 67%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/ShapeTensor.cpp.o
[ 67%] Building CXX object parsers/onnx/CMakeFiles/nvonnxparser_static.dir/OnnxAttrs.cpp.o
[ 67%] Linking CXX shared library ../../out/libnvcaffeparser.so
/pdk_files/tensorrt/lib/stubs/libnvinfer.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
parsers/caffe/CMakeFiles/nvcaffeparser.dir/build.make:484: recipe for target 'out/libnvcaffeparser.so.7.1.3' failed
make[2]: *** [out/libnvcaffeparser.so.7.1.3] Error 1
CMakeFiles/Makefile2:1070: recipe for target 'parsers/caffe/CMakeFiles/nvcaffeparser.dir/all' failed
make[1]: *** [parsers/caffe/CMakeFiles/nvcaffeparser.dir/all] Error 2
[ 67%] Linking CXX static library libnvonnxparser_static.a
[ 67%] Built target nvonnxparser_static
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

UPDATE 2

I figured that I had placed a non existing path for libcublas.so. I also tried to use the /pdk_files/tensorrt/lib/ path instead of /pdk_files/tensorrt/lib/stubs, this is what I ended up with:

trtuser@986425528e26:/workspace/TensorRT/build$ sudo cmake -DCUBLASLT_LIB=/usr/lib/aarch64-linux-gnu/libcublas.so -DCUDNN_VERSION=8.0 -DCUDA_VERSION=10.2 -DPROTOBUF_VERSION=3.8.0 -DTRT_LIB_DIR=/pdk_files/tensorrt/lib/ -DTRT_OUT_DIR=`pwd`/out -DCUDNN_LIB=/usr/local/cuda/lib64 -DTENSORRT_LIBRARY_INFER=/pdk_files/tensorrt/lib/ -DTENSORRT_LIBRARY_INFER_PLUGIN=/pdk_files/tensorrt/lib/ -DTENSORRT_LIBRARY_MYELIN=/pdk_files/tensorrt/lib/ -DCUDA_INCLUDE_DIRS=/usr/local/cuda/include -DCUDA_CUDART_LIBRARY=/usr/local/cuda -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/nvcc ..

Returns:

Building for TensorRT version: 7.1.3, library version: 7
-- Targeting TRT Platform: x86_64
-- CUDA version set to 10.2
-- cuDNN version set to 8.0
-- Protobuf version set to 3.8.0
-- Using libprotobuf /workspace/TensorRT/build/third_party.protobuf/lib/libprotobuf.a
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /pdk_files/tensorrt/lib/libnvinfer.so
-- ==========================================================================================
-- ========================= Importing and creating target nvuffparser ==========================
-- Looking for library nvparsers
-- Library that was found /pdk_files/tensorrt/lib/libnvparsers.so
-- ==========================================================================================
CMake Warning at CMakeLists.txt:160 (message):
  Detected CUDA version is < 11.0.  SM80 not supported.

-- GPU_ARCHS is not defined. Generating CUDA code for default SMs: 35;53;61;70;75
-- Protobuf proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
-- /workspace/TensorRT/build/parsers/caffe
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
--
-- ******** Summary ********
--   CMake version         : 3.14.4
--   CMake command         : /usr/local/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/g++
--   C++ compiler version  : 7.5.0
--   CXX flags             : -Wno-deprecated-declarations  -DBUILD_SYSTEM=cmake_oss -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : _PROTOBUF_INSTALL_DIR=/workspace/TensorRT/build;ONNX_NAMESPACE=onnx2trt_onnx
--   CMAKE_PREFIX_PATH     :
--   CMAKE_INSTALL_PREFIX  : /pdk_files/tensorrt/lib/..
--   CMAKE_MODULE_PATH     :
--
--   ONNX version          : 1.6.0
--   ONNX NAMESPACE        : onnx2trt_onnx
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
--
--   Protobuf compiler     :
--   Protobuf includes     :
--   Protobuf libraries    :
--   BUILD_ONNX_PYTHON     : OFF
-- Found TensorRT headers at /workspace/TensorRT/include
-- Find TensorRT libs at /pdk_files/tensorrt/lib;/pdk_files/tensorrt/lib;/pdk_files/tensorrt/lib
-- Adding new sample: sample_algorithm_selector
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_char_rnn
--     - Parsers Used: uff;caffe;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_dynamic_reshape
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_fasterRCNN
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_googlenet
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_int8
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_int8_api
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mlp
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist_api
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens_mps
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_nmt
--     - Parsers Used: none
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_plugin
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_reformat_free_io
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_ssd
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_fasterRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_maskRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_mnist
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_plugin_v2_ext
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_ssd
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist_coord_conv_ac
--     - Parsers Used: onnx
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: trtexec
--     - Parsers Used: caffe;uff;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Configuring done
WARNING: Target "nvinfer_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser_static" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "nvonnxparser" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "onnx2trt" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "getSupportedAPITest" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_algorithm_selector" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_char_rnn" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_char_rnn" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_dynamic_reshape" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_dynamic_reshape" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_googlenet" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8_api" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_int8_api" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mlp" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_mnist_api" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_movielens" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_movielens_mps" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_nmt" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_plugin" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_reformat_free_io" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_fasterRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_maskRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_maskRCNN" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_mnist" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_plugin_v2_ext" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_uff_ssd" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "sample_onnx_mnist_coord_conv_ac" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trtexec" requests linking to directory "/usr/local/cuda/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trtexec" requests linking to directory "/pdk_files/tensorrt/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /workspace/TensorRT/build

Then

trtuser@986425528e26:/workspace/TensorRT/build$ sudo CC=aarch64-linux-gnu-gcc make -j8

Returns

[  1%] Performing build step for 'third_party.protobuf'
[  1%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/message_lite.cc.o
[  2%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/generated_message_table_driven_lite.cc.o
[  2%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/parse_context.cc.o
[  2%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/common.cc.o
[  3%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/repeated_field.cc.o
[  4%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_table_driven_lite.cc.o
[  1%] Linking CUDA device code CMakeFiles/nvinfer_plugin.dir/cmake_device_link.o
[ 22%] Built target nvinfer_plugin_static
[  4%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_util.cc.o
[ 22%] Linking CXX shared library ../out/libnvinfer_plugin.so
/usr/lib/aarch64-linux-gnu/libcublas.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
plugin/CMakeFiles/nvinfer_plugin.dir/build.make:1351: recipe for target 'out/libnvinfer_plugin.so.7.1.3' failed
make[2]: *** [out/libnvinfer_plugin.so.7.1.3] Error 1
CMakeFiles/Makefile2:280: recipe for target 'plugin/CMakeFiles/nvinfer_plugin.dir/all' failed
make[1]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  5%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/implicit_weak_message.cc.o
[  6%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/int128.cc.o
[  6%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/coded_stream.cc.o
[  6%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/status.cc.o
[  7%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/statusor.cc.o
[  7%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/stringpiece.cc.o
[  8%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/stringprintf.cc.o
[  9%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/io_win32.cc.o
[  9%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/strtod.cc.o
[  9%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/structurally_valid.cc.o
[ 10%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/strutil.cc.o
[ 10%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/time.cc.o
[ 11%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream.cc.o
[ 11%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl_lite.cc.o
[ 12%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/wire_format_lite.cc.o
[ 13%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/message_lite.cc.o
[ 13%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/parse_context.cc.o
[ 14%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/repeated_field.cc.o
[ 14%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/bytestream.cc.o
[ 15%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o
[ 15%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/int128.cc.o
[ 16%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/status.cc.o
[ 17%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/statusor.cc.o
[ 17%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/stringpiece.cc.o
[ 17%] Linking CXX static library libprotobuf-lite.a
[ 18%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/stringprintf.cc.o
[ 23%] Built target libprotobuf-lite
[ 23%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/structurally_valid.cc.o
[ 24%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/strutil.cc.o
[ 24%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/time.cc.o
[ 25%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/wire_format_lite.cc.o
[ 25%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/any.cc.o
[ 26%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/any.pb.cc.o
[ 26%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/api.pb.cc.o
[ 27%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/compiler/importer.cc.o
[ 27%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/compiler/parser.cc.o
[ 28%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o
[ 28%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.pb.cc.o
[ 29%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor_database.cc.o
[ 29%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/duration.pb.cc.o
[ 30%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/dynamic_message.cc.o
[ 30%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/empty.pb.cc.o
[ 31%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set_heavy.cc.o
[ 32%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/field_mask.pb.cc.o
[ 32%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_reflection.cc.o
[ 33%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_table_driven.cc.o
[ 33%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/gzip_stream.cc.o
[ 34%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/printer.cc.o
[ 34%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/tokenizer.cc.o
[ 35%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o
[ 35%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/map_field.cc.o
[ 36%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/message.cc.o
[ 36%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/reflection_ops.cc.o
[ 37%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/service.cc.o
[ 37%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/source_context.pb.cc.o
[ 38%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/struct.pb.cc.o
[ 38%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/mathlimits.cc.o
[ 39%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/substitute.cc.o
[ 39%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/text_format.cc.o
[ 40%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o
[ 40%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/type.pb.cc.o
[ 41%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/unknown_field_set.cc.o
[ 42%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/delimited_message_util.cc.o
[ 42%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_comparator.cc.o
[ 43%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_mask_util.cc.o
[ 43%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/datapiece.cc.o
[ 44%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/default_value_objectwriter.cc.o
[ 44%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/error_listener.cc.o
[ 45%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/field_mask_utility.cc.o
[ 45%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_escaping.cc.o
[ 46%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_objectwriter.cc.o
[ 46%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_stream_parser.cc.o
[ 47%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/object_writer.cc.o
[ 47%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/proto_writer.cc.o
[ 48%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectsource.cc.o
[ 48%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectwriter.cc.o
[ 49%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/type_info.cc.o
[ 49%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/type_info_test_helper.cc.o
[ 50%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/utility.cc.o
[ 50%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/json_util.cc.o
[ 51%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/message_differencer.cc.o
[ 52%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/time_util.cc.o
[ 52%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/util/type_resolver_util.cc.o
[ 53%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/wire_format.cc.o
[ 53%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/wrappers.pb.cc.o
[ 54%] Linking CXX static library libprotobuf.a
[ 55%] Built target libprotobuf
[ 56%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_enum.cc.o
[ 59%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/code_generator.cc.o
[ 57%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_extension.cc.o
[ 57%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_enum_field.cc.o
[ 58%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_file.cc.o
[ 58%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/command_line_interface.cc.o
[ 60%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_generator.cc.o
[ 60%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_field.cc.o
[ 60%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_helpers.cc.o
[ 61%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_map_field.cc.o
[ 61%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_message.cc.o
[ 62%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_message_field.cc.o
[ 62%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc.o
[ 63%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc.o
[ 63%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_service.cc.o
[ 64%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/cpp/cpp_string_field.cc.o
[ 64%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc.o
[ 65%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_enum.cc.o
[ 65%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_enum_field.cc.o
[ 66%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_field_base.cc.o
[ 66%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_generator.cc.o
[ 67%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_helpers.cc.o
[ 67%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_map_field.cc.o
[ 68%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_message.cc.o
[ 68%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_message_field.cc.o
[ 69%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc.o
[ 70%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc.o
[ 70%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc.o
[ 71%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc.o
[ 71%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc.o
[ 72%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc.o
[ 72%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc.o
[ 73%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_context.cc.o
[ 73%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_doc_comment.cc.o
[ 74%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_enum.cc.o
[ 74%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_enum_field.cc.o
[ 75%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_enum_field_lite.cc.o
[ 75%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_enum_lite.cc.o
[ 76%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_extension.cc.o
[ 76%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_extension_lite.cc.o
[ 77%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_field.cc.o
[ 77%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_file.cc.o
[ 78%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_generator.cc.o
[ 78%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_generator_factory.cc.o
[ 79%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_helpers.cc.o
[ 80%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_map_field.cc.o
[ 80%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_map_field_lite.cc.o
[ 81%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message.cc.o
[ 81%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message_builder.cc.o
[ 82%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message_builder_lite.cc.o
[ 82%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message_field.cc.o
[ 83%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message_field_lite.cc.o
[ 83%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_message_lite.cc.o
[ 84%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_name_resolver.cc.o
[ 84%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_primitive_field.cc.o
[ 85%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_primitive_field_lite.cc.o
[ 85%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_service.cc.o
[ 86%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_shared_code_generator.cc.o
[ 86%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_string_field.cc.o
[ 87%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/java/java_string_field_lite.cc.o
[ 87%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/js/js_generator.cc.o
[ 88%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/js/well_known_types_embed.cc.o
[ 88%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_enum.cc.o
[ 89%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc.o
[ 90%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_extension.cc.o
[ 90%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_field.cc.o
[ 91%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_file.cc.o
[ 91%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_generator.cc.o
[ 92%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc.o
[ 92%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc.o
[ 93%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_message.cc.o
[ 93%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc.o
[ 94%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc.o
[ 94%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc.o
[ 95%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/php/php_generator.cc.o
[ 95%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/plugin.cc.o
[ 96%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/plugin.pb.cc.o
[ 96%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/python/python_generator.cc.o
[ 97%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/ruby/ruby_generator.cc.o
[ 97%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/subprocess.cc.o
[ 98%] Building CXX object CMakeFiles/libprotoc.dir/src/google/protobuf/compiler/zip_writer.cc.o
[ 98%] Linking CXX static library libprotoc.a
[ 98%] Built target libprotoc
[ 99%] Building CXX object CMakeFiles/protoc.dir/src/google/protobuf/compiler/main.cc.o
[100%] Linking CXX executable protoc
[100%] Built target protoc
[ 22%] Performing install step for 'third_party.protobuf'
[ 13%] Built target libprotobuf-lite
[ 55%] Built target libprotobuf
[ 98%] Built target libprotoc
[100%] Built target protoc
Install the project...
-- Install configuration: "Release"
-- Installing: /workspace/TensorRT/build/third_party.protobuf/lib/libprotobuf-lite.a
-- Installing: /workspace/TensorRT/build/third_party.protobuf/lib/libprotobuf.a
-- Installing: /workspace/TensorRT/build/third_party.protobuf/lib/libprotoc.a
-- Installing: /workspace/TensorRT/build/third_party.protobuf/bin/protoc-3.8.0.0
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/bin/protoc
-- Set runtime path of "/workspace/TensorRT/build/third_party.protobuf/bin/protoc-3.8.0.0" to "$ORIGIN/../lib"
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/pkgconfig/protobuf.pc
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/pkgconfig/protobuf-lite.pc
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/any.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/any.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/api.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/arena.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/arena_impl.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/arenastring.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/code_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/command_line_interface.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/cpp/cpp_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/csharp/csharp_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/csharp/csharp_names.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/importer.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/java/java_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/java/java_names.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/js/js_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/js/well_known_types_embed.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/objectivec/objectivec_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/objectivec/objectivec_helpers.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/parser.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/php/php_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/plugin.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/plugin.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/python/python_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/ruby/ruby_generator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/descriptor.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/descriptor.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/descriptor_database.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/duration.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/dynamic_message.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/empty.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/extension_set.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/extension_set_inl.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/field_mask.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/generated_enum_reflection.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/generated_enum_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/generated_message_reflection.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/generated_message_table_driven.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/generated_message_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/has_bits.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/implicit_weak_message.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/inlined_string_field.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/coded_stream.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/gzip_stream.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/printer.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/strtod.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/tokenizer.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/zero_copy_stream.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/zero_copy_stream_impl.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/io/zero_copy_stream_impl_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_entry.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_entry_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_field.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_field_inl.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_field_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/map_type_handler.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/message.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/message_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/metadata.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/metadata_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/parse_context.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/port.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/port_def.inc
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/port_undef.inc
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/reflection.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/reflection_ops.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/repeated_field.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/service.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/source_context.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/struct.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/bytestream.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/callback.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/casts.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/common.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/fastmem.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/hash.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/logging.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/macros.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/mutex.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/once.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/platform_macros.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/port.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/status.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/stl_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/stringpiece.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/strutil.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/stubs/template_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/text_format.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/timestamp.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/type.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/unknown_field_set.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/delimited_message_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/field_comparator.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/field_mask_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/json_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/message_differencer.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/time_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/type_resolver.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/util/type_resolver_util.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/wire_format.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/wire_format_lite.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/wrappers.pb.h
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/any.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/api.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/plugin.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/descriptor.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/duration.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/empty.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/field_mask.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/source_context.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/struct.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/timestamp.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/type.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/wrappers.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/descriptor.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/any.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/api.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/duration.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/empty.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/field_mask.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/source_context.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/struct.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/timestamp.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/type.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/wrappers.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/include/google/protobuf/compiler/plugin.proto
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-targets.cmake
-- Installing: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-targets-release.cmake
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-config.cmake
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-config-version.cmake
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-options.cmake
-- Up-to-date: /workspace/TensorRT/build/third_party.protobuf/lib/cmake/protobuf/protobuf-module.cmake
[ 22%] Completed 'third_party.protobuf'
[ 23%] Built target third_party.protobuf
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
oak-tree commented 4 years ago

@Shaked I tried to the following :

sudo cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/cmake_aarch64.toolchain -DCUBLASLT_LIB=/usr/local/cuda/targets/aarch64-linux/lib/libcublas.so -DBUILD_SAMPLES=OFF -DBUILD_PLUGINS=OFF -DTRT_LIB_DIR=$TRT_RELEASE/lib  -DCUDA_VERSION=10.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.2/bin/nvcc

It did better and protopuf got it the 100%. But it fails to link CUDA libraries. So now my guess is that I'm still missing cmake varibale to tell the cross linker where are the libs?

[ 97%] Linking CXX executable onnx2trt
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudnn.so.8, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudart.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libnvrtc.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaGetDevice'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaDeviceSynchronize'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaPeekAtLastError'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcCreateProgram@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroy@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyPoolingDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaRegisterFunction@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetActivationDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaUnregisterFatBinary@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaFreeHost'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyOpTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemcpy2DAsync@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyConvolutionDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateOpTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `nvrtcAddNameExpression@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionForwardAlgorithmMaxCount@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaPushCallConfiguration'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaGetErrorName'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionForwardAlgorithm_v7@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventDestroy'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaCreateTextureObject@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetBatchNormalizationForwardTrainingExWorkspaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaDeviceGetAttribute'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaDestroyTextureObject@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaHostAlloc'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaEventCreateWithFlags@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaUnregisterFatBinary'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaFuncGetAttributes'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetDropoutDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnBatchNormalizationBackwardEx@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateActivationDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaPeekAtLastError@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventCreateWithFlags'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetTensorNdDescriptorEx@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaRegisterFatBinary'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnPoolingBackward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetRNNWorkspaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetFilterNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetConvolution2dDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetConvolutionGroupCount@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcDestroyProgram@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnConvolutionBackwardData@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetPTXSize@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaGetErrorString@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetRNNLinLayerMatrixParams@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnCreateTensorDescriptor'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetTensorNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetConvolutionMathType@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetTensor4dDescriptorEx@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaPopCallConfiguration@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaRegisterVar@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaRuntimeGetVersion@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaGetDeviceProperties@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaGetLastError'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaStreamCreateWithPriority'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionBackwardDataAlgorithmMaxCount@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSoftmaxForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMalloc'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMemcpy'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaRegisterFatBinary@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaRegisterVar'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreate@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnDestroyTensorDescriptor'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaFree@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcCompileProgram@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMemcpyAsync'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetRNNLinLayerBiasParams@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamDestroy@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateRNNDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaGetDevice@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetErrorString@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamWaitEvent@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaEventDestroy@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaEventSynchronize@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMallocHost'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaStreamWaitEvent'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetRNNParamsSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaStreamCreate'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaGetDeviceProperties'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyActivationDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyFilterDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetStream@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaDeviceGetAttribute@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaGetDeviceCount@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetProgramLog@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetRNNMatrixMathType@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetProperty@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamCreate@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMemset'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaEventElapsedTime@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaEventRecord@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaDeviceSynchronize@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnPoolingForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaRegisterFatBinaryEnd'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaPopCallConfiguration'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnConvolutionBackwardFilter@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetBatchNormalizationBackwardExWorkspaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaRegisterFatBinaryEnd@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionMathType@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetVersion@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaStreamSynchronize'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `nvrtcGetLoweredName@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyRNNDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaLaunchKernel@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateDropoutDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemcpyToSymbol@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetFilter4dDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetConvolutionBackwardDataWorkspaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnOpTensor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetPooling2dDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamAddCallback@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetLRNDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnAddTensor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyLRNDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetBatchNormalizationTrainingExReserveSpaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDropoutGetStatesSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetConvolutionNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetConvolutionForwardWorkspaceSize@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcVersion@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnSetStream'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnRNNForwardInference@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnSetPoolingNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnLRNCrossChannelForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetFilterNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateFilterDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnActivationForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaLaunchKernel'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetRNNDescriptor_v6@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionBackwardFilterAlgorithmMaxCount@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventElapsedTime'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaFuncSetAttribute@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaGetErrorString'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemsetAsync@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetTensorNdDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaStreamDestroy'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnSetTensor4dDescriptor'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetTensor4dDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventSynchronize'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnConvolutionForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMemsetAsync'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemGetInfo@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnGetTensor4dDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemcpy@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventCreate'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaDeviceReset'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnDeriveBNTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetErrorString@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnBatchNormalizationForwardTraining'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `__cudaRegisterFunction'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMalloc@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetPTX@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnBatchNormalizationForwardTrainingEx@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionBackwardFilterAlgorithm_v7@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnDestroyDropoutDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateLRNDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamSynchronize@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionBackwardDataAlgorithm_v7@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetProgramLogSize@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaFree'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaEventRecord'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaFuncSetAttribute'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreatePoolingDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaCreateChannelDesc@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `__cudaPushCallConfiguration@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreateConvolutionDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaMemcpyAsync@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnSetOpTensorDescriptor@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaGetLastError@libcudart.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnTransformTensor@libcudnn.so.8'
collect2: error: ld returned 1 exit status
parsers/onnx/CMakeFiles/onnx2trt.dir/build.make:90: recipe for target 'parsers/onnx/onnx2trt' failed
make[2]: *** [parsers/onnx/onnx2trt] Error 1
CMakeFiles/Makefile2:535: recipe for target 'parsers/onnx/CMakeFiles/onnx2trt.dir/all' failed
make[1]: *** [parsers/onnx/CMakeFiles/onnx2trt.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
Shaked commented 4 years ago

@oak-tree

Your solution seems good!

I used the following:

sudo cmake .. \
    -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchains/cmake_aarch64.toolchain" \
    -DCUBLASLT_LIB="/usr/local/cuda/targets/aarch64-linux/lib/libcublas.so" \
    -DBUILD_SAMPLES="OFF" \
    -DBUILD_PLUGINS="OFF" \
    -DTRT_LIB_DIR="/pdk_files/tensorrt/lib" \
    -DCUDA_VERSION="10.2" \
    -DCMAKE_CUDA_COMPILER="/usr/local/cuda-10.2/bin/nvcc" \
    -DCUDNN_VERSION="8.0" \
    -DPROTOBUF_VERSION="3.8.0" \
    -DTRT_OUT_DIR="`pwd`/out" \
    -DCUDNN_LIB="/usr/local/cuda/lib64"

Then I ran

sudo CC=aarch64-linux-gnu-gcc make -j8 &> x.log

At some point I see things like:

[  7%] Built target third_party.protobuf
[ 16%] Built target third_party.protobuf_aarch64
[ 19%] Built target gen_onnx_proto
[ 19%] Built target caffe_proto
[ 25%] Built target onnx_proto
[ 32%] Built target nvonnxparser_static
[ 40%] Built target nvonnxparser
[ 68%] Built target nvcaffeparser_static
[ 95%] Built target nvcaffeparser
[ 97%] Linking CXX executable onnx2trt
[ 97%] Building CXX object parsers/onnx/CMakeFiles/getSupportedAPITest.dir/getSupportedAPITest.cpp.o
[ 98%] Building CXX object parsers/onnx/CMakeFiles/getSupportedAPITest.dir/ModelImporter.cpp.o
In file included from /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-ml.pb.h:2:0,
                 from /workspace/TensorRT/parsers/onnx/third_party/onnx/onnx/onnx_pb.h:50,
                 from /workspace/TensorRT/parsers/onnx/ShapedWeights.hpp:26,
                 from /workspace/TensorRT/parsers/onnx/onnx2trt.hpp:26,
                 from /workspace/TensorRT/parsers/onnx/ImporterContext.hpp:25,
                 from /workspace/TensorRT/parsers/onnx/ModelImporter.hpp:25,
                 from /workspace/TensorRT/parsers/onnx/ModelImporter.cpp:23:
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^~~~~
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^~~~~
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^~~~~
In file included from /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-ml.pb.h:2:0,
                 from /workspace/TensorRT/parsers/onnx/third_party/onnx/onnx/onnx_pb.h:50,
                 from /workspace/TensorRT/parsers/onnx/onnx_utils.hpp:28,
                 from /workspace/TensorRT/parsers/onnx/getSupportedAPITest.cpp:29:
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^~~~~
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^~~~~
/workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^~~~~
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudnn.so.8, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudart.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libnvrtc.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
third_party/onnx/libonnx_proto.a(onnx_onnx2trt_onnx-ml.pb.cc.o): In function `onnx2trt_onnx::OperatorSetIdProto::ByteSize() const':
onnx_onnx2trt_onnx-ml.pb.cc:(.text+0x21c): undefined reference to `google_private::protobuf::io::CodedOutputStream::VarintSize64(unsigned long)'

Attached full log:

x.log

UPDATE 1

I have just noticed that cmake does contain a problem although it finishes successfully:

sudo cmake .. \
>     -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchains/cmake_aarch64.toolchain" \
>     -DCUBLASLT_LIB="/usr/local/cuda/targets/aarch64-linux/lib/libcublas.so" \
>     -DBUILD_SAMPLES="OFF" \
>     -DBUILD_PLUGINS="OFF" \
>     -DTRT_LIB_DIR="/pdk_files/tensorrt/lib" \
>     -DCUDA_VERSION="10.2" \
>     -DCMAKE_CUDA_COMPILER="/usr/local/cuda-10.2/bin/nvcc" \
>     -DCUDNN_VERSION="8.0" \
>     -DPROTOBUF_VERSION="3.8.0" \
>     -DTRT_OUT_DIR="`pwd`/out" \
>     -DTENSORRT_LIBRARY_INFER_PLUGIN="/pdk_files/tensorrt/lib/stubs" \
>     -DCUDNN_LIB="/usr/local/cuda/lib64"
Building for TensorRT version: 7.1.3, library version: 7
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Targeting TRT Platform: aarch64
-- CUDA version set to 10.2
-- cuDNN version set to 8.0
-- Protobuf version set to 3.8.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'zlib'
-- Setting up another Protobuf build for cross compilation targeting aarch64-Linux
-- Using libprotobuf /workspace/TensorRT/build_shaked/third_party.protobuf_aarch64/lib/libprotobuf.a
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /pdk_files/tensorrt/lib/libnvinfer.so
-- ==========================================================================================
-- ========================= Importing and creating target nvuffparser ==========================
-- Looking for library nvparsers
-- Library that was found /pdk_files/tensorrt/lib/libnvparsers.so
-- ==========================================================================================
CMake Warning at CMakeLists.txt:159 (message):
  Detected CUDA version is < 11.0.  SM80 not supported.

-- GPU_ARCHS is not defined. Generating CUDA code for default SMs: 35;53;61;70;75
-- ========================= Importing and creating target nvinfer_plugin ==========================
-- Looking for library nvinfer_plugin
-- Library that was found nvinfer_plugin_LIB_PATH-NOTFOUND
-- ==========================================================================================
-- Protobuf proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
-- /workspace/TensorRT/build_shaked/parsers/caffe
-- The C compiler identification is GNU 7.5.0
-- Build type not set - defaulting to Release

-- Looking for library nvinfer_plugin -- Library that was found nvinfer_plugin_LIB_PATH-NOTFOUND --

Means it doesn't find it for some reason.

UPDATE 2

I have tried to clone this repo again and use the release/7.1 tag.

After doing that I ran the following cmake:

sudo cmake .. \
    -DCMAKE_TOOLCHAIN_FILE="/workspace/TensorRT/SHAKED/TensorRT/cmake/toolchains/cmake_aarch64.toolchain" \
    -DCUBLASLT_LIB="/usr/local/cuda/targets/aarch64-linux/lib/libcublas.so" \
    -DBUILD_SAMPLES="OFF" \
    -DBUILD_PLUGINS="OFF" \
    -DTRT_LIB_DIR="/pdk_files/tensorrt/lib" \
    -DCUDA_VERSION="10.2" \
    -DCMAKE_CUDA_COMPILER="/usr/local/cuda-10.2/bin/nvcc" \
    -DCUDNN_VERSION="8.0" \
    -DPROTOBUF_VERSION="3.8.0" \
    -DTRT_OUT_DIR="`pwd`/out" \
    -DCUDNN_LIB="/pdk_files/cudnn/usr/lib/aarch64-linux-gnu/"

Then make:

 CC=aarch64-linux-gnu-gcc make -j8 |& tee test.log

Resulted with:

-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/include/google/protobuf/compiler/plugin.proto
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-targets.cmake
-- Installing: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-targets-release.cmake
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-config.cmake
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-config-version.cmake
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-options.cmake
-- Up-to-date: /workspace/TensorRT/SHAKED/TensorRT/build/third_party.protobuf_aarch64/lib/cmake/protobuf/protobuf-module.cmake
[ 16%] Completed 'third_party.protobuf_aarch64'
[ 19%] Built target third_party.protobuf_aarch64
[ 25%] Built target onnx_proto
[ 25%] proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
[ 26%] Linking CXX shared library ../../out/libnvonnxparser.so
[ 34%] Built target nvonnxparser_static
[ 35%] Linking CXX executable getSupportedAPITest
[ 37%] Linking CXX executable onnx2trt
[ 37%] Built target caffe_proto
Scanning dependencies of target nvcaffeparser_static
Scanning dependencies of target nvcaffeparser
[ 37%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/proto/trtcaffe.pb.cc.o
[ 38%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseAbsVal.cpp.o
[ 40%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/proto/trtcaffe.pb.cc.o
[ 41%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseAbsVal.cpp.o
[ 41%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseBatchNorm.cpp.o
[ 47%] Built target nvonnxparser
[ 49%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser.dir/caffeParser/opParsers/parseBNLL.cpp.o
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudnn.so.8, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudart.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libnvrtc.so.10.2, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudaMemcpyAsync'
/pdk_files/tensorrt/lib/libnvinfer_plugin.so: undefined reference to `cudnnSetTensor4dDescriptor'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnPoolingForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnActivationForward@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnCreate@libcudnn.so.8'
/pdk_files/tensorrt/lib/libmyelin.so: undefined reference to `cudnnGetConvolutionBackwardFilterAlgorithmMaxCount@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudnnConvolutionBackwardData@libcudnn.so.8'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetProgramLogSize@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `nvrtcGetPTXSize@libnvrtc.so.10.2'
/pdk_files/tensorrt/lib/libnvinfer.so: undefined reference to `cudaStreamWaitEvent@libcudart.so.10.2'
...
...
...

[ 85%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parsePReLU.cpp.o
[ 85%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseReduction.cpp.o
[ 86%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseReLU.cpp.o
[ 86%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseReshape.cpp.o
[ 88%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseScale.cpp.o
[ 89%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseSigmoid.cpp.o
[ 89%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseSoftMax.cpp.o
[ 91%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/opParsers/parseTanH.cpp.o
[ 92%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeWeightFactory/caffeWeightFactory.cpp.o
[ 92%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/caffeParser/caffeParser.cpp.o
[ 94%] Building CXX object parsers/caffe/CMakeFiles/nvcaffeparser_static.dir/NvCaffeParser.cpp.o
[ 95%] Linking CXX shared library ../../out/libnvcaffeparser.so
[ 95%] Built target nvcaffeparser
[ 97%] Linking CXX static library ../../out/libnvcaffeparser_static.a
[ 98%] Built target nvcaffeparser_static
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

full log (a.log):

a.log

zeroepoch commented 4 years ago

@Shaked, Your original problem was due to missing the -DCMAKE_TOOLCHAIN_FILE argument. That is why you were running into incompatible ELF files. From looking at the CMake files I see you might need to set CUDNN_ROOT_DIR to where cuDNN is located for AArch64. It should be the directory that contains lib(64) and include. Can you try building with make ... VERBOSE=1 which will give you more information including the -I and -L arguments that get generated. Then it would be good to compare those paths to the content of the directories using tree or a similar command. Please attach the logs to the your comment if you have any output to share rather than paste the raw text into the comment because it's REALLY hard to follow the conversation now due to the large spans of text between comments.

ttyio commented 4 years ago

I will close this issue since we already provide the solution, @Shaked please reopen if you still hit issues, thanks!

DJT777 commented 3 years ago

Reading through this github post helped me solve installing on a Jetson TX1 on JetPack 4.4.2 using 7.1.3 branch.

Commands Used:

> git clone -b 7.1.3 https://www.github.com/NVIDIA/TensorRT

> cd TensorRT

>git submodule update --init --recursive

>mkdir && cd build

> cmake .. -DTRT_LIB_DIB=/usr/lib/aarch64-linux-gnu -DTRT_OUT_DIR=/media/user/SD/TensorRT/build/out -DCMAKE_TOOLCHAIN=/media/user/SD/TensorRT/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=10.2

>$

>cc=aarch64-linux-gnu-gcc make -j8 |& tee test.log

Useful info: CMAKE_TOOLCHAIN may not be needed using these commands

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN

P.S. Toolchain may or may not be needed in cmake of TensorRT with these commands.

Many libraries needed are not found in the /targets directory of cuda. Libraries such as NVInfer....so are /usr/lib/aarch64-linux-gnu.

Hopefully this helps someone!

rarazac commented 3 years ago

@Shaked and @ttyio

Have you solved the problem: usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: warning: libcudnn.so.8, needed by /pdk_files/tensorrt/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)

I used following cmake command (after fixing the dockerfile to build the dockercontainer and adding more log to cmakslist): cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out -DBUILD_PLUGINS=OFF -DCMAKE_TOOLCHAIN_FILE=$TRT_SOURCE/cmake/toolchains/cmake_aarch64.toolchain -DCMAKE_CUDA_SEPARABLE_COMPILATION=OFF -DCUDA_VERSION=10.2 -DCUBLASLT_LIB="/usr/lib/aarch64-linux-gnu/libcublasLt.so" -DCUBLAS_LIB="/usr/lib/aarch64-linux-gnu/libcublas.so" -DCUDNN_LIB="/pdk_files/cudnn/lib/libcudnn.so.8"

root@0c622d0388ff:/workspace/TensorRT/build# cmake .. -DTRT_LIB_DIR=$TRT_RELEASE/lib -DTRT_OUT_DIR=`pwd`/out -DBUILD_PLUGINS=OFF -DCMAKE_TOOLCHAIN_FILE=$TRT_SOURCE/cmake/toolchains/cmake_aarch64.toolchain -DCMAKE_CUDA_SEPARABLE_COMPILATION=OFF -DCUDA_VERSION=10.2 -DCUBLASLT_LIB="/usr/lib/aarch64-linux-gnu/libcublasLt.so" -DCUBLAS_LIB="/usr/lib/aarch64-linux-gnu/libcublas.so" -DCUDNN_LIB="/pdk_files/cudnn/lib/libcudnn.so.8"
Building for TensorRT version: 7.2.1, library version: 7
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Targeting TRT Platform: aarch64
-- CUDA version set to 10.2
-- cuDNN version set to 8.0
-- Protobuf version set to 3.0.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'zlib'
-- Setting up another Protobuf build for cross compilation targeting aarch64-Linux
-- Using libprotobuf /workspace/TensorRT/build/third_party.protobuf_aarch64/lib/libprotobuf.a
-- found:/pdk_files/cudnn/lib/libcudnn.so.8
-- found:/usr/lib/aarch64-linux-gnu/libcublas.so
-- found:/usr/lib/aarch64-linux-gnu/libcublasLt.so
-- ========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found /pdk_files/tensorrt/lib/libnvinfer.so
-- ==========================================================================================
-- ========================= Importing and creating target nvuffparser ==========================
-- Looking for library nvparsers
-- Library that was found /pdk_files/tensorrt/lib/libnvparsers.so
-- ==========================================================================================
-- found:/usr/local/cuda-10.2/targets/aarch64-linux/lib/libcudart.so
CMake Warning at CMakeLists.txt:181 (message):
  Detected CUDA version is < 11.0.  SM80 not supported.

-- GPU_ARCHS is not defined. Generating CUDA code for default SMs: 35;53;61;70;75;72
-- ========================= Importing and creating target nvinfer_plugin ==========================
-- Looking for library nvinfer_plugin
-- Library that was found /pdk_files/tensorrt/lib/libnvinfer_plugin.so
-- ==========================================================================================
-- Protobuf proto/trtcaffe.proto -> proto/trtcaffe.pb.cc proto/trtcaffe.pb.h
-- /workspace/TensorRT/build/parsers/caffe
-- The C compiler identification is GNU 7.5.0
-- Build type not set - defaulting to Release
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.proto
Generated: /workspace/TensorRT/build/parsers/onnx/third_party/onnx/onnx/onnx-operators_onnx2trt_onnx-ml.proto
-- 
-- ******** Summary ********
--   CMake version         : 3.14.4
--   CMake command         : /usr/local/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/aarch64-linux-gnu-g++
--   C++ compiler version  : 7.5.0
--   CXX flags             : -Wno-deprecated-declarations  -DBUILD_SYSTEM=cmake_oss -Wall -Wno-deprecated-declarations -Wno-unused-function -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : _PROTOBUF_INSTALL_DIR=/workspace/TensorRT/build/third_party.protobuf;ONNX_NAMESPACE=onnx2trt_onnx
--   CMAKE_PREFIX_PATH     : 
--   CMAKE_INSTALL_PREFIX  : /pdk_files/tensorrt/lib/..
--   CMAKE_MODULE_PATH     : 
-- 
--   ONNX version          : 1.6.0
--   ONNX NAMESPACE        : onnx2trt_onnx
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
-- 
--   Protobuf compiler     : 
--   Protobuf includes     : 
--   Protobuf libraries    : 
--   BUILD_ONNX_PYTHON     : OFF
-- Found TensorRT headers at /workspace/TensorRT/include
-- Find TensorRT libs at /pdk_files/tensorrt/lib/libnvinfer.so;/pdk_files/tensorrt/lib/libnvinfer_plugin.so;/pdk_files/tensorrt/lib/libmyelin.so
-- Found TENSORRT: /workspace/TensorRT/include  
-- Adding new sample: sample_algorithm_selector
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_char_rnn
--     - Parsers Used: uff;caffe;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_dynamic_reshape
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_fasterRCNN
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_googlenet
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_int8
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_int8_api
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mlp
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_mnist_api
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_movielens_mps
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_nmt
--     - Parsers Used: none
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist
--     - Parsers Used: onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_plugin
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_reformat_free_io
--     - Parsers Used: caffe
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_ssd
--     - Parsers Used: caffe
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_fasterRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_maskRCNN
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_uff_mnist
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_plugin_v2_ext
--     - Parsers Used: uff
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Adding new sample: sample_uff_ssd
--     - Parsers Used: uff
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: sample_onnx_mnist_coord_conv_ac
--     - Parsers Used: onnx
--     - InferPlugin Used: ON
--     - Licensing: opensource
-- Adding new sample: trtexec
--     - Parsers Used: caffe;uff;onnx
--     - InferPlugin Used: OFF
--     - Licensing: opensource
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/TensorRT/build
root@0c622d0388ff:/workspace/TensorRT/build# 

I can add more information if required. I think there is just some linker information missing, but i am not sure how to correct adapt the cmake files...