Bug 268422 - math/atlas alapack is not a full lapack after update to 3.10.3
Summary: math/atlas alapack is not a full lapack after update to 3.10.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thierry Thomas
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-12-17 01:54 UTC by alt2600
Modified: 2022-12-20 11:13 UTC (History)
1 user (show)

See Also:


Attachments
git-Makefile_full_lapack.diff (1.12 KB, patch)
2022-12-17 01:54 UTC, alt2600
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alt2600 2022-12-17 01:54:23 UTC
Created attachment 238852 [details]
git-Makefile_full_lapack.diff

So ran into some issues after Atlas update with some errors indicating missing symbols notably from py-numpy when configuring opencv, or py-netCDF4

ImportError: /usr/local/lib/python3.9/site-packages/numpy/linalg/_umath_linalg.cpython-39.so: Undefined symbol "sgesdd_"

so after poking around the backup package of Atlas and the current ones I confirmed the old one did provide that symbol, and I recall that becoming default a while ago to build full lapack. 

So I starting digging and saw what upstream did with eliminating specifying just the static library reference to use. I basically manually did in the do-build section things that configure would have done if if had built its own lapack.a and set it up to use it. This included passing some options to xconfig, stripping some objects from our reference lapack and copying it into ${opt}/lib where the build expects it. it appears passing flapack to xconfig doesn't really do anything, all the business setting things up now seems to be in configure, but can be worked around.

I confirmed this now provides the library, opencv doesn't fail to import the symbol loading numpy, all the things that use atlas build. I even re-built py-scipy with atlas using this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257400 and the scikit packages I have that use it.

I've attached my patch
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2022-12-20 11:13:28 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-12-20 11:13:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2ee2df44b2f26bc84893f13b592e8ef2e55da4ed

commit 2ee2df44b2f26bc84893f13b592e8ef2e55da4ed
Author:     alt2600@icloud.com <alt2600@icloud.com>
AuthorDate: 2022-12-19 17:10:03 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-12-20 10:25:21 +0000

    math/atlas: build full lapack

    Some symbols had been eliminated with the previous release.

    PR:             268422
    Reported by:    alt2600 (at) icloud.com

 math/atlas/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)