Package Details: colmap 4.2.0-4

Git Clone URL: https://aur.archlinux.org/colmap.git (read-only, click to copy)
Package Base: colmap
Description: General-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface.
Upstream URL: https://colmap.github.io/
Licenses: GPL
Submitter: bartus
Maintainer: bartus
Last Packager: bartus
Votes: 7
Popularity: 0.018697
First Submitted: 2019-03-27 07:15 (UTC)
Last Updated: 2026-09-24 10:29 (UTC)

Pinned Comments

bartus commented on 2019-04-10 11:42 (UTC) (edited on 2026-06-13 13:47 (UTC) by bartus)

Please report issues and patches at GitHub: https://github.com/bartoszek/AUR-colmap

There are flags in the PKGBUILD that control the cuda and freeimage build:

  • BUILD_CUDA=ON build cuda danse mesh solver (default ON, set to OFF to disable cuda)
  • CUDA_ARCH=native define cuda compute arch (default native to autodetect current system GPU arch, can be set to e.g, sm_70 for specific arch)
  • FRAGMENT=#{tag,commit,branch}=### for bisec build.

Use with your AUR helper or directly with the makepkg:

  • yay/paru --mflags=BUILD_CUDA=ON --mflags=CUDA_ARCH=sm_52
  • makepkg BUILD_CUDA=ON FRAGMENT=#branch=devel

Latest Comments

1 2 Next › Last »

bartus commented on 2026-09-24 10:40 (UTC) (edited on 2026-09-24 10:42 (UTC) by bartus)

@dreieck I like the scheme, but what if a random AUR package in the local repo also provides libjpeg.so?

btw. Clever homepage you've got there.

dreieck commented on 2026-09-05 09:28 (UTC)

depends needs to be changed (libjpeg):

Can you please change

  • dependendy libjpeg to libjpeg-turbo (any maybe existing make dependency libjpeg needs also to be changed to libjpeg-turbo),
    or maybe more elaboreate,
  • dependencies libjpeg to libjpeg.so AND add make dependency libjpeg-turbo?

Reason: Arch Linux does not have libjpeg anymore, and libjpeg-turbo stopped to declare libjpeg in it's provides array.

Regards and thanks for maintaining!

dack commented on 2026-07-12 15:40 (UTC)

Can you please change the libjpeg dependency to libjpeg-turbo? The libjpeg virtual package has been dropped, and all packages are expected to reference libjpeg-turbo instead. See links below.

https://archlinux.org/todo/stop-relying-on-virtual-libjpeg-lib32-libjpeg-package/

https://gitlab.archlinux.org/archlinux/packaging/packages/libjpeg-turbo/-/commit/a0e534d2803d7561c791ab5cd7f1a6f496d0cfaa

bartus commented on 2026-06-13 10:56 (UTC) (edited on 2026-06-13 11:08 (UTC) by bartus)

@dack: I've got to apologise paru devs, as paru --rebuild --chroot=/tmp/paru --mflags="BUILD_CUDA=ON CUDA_ARCH=80" --fm vifm --chrootpkgs='ccache,makepkg-optimize' --chrootflags="-d /mnt/ccache:/build/.ccache" colmap besides resolving dependencies according to makepkg -s preserving the intended behaviour of the control env vars, also allows to edit the source PKBGUILD with vifm while building in a clean ephemeral chroot entirely in tmpfs with my ccache build cache bind mounted and custome optimization script applied 👍

bartus commented on 2026-06-08 16:48 (UTC) (edited on 2026-06-13 13:52 (UTC) by bartus)

@caellion, @dack: It's a paru dev decision to break compatibility with makepkg -s already tried to nag them to conform to the intended makepkg behaviour, without result.

I can't be bothered to maintain different versions of the package to work against each distro/aur-helper combo 😁

caellian commented on 2026-04-20 02:46 (UTC) (edited on 2026-04-20 02:47 (UTC) by caellian)

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"

dack commented on 2026-03-30 04:46 (UTC)

A couple of suggestions:

Please add a dependency for fmt. Build in clean chroot fails without it.

Using environment variables to change the dependencies for cuda/cpu builds seems to cause issues for paru. I believe this is because paru queries aur for dependencies, rather than executing the PKGBUILD to determine them. I think it would be better to split the package into two separate ones (such as "colmap" and "colmap-cuda"), rather than use environment variables. That way, the dependencies seen in aur web/api are correct and builds with paru work, and any other automated build tools should have consistent/reproducible results. This seems a pretty standard way other packages have dealt with different builds for cuda and cpu as well.

As a workaround for paru users, you can "paru -G colmap" to download the PKGBUILD and then "paru -B colmap" to build it from the local copy.

nvdx commented on 2026-03-20 16:49 (UTC) (edited on 2026-03-20 16:50 (UTC) by nvdx)

resolving dependencies...
looking for conflicting packages...
:: onnxruntime-cpu-1.24.4-1 and onnxruntime-cuda-1.24.4-1 are in conflict (onnxruntime). Remove onnxruntime-cuda? [y/N] N
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: onnxruntime-cpu-1.24.4-1 and onnxruntime-cuda-1.24.4-1 are in conflict

Can't have onnxruntime-cpu and onnxruntime-cuda at same time as dependencies.

Can the PKGBUILD be updated ?

bartus commented on 2026-02-16 17:19 (UTC)

@sorn: yap 😁

sorn commented on 2026-02-09 20:30 (UTC)

Hi, Any chance of an update, here? It'd be lovely to have this package up to date. Thanks in advance. :-)