FS#66453 - [openblas] /usr/lib/libblas.so.3.9.0 missing to properly reblace blas package
Attached to Project:
Community Packages
Opened by Michael Laß (Bevan) - Tuesday, 28 April 2020, 18:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
Opened by Michael Laß (Bevan) - Tuesday, 28 April 2020, 18:01 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
|
Details
Description:
openblas can be installed as a replacement for blas. However, doing so causes an issue with CMake: Using CMake to link software against CBLAS or LAPACK, it tries to link in /usr/lib/libblas.so.3.9.0. However that file is only included in blas and not in openblas. This leads to the following error message: --snip-- CMake Error at /usr/lib/cmake/lapack-3.9.0/lapack-targets.cmake:93 (message): The imported target "blas" references the file "/usr/lib/libblas.so.3.9.0" but this file does not exist. [...] --snip-- The problem can easily be solved by creating a symlink from /usr/lib/libblas.so.3.9.0 to /usr/lib/libopenblasp-r0.3.9.so. Doing so in the openblas package would however require updating it everytime blas/cblas/lapack get updated. Package version: 0.3.9-1 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/openblas/issues/2
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/openblas/issues/2
Also, cblas and lapack packages link against the major API version of BLAS: libblas.so.3, as is the norm.
Therefore I suggest the issue is either already fixed, or was an issue with your unnamed downstream project's build source.
lapack-3.10.0-1-x86_64.pkg.tar.zst contains /usr/lib/cmake/lapack-3.10.0/lapack-targets-release.cmake which references libblas.so.3.10.0 in line 11.
libblas.so.3.10.0 is provided by the blas package but not by the openblas package which only contains libblas.so.3.
I've looked into the file and still cannot verify the suggested problem.
In lapack-3.10.0-1-x86_64 package: usr/lib/cmake/lapack-3.10.0/lapack-targets-release.cmake: line 11-12-13*:
//--edit: my mistake; quote is from usr/lib/cmake/cblas-3.10.0/cblas-targets-release.cmake //:
IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "blas"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libcblas.so.3.10.0"
IMPORTED_SONAME_RELEASE "libcblas.so.3"
It does not refer to the versioned libblas.so, only its own CBLAS-specific libcblas.so.3.10.0.
No sign of any issues.
It is important that you provide exact logs or other clear evidence of build problems.
I hope this helps to move forward with this task. My suggestion is to close it as it is not actionable.
You can file a new bug report in the future with logs, if/when you experience the suggested issue.
Output:
11: IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libblas.so.3.10.0"
16:list(APPEND _IMPORT_CHECK_FILES_FOR_blas "${_IMPORT_PREFIX}/lib/libblas.so.3.10.0" )
Could it be that you looked at cblas-targets-release.cmake from the cblas package instead?
curl -s -L https://archlinux.org/packages/extra/x86_64/cblas/download | tar xO usr/lib/cmake/cblas-3.10.0/cblas-targets-release.cmake|tail -n+11|head -n3
Output:
IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE "blas"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libcblas.so.3.10.0"
IMPORTED_SONAME_RELEASE "libcblas.so.3"
Anyway, I'll try to come up with a reproducer as soon as I find time. Please leave this bug report open for now.
> cat CMakeLists.txt
find_package(lapack)
(side note: you can use find_package(LAPACK) (capitalized) instead, and it will use cmake's own module, which does not have this issue)
Now that is a clear evidence that the source of the problem is the package:
lapack-3.10.0-1-x86_64.pkg.tar.zst
That package should not contain explicit CMake build target configuration referring to a file it clearly doesn't own:
- lapack-3.10.0-1-x86_64.pkg.tar.zst owns:
usr/lib/cmake/lapack-3.10.0/lapack-targets-release.cmake
--> which refers to file inside package:
- blas-3.10.0-1-x86_64.pkg.tar.zst package, owns:
{usr/}lib/libblas.so.3.10.0
Aur/extra/lapack is a split package for blas, cblas, lapack-doc, lapacke.
Seems blas build target metadata got embedded in the wrong place: lapack's cmake import file.
Suggest to (re)file this as a [lapack] build/package bug. What do you guys think?