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

FLANN : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) for Windows #435

Open
thiyagu1 opened this issue Nov 11, 2019 · 7 comments · May be fixed by #507
Open

FLANN : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) for Windows #435

thiyagu1 opened this issue Nov 11, 2019 · 7 comments · May be fixed by #507

Comments

@thiyagu1
Copy link

thiyagu1 commented Nov 11, 2019

I am actually setting up the Point Cloud Library (PCL). However, it requires a few other dependency libraries, and one among them was FLANN.

So, I wanted to build the FLANN from sources:

  1. Downloaded the souces from the Git link.
  2. Created a build directory
  3. Set CMake SOURCE code path - C:/PCL/flann-master
  4. Set CMake Build binaries path - C:/PCL/flann-master/build
  5. Checked the Grouped and Advanced options
  6. Configure
CMake Warning (dev) at CMakeLists.txt:17 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:21 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at C:/Program Files/CMake/share/cmake-3.13/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.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:39 (find_package_handle_standard_args)
  CMakeLists.txt:149 (find_package)


The import takeaway is Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Using PkgConfig with CMake is not a truly cross-platform solution, as Windows does not come with the pkg-config utility installed.

So any solution for this issue ?

@navFooh
Copy link

navFooh commented Jan 7, 2020

I'm running into the same problem, also for compiling PCL.
Did you find a solution for this @thiyagu1 ?

@navFooh
Copy link

navFooh commented Jan 7, 2020

I managed to build the project by checking out the 1.9.1 tag:
git checkout 1.9.1

@JTrantow
Copy link

JTrantow commented Jul 7, 2020

I was also stuck trying to build PCL from source and using the vcpkg dependencies (flann:x64-windows 2019-04-07-1). PCL won't generate because of a problem linking kdtree with flann_s???

When I pulled flann and tried to use the Cmake gui, it would not config. Reverted FLANN to the 1.9.1 tag, deleted the CMAKE cache and had no problems with CMake config, generate or VisualStudio build of FLANN. Then I went into CMAKE pcl and set FLANN_DIR to my new FLANN install directory and PCL builds correctly.

Seems like something is wrong with the FLANN Master and the vcpkg version of FLANN since the 1.9.1 tag works correctly???

@melhashash
Copy link

melhashash commented Jul 8, 2020

Try to follow these steps (I only tried building FLANN, and using a translator)

https://gist.github.com/UnaNancyOwen/59319050d53c137ca8f3

@iAnyKey
Copy link

iAnyKey commented Apr 1, 2022

You can pass the missing variable by calling the cmake:

cmake .. -DPKG_CONFIG_ROOT="$pwd/gtk/gtk/x64/release/bin" -DPKG_CONFIG_EXECUTABLE="$pwd/gtk/gtk/x64/release/bin/pkg-config.exe"

I my case I have pkg-konfig built as part of GTK toolbox

Check out y short guide in Readme.md on my fork of FLANN: https://github.com/iAnyKey/flann

@walkthetalk
Copy link

we can assign path of lz4, PKGCONFIG is must?

@felixf4xu felixf4xu linked a pull request Jul 15, 2023 that will close this issue
@ychaos
Copy link

ychaos commented Mar 6, 2024

You can pass the missing variable by calling the cmake:

cmake .. -DPKG_CONFIG_ROOT="$pwd/gtk/gtk/x64/release/bin" -DPKG_CONFIG_EXECUTABLE="$pwd/gtk/gtk/x64/release/bin/pkg-config.exe"

I my case I have pkg-konfig built as part of GTK toolbox

Check out y short guide in Readme.md on my fork of FLANN: https://github.com/iAnyKey/flann

but he said on windows...

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 a pull request may close this issue.

7 participants