Bug 2058840 - flexiblas not properly linked to libgfortran
Summary: flexiblas not properly linked to libgfortran
Keywords:
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
urgent
urgent
Target Milestone: rc
: ---
Assignee: Matej Mužila
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
: 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:
Environment:
Last Closed: 2022-03-01 14:53:11 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
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__);"
1.20.1

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

<mock-chroot> sh-5.1# rpm -q flexiblas python3 python3-numpy
flexiblas-3.0.4-7.el9.x86_64
python3-3.9.10-2.el9.x86_64
python3-numpy-1.20.1-5.el9.x86_64

How reproducible:
Always

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:
	/lib64/libm.so.6
	/lib64/libgfortran.so.5
	/lib64/libquadmath.so.0

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.