switch to eigen by default and discard arch cflags

This commit is contained in:
Christoph Haag 2022-01-04 23:43:22 +01:00
parent 2209ba99a7
commit 4862c89b2b
2 changed files with 15 additions and 6 deletions

View file

@ -1,6 +1,6 @@
pkgbase = libsurvive-git
pkgdesc = Open-Source tool for working with lighthouse-based tracking data, including support for the HTC Vive, Vive Pro and Valve Index.
pkgver = 2021.35f40ce
pkgver = 2023.feca145
pkgrel = 1
url = https://github.com/cntools/libsurvive
arch = x86_64
@ -12,10 +12,9 @@ pkgbase = libsurvive-git
depends = hidapi
depends = xr-hardware
depends = libpcap
depends = lapacke
depends = cblas
depends = zlib
depends = libusb
depends = eigen
provides = libsurvive
conflicts = libsurvive
source = libsurvive::git+https://github.com/cntools/libsurvive.git

View file

@ -1,12 +1,12 @@
basename=libsurvive
pkgname=$basename-git
pkgver=2021.35f40ce
pkgver=2023.feca145
pkgrel=1
pkgdesc="Open-Source tool for working with lighthouse-based tracking data, including support for the HTC Vive, Vive Pro and Valve Index."
arch=(x86_64 i686)
url="https://github.com/cntools/libsurvive"
license=(MIT)
depends=("hidapi" "xr-hardware" "libpcap" "lapacke" "cblas" "zlib" "libusb")
depends=("hidapi" "xr-hardware" "libpcap" "zlib" "libusb" "eigen") # "lapacke" "cblas" "blas"
conflicts=($basename)
provides=($basename)
makedepends=("git" "cmake" "ninja")
@ -31,9 +31,19 @@ prepare() {
}
build() {
# HACK: possible issue with -O flags and second index controller not being detected, seems to be better with only survive's own cflags
unset CFLAGS CXXFLAG
cd $basename
rm -rf build
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib
# there is an openblas issue that causes high cpu usage unless OPENBLAS_NUM_THREADS=0 is set.
# works with lapack reference blas but its use is discouraged as it's not tuned.
# -DUSE_EIGEN=ON disables the use of blas in favor of libsurvive's own single threaded matrix math using eigen.
# This will probably require slightly more cpu power than a tuned blas implementation.
# If running on a weak CPU, consider installing a blas implementation and using -DUSE_EIGEN=OFF.
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DUSE_EIGEN=ON
ninja -C build
}