You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched other issues and no duplicate issues were found.
I'm convinced that this is not my fault but a bug.
Description
The package autoware_tensorrt_common doesn't build, because it expects old #define-variables from NvInferVersion.h. That also may apply to other packages dependent on TensorRT.
Expected behavior
The package builds without any error.
Actual behavior
The package autoware_tensorrt_common doesn't build and returns these errors to the terminal:
--- stderr: autoware_tensorrt_common
In file included from /home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp:15:
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/include/autoware/tensorrt_common/tensorrt_common.hpp:118:28: error: operator '>=' has no left operand
118 | #if TENSORRT_VERSION_MAJOR >= 8
| ^~
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp:509:28: error: operator '>=' has no left operand
509 | #if TENSORRT_VERSION_MAJOR >= 8
| ^~
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp:528:28: error: operator '<' has no left operand
528 | #if TENSORRT_VERSION_MAJOR < 8
| ^
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp:536:28: error: operator '<' has no left operand
536 | #if TENSORRT_VERSION_MAJOR < 8
| ^
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp: In member function ‘bool autoware::tensorrt_common::TrtCommon::buildEngineFromOnnx(const string&, const string&)’:
/home/dekor-x/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common/src/tensorrt_common.cpp:539:45: error: ‘plan’ was not declared in this scope
539 | file.write(reinterpret_cast<const char *>(plan->data()), plan->size());
| ^~~~
gmake[2]: *** [CMakeFiles/autoware_tensorrt_common.dir/build.make:76: CMakeFiles/autoware_tensorrt_common.dir/src/tensorrt_common.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/autoware_tensorrt_common.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< autoware_tensorrt_common [21.0s, exited with code 2]
Steps to reproduce
Install TensorRT 8.6 GA from Nvidia (it shoudln't make lots of difference from the installation tutorial, if at all.)
Create symbolic links to the .so-files of TensorRT, so cmake can find the files and headers.
Try and build autoware according to the source installation tutorial
If i need to go more into detail, please let me know.
Versions
OS: Ubuntu 22.04.5 LTS
ROS2: humble
Autoware: main-branch (as of 2024.12.12)
Possible causes
TensorRT defines the variables for the version numbers with a different name than Autoware/Cmake expects. Compare the NvInferVersion.h to the error output at Actual Behavior.
NvInferVersion.h:
/*
* SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
*
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
* property and proprietary rights in and to this material, related
* documentation and any modifications thereto. Any use, reproduction,
* disclosure or distribution of this material and related documentation
* without an express license agreement from NVIDIA CORPORATION or
* its affiliates is strictly prohibited.
*/
//!
//! \file NvInferVersion.h
//!
//! Defines the TensorRT version
//!
#ifndef NV_INFER_VERSION_H
#define NV_INFER_VERSION_H
#define NV_TENSORRT_MAJOR 8 //!< TensorRT major version.
#define NV_TENSORRT_MINOR 6 //!< TensorRT minor version.
#define NV_TENSORRT_PATCH 1 //!< TensorRT patch version.
#define NV_TENSORRT_BUILD 6 //!< TensorRT build number.
#define NV_TENSORRT_LWS_MAJOR 0 //!< TensorRT LWS major version.
#define NV_TENSORRT_LWS_MINOR 0 //!< TensorRT LWS minor version.
#define NV_TENSORRT_LWS_PATCH 0 //!< TensorRT LWS patch version.
// This #define is deprecated in TensorRT 8.6 and will be removed in 10.0. Use NV_TENSORRT_MAJOR.
#define NV_TENSORRT_SONAME_MAJOR 8 //!< Shared object library major version number.
// This #define is deprecated in TensorRT 8.6 and will be removed in 10.0. Use NV_TENSORRT_MINOR.
#define NV_TENSORRT_SONAME_MINOR 6 //!< Shared object library minor version number.
// This #define is deprecated in TensorRT 8.6 and will be removed in 10.0. Use NV_TENSORRT_PATCH.
#define NV_TENSORRT_SONAME_PATCH 1 //!< Shared object library patch version number.
#define NV_TENSORRT_RELEASE_TYPE_EARLY_ACCESS 0 //!< An early access release
#define NV_TENSORRT_RELEASE_TYPE_RELEASE_CANDIDATE 1 //!< A release candidate
#define NV_TENSORRT_RELEASE_TYPE_GENERAL_AVAILABILITY 2 //!< A final release
#define NV_TENSORRT_RELEASE_TYPE NV_TENSORRT_RELEASE_TYPE_GENERAL_AVAILABILITY //!< TensorRT release type
#endif // NV_INFER_VERSION_H
Additional context
No response
The text was updated successfully, but these errors were encountered:
Am i supposed to change something in my .bashrc or anywhere else? From reading the linked CMakeLists.txt, I think I have to define TENSORRT_ROOT=/usr in my .bashrc, is that correct? - I'm sorry for not knowing better.
As of now, i managed to build it correctly by changing the names of the macros inside the condition-checks, even if it's not the intended way. - I can revert these changes and try to rebuild it, because I'd also rather have the package build from the source code.
Checklist
Description
The package autoware_tensorrt_common doesn't build, because it expects old #define-variables from NvInferVersion.h. That also may apply to other packages dependent on TensorRT.
Expected behavior
The package builds without any error.
Actual behavior
The package autoware_tensorrt_common doesn't build and returns these errors to the terminal:
Steps to reproduce
If i need to go more into detail, please let me know.
Versions
Possible causes
TensorRT defines the variables for the version numbers with a different name than Autoware/Cmake expects. Compare the NvInferVersion.h to the error output at Actual Behavior.
NvInferVersion.h:
Additional context
No response
The text was updated successfully, but these errors were encountered: