Package Details: colmap 4.0.1-3

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.70
First Submitted: 2019-03-27 07:15 (UTC)
Last Updated: 2026-03-17 17:45 (UTC)

Pinned Comments

bartus commented on 2019-04-10 11:42 (UTC) (edited on 2025-11-05 09:22 (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)
  • DISABLE_FREEIMAGE=1 replace freeimage in favour of openimageio (default: 0) (upstream PR)

Use with your AUR helper or directly with the makepkg:

  • yay/paru --mflags=DISABLE_FREEIMAGE=1 --mflags=CUDA_ARCH=sm_52
  • makepkg BUILD_CUDA=OFF DISABLE_FREEIMAGE=0

Latest Comments

1 2 Next › Last »

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. :-)

zhou13 commented on 2024-12-19 23:45 (UTC) (edited on 2024-12-19 23:47 (UTC) by zhou13)

For people have problem:

Error downloading object: doc/images/dense.png (3392380): Smudge error: Error downloading doc/images/dense.png (3392380e167a935dd309afb8e2e61b03bd53437152f6dc98482df4b13fc13e87): error transferring "3392380e167a935dd309afb8e2e61b03bd53437152f6dc98482df4b13fc13e87": [0] remote missing object 3392380e167a935dd309afb8e2e61b03bd53437152f6dc98482df4b13fc13e87

You can workaround it by GIT_LFS_SKIP_SMUDGE=1 yay -S colmap-git.

@bartus: Please add export GIT_LFS_SKIP_SMUDGE=1 to the PKGBUILD so it can compile.

robtor commented on 2024-06-09 15:07 (UTC)

Might it not be better setting the default cuda architecture to 'all' so that when building with no specific options a kind of "general" package will be built that is more portable?

I would really appreciate that because I'm currently building a small custom repository with some prebuilt AUR packages that will be distributed to different hardware PC's

bazza commented on 2024-05-25 03:49 (UTC)

Error in make

-- Found GMP: /usr/lib/libgmp.so
-- Found MPFR: /lib/libmpfr.so
-- Found Boost: /usr/lib/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.66")
-- Boost include dirs: /usr/include
-- Boost libraries:    
-- Using gcc version 4 or later. Adding -frounding-math
-- Found CGAL
--   Includes : /usr/include
--   Libraries : CGAL
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:814 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /opt/cuda/bin/nvcc

aflt98 commented on 2024-02-04 00:40 (UTC) (edited on 2024-02-04 03:30 (UTC) by aflt98)

This is taking sooo long to build for me. I'm not sure but it looks like it's building gcc10 (or not I don't know). Is it normal for it to take so long to build? (I'm using yay) I mean can I just use colmap without having to sit here for HOURS waiting for gcc10 to build? This doesn't make any sense