So I think to fix onnxruntime breaking in paru, you can simply use the metapackage and let the user decide what to do instead of trying to infer it based on the system:
diff --git a/PKGBUILD b/PKGBUILD
index c316f8e..bf72864 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,6 @@ check_option "debug" "y" && BUILD_TYPE=Debug || BUID_TYPE=Release
## Configuration env vars:
_ver=4.0.1
-_BUILD_CUDA="${BUILD_CUDA:-ON}"
_CUDA_ARCH="${CUDA_ARCH:-native}"
_fragment=${FRAGMENT:-#tag=$_ver}
# Use CMAKE_FLAGS=xxx:yyy:zzz to define extra CMake flags
@@ -21,15 +20,9 @@ arch=('i686' 'x86_64')
url="https://colmap.github.io/"
license=('GPL')
groups=()
-depends=('cgal' 'ceres-solver' 'gflags' 'openimageio' 'suitesparse' 'freeglut' 'glew' 'google-glog' 'libjpeg' 'boost-libs' 'qt5-base' 'metis' 'flann')
+depends=('cgal' 'ceres-solver' 'gflags' 'openimageio' 'suitesparse' 'freeglut' 'glew' 'google-glog' 'libjpeg' 'boost-libs' 'qt5-base' 'metis' 'flann' 'onnxruntime' 'protobuf')
makedepends=('boost' 'cmake' 'eigen' 'git' 'ninja' 'python-sphinx')
-if [ "$_BUILD_CUDA" == "ON" ] ; then
- depends+=('onnxruntime-cuda' 'protobuf')
- makedepends+=('cuda')
- optdepends+=('libcudart.so: required for dense reconstruction')
-else
- depends+=('onnxruntime-cpu' 'protobuf')
-fi
+optdepends+=('libcudart.so: CUDA support for dense reconstruction')
source=("${pkgname}::git+https://github.com/colmap/colmap.git${_fragment}"
"vocabulary-tree-32K.bin::https://demuc.de/colmap/vocab_tree_flickr100K_words32K.bin"
"vocabulary-tree-256K.bin::https://demuc.de/colmap/vocab_tree_flickr100K_words256K.bin"
@@ -46,8 +39,8 @@ prepare() {
build() {
# determine whether we can precompile CUDA kernels
- _CUDA_PKG=$(pacman -Qsq cuda 2>/dev/null) || true
- if [[ -n "$_CUDA_PKG" && "$_BUILD_CUDA" == "ON" ]]; then
+ _CUDA_PKG=$(pacman -Qq cuda 2>/dev/null) || true
+ if [[ -n "$_CUDA_PKG" ]]; then
# determine whether we need to define cuda host compiler
if _cuda_gcc=$(readlink /opt/cuda/bin/gcc) ; then
[ -f "$_cuda_gcc" ] && export CUDAHOSTCXX="$_cuda_gcc"
Pinned Comments
bartus commented on 2019-04-10 11:42 (UTC) (edited on 2025-11-05 09:22 (UTC) by bartus)
Please report
issuesandpatchesat GitHub: https://github.com/bartoszek/AUR-colmapThere are flags in the PKGBUILD that control the
cudaandfreeimagebuild:BUILD_CUDA=ONbuildcudadanse mesh solver (defaultON, set toOFFto disablecuda)CUDA_ARCH=nativedefinecudacompute arch (defaultnativeto autodetect current system GPU arch, can be set to e.g,sm_70for specific arch)DISABLE_FREEIMAGE=1replacefreeimagein favour ofopenimageio(default: 0) (upstream PR)Use with your AUR helper or directly with the
makepkg:yay/paru --mflags=DISABLE_FREEIMAGE=1 --mflags=CUDA_ARCH=sm_52makepkg BUILD_CUDA=OFF DISABLE_FREEIMAGE=0