-
Notifications
You must be signed in to change notification settings - Fork 5
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
Getting undefined symbol error compiling python3-scipy #7
Comments
Hi, thanks for the report. Welcome to the world of BLAS packages, which can and do conflict. I have this in my private layer as
which avoids the build problem and allows using OpenBLAS in python3-scipy.
FYI, the symbols you mention are in this report which confirms that OpenBLAS needs to be built with supplying LAPACK compatibility. Using scipy with lapack (as opposed to OpenBLAS) may also work if you use |
Excellent. That seems worthy of being in the readme file. So with that openblas config, numpy suddenly detects lapack and blas correctly (it seemed confused and only half detecting it before), as does scs which makes cvxpy happy. Much better. I still had to add gfortran to HOSTTOOLS to make python3-scipy-native compile. Is that normal? I did have to patch openblas to fix the lib path since it breaks when using multilib (it assumes lib rather than lib64 for the install location), bit not a big deal and hopefully soon the last 32 bit code will be converted to 64 bit to get rid of this multilib mess. At least now this builds and the code seems to run and happily use the openblas lapack functions and I can get rid of my scipy and openblas recipes that didn't fully work it seems. |
Hm. I don't remember since when but I also have (looking) I can see it now. It's in the original https://github.com/tuxable-ltd/meta-scikit-learn/ README. I will update the README when I get to it, also for other reasons. FWIW, I also have that meta-clang-revival layer which brings back older CLANG versions for the |
Regarding multilib, can you share that patch in a PR? I would like to support Yocto in more configurations than just mine without multilib. |
Well my patch is too simple to be generic since it makes it only work for 64bit multilib case. So a better fix is needed. What I did is patch Makefile.install to change |
I was trying to use this layer to get an updated scipy and pyarrow (I have an older recipe for scipy but some features don't work on it so I wanted to see if a newer and hopefully better recipe would fix that), but I am having no luck getting it to compile.
Initially I get the error that gfortran version is unknown from python3-scipy-native. I fixed that by adding gfortran to HOSTTOOLS and installing it on the build machine. I didn't see this in the README so I am not convinced this is supposed to be needed nor that the host gfortran is necessarily compatible with the yocto build.
So the error I see is:
So my understanding is that it can't find one of the fortran symbols.
Switching from openblas to lapack (which is what I really would like since I am trying to get cvxpy working which seems to need scipy with lapack) I instead get this symbol missing:
I thought maybe it was a problem with the build host (using opensuse 15.3) so I tried on Debian 12 (bookworm) instead to have more up to date host tools, but exact same errors there.
Did I just miss a setting somewhere? It seems I only ever hit these undefined symbol errors when trying to deal with scipy and it's fortran dependencies and it is not exactly easy to find anyone with any clues about what it's problem is.
The text was updated successfully, but these errors were encountered: