flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.25k stars 648 forks source link

Use system version of liblz4 #399

Closed jspricke closed 5 years ago

jspricke commented 5 years ago

Also make sure that flann_cpp is linked against LZ4.

thesvend commented 5 years ago

I was also experiencing issues with the pcl_kdtree and happy to find a fix for that. However, when building the merged bugfix my CMake is firing the following error message:

Found OpenMP_C: -openmp (found version "2.0") 
Found OpenMP_CXX: -openmp (found version "2.0") 
Found OpenMP: TRUE (found version "2.0")  
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.11/Modules/FindPkgConfig.cmake:39 (find_package_handle_standard_args)
  CMakeLists.txt:149 (find_package)

Do you have any Idea what I can do to fix this?

jspricke commented 5 years ago

You are missing pkg-config. I don't use Windows, but there seems to be some information here:

https://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows

thesvend commented 5 years ago

Thanks for the fast reply, you were right 👍 - that indeed was the problem. However, now CMake is missing the liblz4-package. Another Windows issue I suppose. I will continue working on that tomorrow and let you know if everything worked out eventually

thesvend commented 5 years ago

Gave it another shot today but my cmake is still unable to find the liblz4-package. Before the merge commit these files where included in "src/cpp/flann/ext/lz4.h" but now that you removed them I need to put them somewhere else. I still have the lz4.h and the liblz4.dll however I don't know where to put them or how to tell FindPkgConfig where it should look for them. * jspricke do you have any ideas on how to relsove that?


Checking for module 'liblz4'
  No package 'liblz4' found
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPkgConfig.cmake:418 (message):
  A required package was not found
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.11/Modules/FindPkgConfig.cmake:585 (_pkg_check_modules_internal)
  CMakeLists.txt:150 (pkg_check_modules)
jspricke commented 5 years ago

You can find lz4 here: https://github.com/lz4/lz4/releases

thesvend commented 5 years ago

thanks for the help :) @jspricke

jspricke commented 5 years ago

Good to hear :). Can you write some documentation how to do it for the Readme.md and send it as a pull request?

thesvend commented 5 years ago

As soon as I get it running, I will definitely do that! For now I have a small workaround but hopefully will get to it beginning of next week :)

Huynh-Anh commented 4 years ago

i got the same issue. where fo you put the lz4.h and the liblz4.dll for cmake to see it ?

nh2 commented 3 years ago

I made a PR to fix lz4 missing from the flann.pc pkg-config file: #481

risicle commented 2 years ago

LLVM's lld doesn't support --push-state (https://reviews.llvm.org/D37733), and so this now fails to build on macos.

jspricke commented 2 years ago

I don't remember why I added the --push-state back then but --as-needed is the default on Debian nowadays anyhow so I guess we could drop that here.