tensorrt-cross-builder-libs

LOW
maintainer dbermond 21 votes base tensorrt scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The package downloads a source tarball from NVIDIA's official developer domain, which is a plausible project-owned host despite not being on a standard whitelist; the rest of the sources are git repositories from official project locations, and the build process compiles from source without executing untrusted remote code.

Triggered rules

Low AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a source tarball from NVIDIA's official developer domain, which is a plausible project-owned host despite not being on a standard whitelist; the rest of the sources are git repositories from official project locations, and the build process compiles from source without executing untrusted remote code.

1 higher static finding superseded - not the current verdict (shown for transparency)
Medium source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:33 source=("https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/${pkgver%.*}/tars/TensorRT-Enterprise-${pkgver}-Linux-${CARCH}-cuda-${_cudaver}-Release-external.tar.zst"

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Daniel Bermond <dbermond@archlinux.org>
2
3pkgbase=tensorrt
4pkgname=(
5 'tensorrt'
6 'tensorrt-cross-builder-libs'
7 'python-tensorrt')
8pkgver=11.4.0.106
9_cudaver=13.4
10_onnx_graphsurgeon_ver=0.6.2
11_polygraphy_ver=0.53.6
12_tensorflow_quantization_ver=0.2.0
13pkgrel=1
14pkgdesc='A platform for high-performance deep learning inference on NVIDIA hardware'
15arch=('x86_64')
16url='https://developer.nvidia.com/tensorrt/'
17license=('Apache-2.0 AND LicenseRef-TensorRT-LICENSE-AGREEMENT')
18makedepends=(
19 'cmake'
20 'cuda'
21 'cudnn'
22 'git'
23 'nvidia-utils' # for satisfying namcap
24 'python'
25 'python-build'
26 'python-installer'
27 'python-ml-dtypes'
28 'python-onnx'
29 'python-pip'
30 'python-setuptools'
31 'python-typing_extensions'
32 'python-wheel')
33source=("https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/${pkgver%.*}/tars/TensorRT-Enterprise-${pkgver}-Linux-${CARCH}-cuda-${_cudaver}-Release-external.tar.zst"
34 "git+https://github.com/NVIDIA/TensorRT.git#tag=v$(grep -oE '[0-9]+\.[0-9]+' <<< "$pkgver" | head -n1)"
35 'git+https://github.com/protocolbuffers/protobuf.git'
36 'cub-nvlabs'::'git+https://github.com/NVlabs/cub.git'
37 'git+https://github.com/onnx/onnx-tensorrt.git'
38 'git+https://github.com/onnx/onnx.git'
39 'git+https://github.com/pybind/pybind11.git'
40 '010-tensorrt-use-local-pybind11-sources.patch'
41 'TensorRT-LICENSE-AGREEMENT.txt')
42sha256sums=('c67c87674cbe7b2337d1c30cb16d48686ab79ecb11bf08cb764b71f4f2bb711b'
43 '6aa6856994d4b6e1a4a6c38b1a66c1c6d30f39e7479295e777ca5f2d2cbdb9c7'
44 'SKIP'
45 'SKIP'
46 'SKIP'
47 'SKIP'
48 'SKIP'
49 '0fe65836ca64e5b360ba5abb5db64e74266b98aa6287d2d4f1c686861acc2d2c'
50 '64907f271b91655a28f3c9f3555a3c645b23d878f41063192a9d2a67f752205a')
51
52prepare() {
53 # tensorrt git submodules
54 git -C TensorRT submodule init
55 git -C TensorRT config --local submodule.parsers/onnx.url "${srcdir}/onnx-tensorrt"
56 git -C TensorRT config --local submodule.third_party/protobuf.url "${srcdir}/protobuf"
57 git -C TensorRT config --local submodule.third_party/cub.url "${srcdir}/cub-nvlabs"
58 git -C TensorRT -c protocol.file.allow='always' submodule update
59
60 # onnx-tensorrt git submodule
61 git -C TensorRT/parsers/onnx submodule init
62 git -C TensorRT/parsers/onnx config --local submodule.third_party/onnx.url "${srcdir}/onnx"
63 git -C TensorRT/parsers/onnx -c protocol.file.allow='always' submodule update
64
65 git -C TensorRT restore --source='v11.2' python/packaging/bindings_wheel/pyproject.toml
66 git -C TensorRT restore --source='v11.2' tools/Polygraphy/setup.py
67
68 patch -d TensorRT -Np1 -i "${srcdir}/010-tensorrt-use-local-pybind11-sources.patch"
69}
70
71build() {
72 local _cudnnver
73 _cudnnver="$(LC_ALL='C' pacman -Qi 'cudnn' | awk '/^Version/ { print $3 }' | grep -oE '^[0-9]+\.[0-9]+')"
74
75 export CXXFLAGS+=' -ffat-lto-objects'
76 cmake -B build -S TensorRT \
77 -G 'Unix Makefiles' \
78 -DBUILD_PYTHON:BOOL='ON' \
79 -DBUILD_SAMPLES:BOOL='OFF' \
80 -DCMAKE_BUILD_TYPE:STRING='None' \
81 -DCMAKE_CUDA_ARCHITECTURES:STRING='75;80;86;87;89;90;100;103;110;120;121' \
82 -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
83 -DCMAKE_PREFIX_PATH:PATH="${srcdir}/TensorRT-${pkgver}" \
84 -DCUDA_INCLUDE_DIR:STRING='/opt/cuda/include' \
85 -DONNX_BUILD_PYTHON:BOOL='ON' \
86 -Wno-author
87 cmake --build build
88
89 # python tools
90 local _dir
91 for _dir in Polygraphy tensorflow-quantization onnx-graphsurgeon
92 do
93 cd "${srcdir}/TensorRT/tools/${_dir}"
94 python -m build --wheel --no-isolation
95 done
96}
97
98_package_license() {
99 install -D -m644 TensorRT/NOTICE -t "${1}/usr/share/licenses/${2}"
100 install -D -m644 TensorRT-LICENSE-AGREEMENT.txt "${1}/usr/share/licenses/${2}/TensorRT-LICENSE-AGREEMENT"
101 install -D -m644 "TensorRT-${pkgver}/doc/Acknowledgements.txt" "${1}/usr/share/licenses/${2}/ACKNOWLEDGEMENTS"
102}
103
104package_tensorrt() {
105 depends=(
106 'cuda'
107 'cudnn'
108 'glibc'
109 'libgcc'
110 'libstdc++'
111 'nvidia-utils')
112 optdepends=(
113 'tensorrt-cross-builder-libs: for cross building engine files')
114
115 DESTDIR="$pkgdir" cmake --install build
116 install -D -m755 "TensorRT-${pkgver}/bin"/* -t "${pkgdir}/usr/bin"
117 cp -dr --no-preserve='ownership' "TensorRT-${pkgver}/include" "${pkgdir}/usr"
118 cp -dr --no-preserve='ownership' "TensorRT-${pkgver}/lib"/lib{nvinfer{,_dispatch,_lean},tensorrt_shim}.so* "${pkgdir}/usr/lib"
119
120 local _arch
121 for _arch in ptx sm{75,80,86,89,90,100,120}
122 do
123 install -D -m644 "TensorRT-${pkgver}/lib/libnvinfer_builder_resource_${_arch}.so.${pkgver%.*}" -t "${pkgdir}/usr/lib"
124 ln -s "libnvinfer_builder_resource_${_arch}.so.${pkgver%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_${_arch}.so.${pkgver%%.*}"
125 ln -s "libnvinfer_builder_resource_${_arch}.so.${pkgver%%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_${_arch}.so"
126 done
127
128 mv -f "${pkgdir}/usr/python" "$srcdir"
129
130 _package_license "$pkgdir" "$pkgname"
131}
132
133package_tensorrt-cross-builder-libs() {
134 pkgdesc='Additional TensorRT libraries for cross building engine files'
135 license=('LicenseRef-TensorRT-LICENSE-AGREEMENT')
136 depends=(
137 'glibc'
138 'libgcc'
139 'libstdc++')
140 options=('!strip')
141
142 local _arch
143 for _arch in ptx sm{75,80,86,89,90,100,120}
144 do
145 install -D -m644 "TensorRT-${pkgver}/lib/libnvinfer_builder_resource_win_${_arch}.so.${pkgver%.*}" -t "${pkgdir}/usr/lib"
146 ln -s "libnvinfer_builder_resource_win_${_arch}.so.${pkgver%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_win_${_arch}.so.${pkgver%%.*}"
147 ln -s "libnvinfer_builder_resource_win_${_arch}.so.${pkgver%%.*}" "${pkgdir}/usr/lib/libnvinfer_builder_resource_win_${_arch}.so"
148 done
149
150 _package_license "$pkgdir" "$pkgname"
151}
152
153package_python-tensorrt() {
154 pkgdesc+=' (python bindings and tools)'
155 license=("${license[0]} AND LicenseRef-Python-TensorRT-LICENSE-AGREEMENT")
156 depends=(
157 'glibc'
158 'libgcc'
159 'libstdc++'
160 'python'
161 'python-numpy'
162 'tensorrt')
163 optdepends=(
164 'python-colored: for onnx_graphsurgeon and polygraphy python modules'
165 'python-ml-dtypes: for onnx_graphsurgeon python module'
166 'python-onnx: for onnx_graphsurgeon python module'
167 'python-onnxruntime: for onnx_graphsurgeon python module'
168 'python-protobuf: for polygraphy python module'
169 'python-pytorch: for polygraphy python module'
170 'python-tensorflow-cuda: for polygraphy and tensorflow-quantization python modules'
171 'python-tf2onnx: for tensorflow-quantization python module')
172 provides=(
173 "python-onnx-graphsurgeon=${_onnx_graphsurgeon_ver}"
174 "python-polygraphy=${_polygraphy_ver}"
175 "python-tensorflow-quantization=${_tensorflow_quantization_ver}")
176
177 python -m installer --destdir="$pkgdir" python/*.whl
178
179 local _dir
180 for _dir in Polygraphy tensorflow-quantization onnx-graphsurgeon
181 do
182 python -m installer --destdir="$pkgdir" "TensorRT/tools/${_dir}/dist"/*.whl
183 done
184
185 _package_license "$pkgdir" "$pkgname"
186
187 local _sitepkgs
188 _sitepkgs="$(python -c 'import site; print(site.getsitepackages()[0])')"
189 ln -sr "${pkgdir}${_sitepkgs}/tensorrt-${pkgver}.dist-info/licenses/LICENSE.txt" \
190 "${pkgdir}/usr/share/licenses/${pkgname}/Python-TensorRT-LICENSE-AGREEMENT"
191}
192

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Low 2
2026-10-31 00:07:41 Low 2
2026-10-30 00:29:30 Low 2
2026-10-29 00:13:55 Low 2
2026-10-28 00:06:54 Low 2
2026-10-27 00:23:28 Low 2
2026-10-26 00:12:40 Low 2
2026-10-25 00:20:48 Low 2
2026-10-24 00:14:55 Low 2
2026-10-23 00:02:19 Low 2
2026-10-22 00:13:10 Low 2
2026-10-21 00:12:50 Low 2
2026-10-20 00:10:31 Low 2
2026-10-19 00:03:55 Low 2
2026-10-18 00:06:55 Low 2
2026-10-17 00:21:55 Low 2
2026-10-16 00:12:47 Low 2
2026-10-15 00:28:05 Low 2
2026-10-14 00:06:47 Low 2
2026-10-13 00:23:45 Low 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion