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

How to build Flann on windows? #508

Open
lukkio88 opened this issue Jul 18, 2023 · 5 comments
Open

How to build Flann on windows? #508

lukkio88 opened this issue Jul 18, 2023 · 5 comments

Comments

@lukkio88
Copy link

Hi,

I have a repo and I am thinking of using Flann (C++), windows. I would like to add Flann as a submodule of git and then build it.
However I am realizing there's no building instructions on the Flann Repo's readme.

Is it possible to get some instructions on how to build it on windows? Including dependencies?

Thank you.

@lukkio88 lukkio88 changed the title How to build flann? How to build Flann on windows? Jul 18, 2023
@hai4john
Copy link

make a dir on flann root, cd the dir
cmake .. -G "Visual Studio 17 2022" -A x64

@dariomangoni
Copy link

Oh really? Then I should have probably missed something...

I don't know if pkg-config is strictly required or only the lz4 module is.

If the first, then I can tell that in my (quite clean) Win installation I personally miss pkg-config (isn't this an almost Linux specific tool?) and its dependencies, namely glib and gettext (a potential solution could be this).
I need in this case to set PATH to correctly get the DLLs.

In any case, I would still need to get liblz4 (from here maybe?) since it seems that the pkg-config is missing lz4 thus causing pkg_check_modules(LZ4 REQUIRED liblz4) to fail.
At this point I strictly need to comment out the line pkg_check_modules(LZ4 REQUIRED liblz4) and trying to manually set LZ4_INCLUDE_DIRS and LZ4_LINK_LIBRARIES.
I tried to set the latter to point to the static library provided by lz4 but some symbol is missing so I stopped (___chkstk_ms referenced in function LZ4_compress_fast).

At this point I can compile the targets: flann_cpp, flann_cpp_s, falnn_cuda, flan_cuda_s, flann_s
And I'm failing to build: examples, flann, flann_example_c

Am I totally out of my mind? Did I miss something that could lead to such a burden?

@biggiantpigeon
Copy link

Finally work with me with v1.9.1 and VS2022, follow suggestion from #518

@royvelich
Copy link

Oh really? Then I should have probably missed something...

I don't know if pkg-config is strictly required or only the lz4 module is.

If the first, then I can tell that in my (quite clean) Win installation I personally miss pkg-config (isn't this an almost Linux specific tool?) and its dependencies, namely glib and gettext (a potential solution could be this). I need in this case to set PATH to correctly get the DLLs.

In any case, I would still need to get liblz4 (from here maybe?) since it seems that the pkg-config is missing lz4 thus causing pkg_check_modules(LZ4 REQUIRED liblz4) to fail. At this point I strictly need to comment out the line pkg_check_modules(LZ4 REQUIRED liblz4) and trying to manually set LZ4_INCLUDE_DIRS and LZ4_LINK_LIBRARIES. I tried to set the latter to point to the static library provided by lz4 but some symbol is missing so I stopped (___chkstk_ms referenced in function LZ4_compress_fast).

At this point I can compile the targets: flann_cpp, flann_cpp_s, falnn_cuda, flan_cuda_s, flann_s And I'm failing to build: examples, flann, flann_example_c

Am I totally out of my mind? Did I miss something that could lead to such a burden?

Did you manage to solve it?

@dariomangoni
Copy link

Hi @royvelich, I didn't try, sorry!

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

No branches or pull requests

5 participants