@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.
| 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) |
@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.
depends needs to be changed (libjpeg):Can you please change
libjpeg to libjpeg-turbo (any maybe existing make dependency libjpeg needs also to be changed to libjpeg-turbo),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!
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/
@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 👍
@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 😁
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"
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.
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 ?
@sorn: yap 😁
Hi, Any chance of an update, here? It'd be lovely to have this package up to date. Thanks in advance. :-)
Pinned Comments
bartus commented on 2019-04-10 11:42 (UTC) (edited on 2026-06-13 13:47 (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)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_52makepkg BUILD_CUDA=ON FRAGMENT=#branch=devel