Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use system version of liblz4 #399

Merged
merged 1 commit into from
Jan 22, 2019
Merged

Conversation

jspricke
Copy link
Contributor

Also make sure that flann_cpp is linked against LZ4.

Also make sure that flann_cpp is linked against LZ4.
@thesvend
Copy link

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
Copy link
Contributor Author

jspricke commented Feb 18, 2019 via email

@thesvend
Copy link

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
Copy link

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
Copy link
Contributor Author

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

@thesvend
Copy link

thanks for the help :) @jspricke

@jspricke
Copy link
Contributor Author

jspricke commented Feb 20, 2019 via email

@thesvend
Copy link

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
Copy link

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

nh2 added a commit to nh2/flann that referenced this pull request Nov 1, 2021
lz4 is an unconditional dependency of flann (see flann-lib#399),
but until now was not correctly generated into the
`Requires: lz4` line of `flann.pc`,
because the `PKG_EXTERNAL_DEPS` variable used in `flann.pc.in`
was not defined at all.

This fixes build error `lz4.h: No such file or directory`
for properly sandboxed builds, in which undeclared dependencies
are not made available.
@nh2
Copy link

nh2 commented Nov 1, 2021

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

nh2 added a commit to nh2/flann that referenced this pull request Nov 1, 2021
lz4 is an unconditional dependency of flann (see flann-lib#399),
but until now was not correctly generated into the
`Requires: lz4` line of `flann.pc`,
because the `PKG_EXTERNAL_DEPS` variable used in `flann.pc.in`
was not defined at all.

This fixes build error `lz4.h: No such file or directory`
for properly sandboxed builds, in which undeclared dependencies
are not made available.
@risicle
Copy link

risicle commented May 21, 2022

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

@jspricke
Copy link
Contributor Author

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.

risicle added a commit to risicle/nixpkgs that referenced this pull request May 21, 2022
unbundling appears broken with the llvm toolchain:

flann-lib/flann#399 (comment)
erikbern pushed a commit to erikbern/ann-benchmarks that referenced this pull request Apr 14, 2023
nh2 added a commit to nh2/flann that referenced this pull request Sep 8, 2023
lz4 is an unconditional dependency of flann (see flann-lib#399),
but until now was not correctly generated into the
`Requires: lz4` line of `flann.pc`,
because the `PKG_EXTERNAL_DEPS` variable used in `flann.pc.in`
was not defined at all.

This fixes build error `lz4.h: No such file or directory`
for properly sandboxed builds, in which undeclared dependencies
are not made available.

Same thing for HDF5, but conditionally.
nh2 added a commit to nh2/flann that referenced this pull request Sep 26, 2023
lz4 is an unconditional dependency of flann (see flann-lib#399),
but until now was not correctly generated into the
`Requires: lz4` line of `flann.pc`,
because the `PKG_EXTERNAL_DEPS` variable used in `flann.pc.in`
was not defined at all.

This fixes build error `lz4.h: No such file or directory`
for properly sandboxed builds, in which undeclared dependencies
are not made available.

Same thing for HDF5, but conditionally.

For lz4, also remove the hardcode of `@LZ4_STATIC_LDFLAGS@`
from `flann.pc.in`, as this is no longer necessary.
That fixes an incorrect `-L` flag being generated in there, e.g.
`-L/usr/lib;-llz4`. Thus fixes flann-lib#480.
nh2 added a commit to nh2/flann that referenced this pull request Sep 27, 2023
lz4 is an unconditional dependency of flann (see flann-lib#399),
but until now was not correctly generated into the
`Requires: lz4` line of `flann.pc`,
because the `PKG_EXTERNAL_DEPS` variable used in `flann.pc.in`
was not defined at all.

This fixes build error `lz4.h: No such file or directory`
for properly sandboxed builds, in which undeclared dependencies
are not made available.

Same thing for HDF5, but conditionally.

For lz4, also remove the hardcode of `@LZ4_STATIC_LDFLAGS@`
from `flann.pc.in`, as this is no longer necessary.
That fixes an incorrect `-L` flag being generated in there, e.g.
`-L/usr/lib;-llz4`. Thus fixes flann-lib#480.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants