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

[Question] How can I static link mkl or use mkl through vcpkg? #602

Open
wuchun opened this issue Nov 24, 2024 · 0 comments
Open

[Question] How can I static link mkl or use mkl through vcpkg? #602

wuchun opened this issue Nov 24, 2024 · 0 comments
Labels
question Further information is requested

Comments

@wuchun
Copy link

wuchun commented Nov 24, 2024

I see that in the CMakeLists.txt here, we only do static linking for python. I'm wondering whether we can do static linking for C++ as well. I tried to just rm L191-L192 so that the code tries static linking even when NOT PYBIND, but was getting many compile errors, for example:

/usr/bin/ld: ../../src/libdiskann.a(math_utils.cpp.o): in function `math_utils::compute_vecs_l2sq(float*, float*, unsigned long, unsigned long) [clone ._omp_fn.0]':
math_utils.cpp:(.text+0xca): undefined reference to `cblas_snrm2'

Are there other archive files that need to be specified or is the issue something else?

I also have another project that already installs mkl through vcpkg. I followed their usage doc and added L3-L4 from that to diskann's CMakeLists.txt. The whole project compiles fine but get runtime error for undefined symbol: mkl_trans_mkl_somatcopy or undefined symbol: mkl_lapack_slange.

Any help is really appreciated.

@wuchun wuchun added the question Further information is requested label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant