Bug 2058840 - flexiblas not properly linked to libgfortran
Summary: flexiblas not properly linked to libgfortran
Status: CLOSED DUPLICATE of bug 2044859
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: flexiblas
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Matej Mužila
QA Contact: RHEL CS Apps Subsystem QE
: 2059049 (view as bug list)
Depends On:
Blocks: 2059049
TreeView+ depends on / blocked
Reported: 2022-02-26 06:49 UTC by Mattias Ellert
Modified: 2022-03-01 14:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-03-01 14:53:11 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-113900 0 None None None 2022-02-26 06:55:15 UTC

Description Mattias Ellert 2022-02-26 06:49:34 UTC
Description of problem:

Flexiblas is not properly linked to libgfortran.
This can be seen when trying to import numpy into python.

<mock-chroot> sh-5.1# python3 -c "import numpy as n"
flexiblas dlopen: /usr/lib64/flexiblas//libflexiblas_fallback_lapack.so: undefined symbol: _gfortran_transfer_character_write
flexiblas  Failed to load the LAPACK fallback library.  Abort!
Aborted (core dumped)

If libgfortran is preloaded the import works:

<mock-chroot> sh-5.1# LD_PRELOAD=/usr/lib64/libgfortran.so.5 python3 -c "import numpy as n; print(n.__version__);"

Version-Release number of selected component (if applicable):

<mock-chroot> sh-5.1# rpm -q flexiblas python3 python3-numpy

How reproducible:

Steps to Reproduce:
1. python3 -c "import numpy as n"

Actual results:
Failure due to undefined symbols

Expected results:
Successful import

Additional info:

ldd -r /usr/lib64/flexiblas/libflexiblas_fallback_lapack.so
lists many undefined symbols.
However, this is also true for the Fedora version.

But, in Fedora this is saved by over-linking in the main flexiblas library;
[ellert@localhost ~]$ ldd -u /usr/lib64/libflexiblas.so.3
Unused direct dependencies:

These are not there in RHEL 9, which is probably correct. But it exposes the underlinking of /usr/lib64/flexiblas/libflexiblas_fallback_lapack.so (and /usr/lib64/flexiblas64/libflexiblas_fallback_lapack.so).

Comment 1 Mattias Ellert 2022-02-27 09:50:05 UTC
To fix this in a simple way, add to the spec file the line:

%undefine _ld_as_needed

Comment 2 Alfredo Moralejo 2022-02-28 09:50:18 UTC
This issue is totally blocking OpenStack upstream CI on CentOS, may it be possible to get a fix asap?

Comment 3 Matej Mužila 2022-02-28 13:21:40 UTC
(In reply to Alfredo Moralejo from comment #2)
> This issue is totally blocking OpenStack upstream CI on CentOS, may it be
> possible to get a fix asap?

Yes, I'm aleready working on it.

Comment 4 Matej Mužila 2022-02-28 13:49:31 UTC
*** Bug 2059049 has been marked as a duplicate of this bug. ***

Comment 5 Matej Mužila 2022-03-01 14:53:11 UTC
This bug is being solved as part of bug2044859.

*** This bug has been marked as a duplicate of bug 2044859 ***

Note You need to log in before you can comment on or make changes to this bug.