Package Details: flann 1.9.1-2

Git Clone URL: https://aur.archlinux.org/flann.git (read-only)
Package Base: flann
Description: FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces
Upstream URL: http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN
Licenses: BSD
Submitter: None
Maintainer: racko (GPereira)
Last Packager: racko
Votes: 37
Popularity: 2.309637
First Submitted: 2011-04-05 02:06
Last Updated: 2018-03-06 21:45

Dependencies (7)

Required by (8)

Sources (2)

Latest Comments

GPereira commented on 2018-04-25 22:42

Hi, you need to add lz4 to the target_link_libraries. Can I comantain this package with you?

bartus commented on 2018-04-09 08:02

@racko: please update flans pkgconfig file (flann.pc) to include -llz4, it prevents successful building of openmvg-git package witch depends on pkgconfig for setting linker flags.

clynamen commented on 2018-03-25 21:31

the static libraries libflann_s.a and libflann_cpp.a are not copied in the built package

racko commented on 2018-03-06 21:49

Fixed. I messed up the library order in the target_link_libraries call. The linker would think that lz4 is unneeded. Since "--as-needed" is included in LDFLAGS in the default /etc/makepkg.conf, lz4 was removed.

I removed "--as-needed" a long time ago because some other AUR package messed up, so the error didn't occur on my main machine.

Thanks for bringing up the issue again.

racko commented on 2018-03-06 06:27

Hmm ... I can reproduce this now as well.

Even after building with make VERBOSE=1 and seeing (note -llz4)

c++ -fPIC -march=native -O3 -pipe -fstack-protector-strong -fopenmp -O3 -DNDEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro -shared -Wl,-soname,libflann.so.1.9 -o ../../lib/libflann.so.1.9.1  -llz4 -Wl,-whole-archive ../../lib/libflann_s.a -Wl,-no-whole-archive

the resulting libflann.so still does not list an lz4 dependency :(

I am looking into it.

subhuman22 commented on 2018-03-06 03:20

The resulting libflann.so still omits dependency on system liblz4

    $ ldd /usr/lib/libflann.so

    linux-vdso.so.1 (0x00007ffe6fdf5000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f0554eb1000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007f0554b65000)
    libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f0554937000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f0554720000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f0554369000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x00007f0555978000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f0554165000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f0553f47000)

As a temporary fix, you can just use src/cpp/ext/lz4... by removing patch lines in PKGBUILD. Not sure this can be a problem in the future.

racko commented on 2018-01-29 18:46

Thanks, fixed.

lukaszmoroz commented on 2018-01-28 23:49

I needed texlive-core to make this package.

justbuchanan commented on 2018-01-18 05:49

I ran into an lz4 issue when linking against flann from a library built through cmake. If I add target_link_libraries(mylib lz4) to my cmake, everything works again. Here's the error message:

undefined reference to symbol 'LZ4_decompress_safe_continue'
/usr/lib/liblz4.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I used ldd to inspect the library deps of flann and here's what I see. Neither library shows a dependency on liblz4.

$ ldd /usr/lib/libflann_cpp.so           
linux-vdso.so.1 (0x00007ffda0370000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f398c423000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f398c205000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f398be4e000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f398bb02000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f398c9ac000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f398b8eb000)
$ ldd /usr/lib/libflann.so           
linux-vdso.so.1 (0x00007fff4adce000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f5b4186a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f5b4151e000)
libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f5b412f0000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5b410d9000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f5b40d22000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f5b4232a000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f5b40b1e000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f5b40900000)

I see the patch file that links against the system's lz4 and it looks right as far as I can tell. Any thoughts?

note: I'm using version 1.9.1-1 of this pkgbuild.

racko commented on 2018-01-10 21:39

@kartikmohta: I followed your suggestion and made flann use the system's lz4. I did not change flann's version number to minimize issues for other users in case I did something wrong. Could you please give it a try?

(I also cleaned up the PKGBUILD a bit more.)

All comments