-
Notifications
You must be signed in to change notification settings - Fork 124
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
Link to LAPACK before BLAS #384
Conversation
@FabienPean: I get your point but this breaks CI so it seems something's wrong. |
All the CI tests reporting failure are the MacOS ones and they failed on the step It might be related to the transitioning EDIT: observing the log of the CI for the other PR, one of the 3 macOS job succeeds while other fails and they all are on macOS 12. This seems random, so re-running the failed jobs might end up working. This still seems like a github actions related issue though. |
Didn't check logs! I'll re-run jobs, we'll see... If CI is broken, we will to fix this before merging anything else. |
The change looks correct to me. In my patches simply copied the order that was in the original CMakeLists.txt but this one does definitely makes more sense. In many systems, such as the ones I use, it makes no difference if openblas already includes lapack (which is often the case), which is why I did not notice a difference -- and probably why CI also did not. |
Here is the reason for macOS job failing actions/runner-images#2247
I made a PR in my fork to be able to run the CI at will, it worked there for all without retry: FabienPean#1 |
OK no hurry we can wait for github-actions to be back working! |
Good to merge if CI OK |
This PR swaps the order of linking to have LAPACK before BLAS.
Why ? When experimenting packaging the repo through vcpkg, I faced a peculiar problem when using static libraries (through WSL on Ubuntu 20.04 with GCC 9.4).
The first generated build command failed (with undefined references)
By some chance it worked when fiddling around by manually adding targets in the CMakeLists of the test case
The main difference was that
liblapack.a
was put beforelibopenblas.a
. I tried the change given in this PR and it built successfully.It might not be the optimal solution, but the correct CMake alternative seems to be relatively recent (v3.24), see https://gitlab.kitware.com/cmake/cmake/-/issues/20078 and https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_LIBRARY