Package Details: flann 1.9.1-7

Git Clone URL: (read-only, click to copy)
Package Base: flann
Description: FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces
Upstream URL:
Licenses: BSD
Submitter: None
Maintainer: acxz
Last Packager: acxz
Votes: 44
Popularity: 0.22
First Submitted: 2011-04-05 02:06
Last Updated: 2020-04-19 05:05

Pinned Comments

acxz commented on 2020-02-03 02:07

Development is on Github: Please open issues and PRs there instead of commenting.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

Anonymous comment on 2016-08-15 22:04

Did not work with standard hdf5 needed hdf5-cpp-fortran

Alad commented on 2016-05-19 12:53

Quote srcdir/pkgdir so the build doesn't fail in directories with spaces in them.

kikislater commented on 2016-05-17 19:25

Please update. Thanks @hanno : Working PKGBUILD below

# Maintainer: Sven-Hendrik Haase <>
# Maintainer: Javier Fuentes <>
# Contributor: Figo.zhang <>
# Contributor: hauptmech

pkgdesc="FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces"
arch=('i686' 'x86_64')
makedepends=('cmake' 'python2')
optdepends=('python2: python bindings'
'cuda: cuda support')
source=("${pkgver}" "")

build() {
cd $srcdir/flann-${pkgver}-src
patch -p0 < ../flann-1.8.4-gcc6.patch

sed -i 's/lib64/lib/g' cmake/flann_utils.cmake

sed -i '1 i #undef _GLIBCXX_ATOMIC_BUILTINS' src/cpp/flann/algorithms/
sed -i '1 i #undef _GLIBCXX_USE_INT128' src/cpp/flann/algorithms/

sed -i 's|#!/usr/bin/env python|#!/usr/bin/python2|' \
bin/ \
bin/ \
src/python/ \
test/ \
test/ \
test/ \
test/ \

sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' \
test/ \

sed -i "s|setup\.py install| install --root=$pkgdir --optimize=1|" src/python/CMakeLists.txt

[[ -d build ]] && rm -r build
mkdir build && cd build
cmake .. \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \

package() {
cd $srcdir/flann-${pkgver}-src

cd build
make DESTDIR=$pkgdir install

#install license file
install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

# FIXME: awful hack, but I got this error without the fix:
# running install_lib
# copying build/lib/pyflann/ -> /usr/lib/python2.7/site-packages/pyflann
# error: /usr/lib/python2.7/site-packages/pyflann/ Permission denied
_python2libpath="`python2 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" | tr -d '\n'`"
mkdir -p "${pkgdir}${_python2libpath}"
cp -pr "${pkgdir}/usr/share/flann/python/pyflann" "${pkgdir}${_python2libpath}/pyflann"


hanno commented on 2016-05-11 09:34

Not working anymore with gcc6 - this patch helps:

poinu commented on 2016-05-09 14:29

Should update to handle new C++ ABI default.

0xffaa commented on 2014-02-05 17:07

cuda opt-depend only

a_user commented on 2014-02-02 13:32

+1 for CUDA as an opt-depend only

bchretien commented on 2014-01-21 23:57

Indeed, cuda should be an optional dependency. If users install AUR packages recursively (e.g. PCL), they will end up installing CUDA automatically even if they cannot use it. And that is quite a lot of wasted storage space...

costashatz commented on 2014-01-20 18:22

+1 for CUDA as an opt-depend only

Svenstaro commented on 2013-10-28 17:36

Feel free to take over maintainership. I disowned the package.