Skip to content

Allow RHEL RPMs to work on UBI 9/10: make flexiblas-devel a weak dependency - #329

Merged
glin merged 1 commit into
mainfrom
relax-flexiblas-devel-weak-dep
Jul 16, 2026
Merged

Allow RHEL RPMs to work on UBI 9/10: make flexiblas-devel a weak dependency#329
glin merged 1 commit into
mainfrom
relax-flexiblas-devel-weak-dep

Conversation

@glin

@glin glin commented Jul 9, 2026

Copy link
Copy Markdown
Member

Closes #212

UBI 9/10 never added flexiblas-devel to CRB even though our bug tracker issues were closed. Since BLAS development headers are optional for R, only included in our builds because a lot of R packages need it to compile from source, we can switch the flexiblas-devel package to a weak RPM dependency so R at least installs.

Tests added here, and I also verified in rockylinux:9 and registry.access.redhat.com/ubi9/ubi images that the new R RPM installs fine in both, and that the RHEL 9 installation includes flexiblas-devel:

Installing weak dependencies:
 flexiblas-devel                                                 x86_64                                     3.0.4-9.el9                                                 appstream                                         98 k
# Rocky Linux 9 - rockylinux:9
dnf install ./rhel-9/R-4.6.1-1-1.x86_64.rpm 
Extra Packages for Enterprise Linux 9 - x86_64                                                                                                                                                 6.2 MB/s |  21 MB     00:03    
Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64                                                                                                                           3.4 kB/s | 2.5 kB     00:00    
Rocky Linux 9 - BaseOS                                                                                                                                                                          14 kB/s | 3.9 kB     00:00    
Rocky Linux 9 - BaseOS                                                                                                                                                                         9.9 MB/s | 6.7 MB     00:00    
Rocky Linux 9 - AppStream                                                                                                                                                                       14 kB/s | 4.3 kB     00:00    
Rocky Linux 9 - CRB                                                                                                                                                                            3.7 MB/s | 4.0 MB     00:01    
Dependencies resolved.
===============================================================================================================================================================================================================================
 Package                                                         Architecture                               Version                                                     Repository                                        Size
===============================================================================================================================================================================================================================
Installing:
 R-4.6.1                                                         x86_64                                     1-1                                                         @commandline                                      69 M
...
Installing dependencies:
 bzip2-devel                                                     x86_64                                     1.0.8-11.el9                                                appstream                                        213 k
 cairo                                                           x86_64                                     1.17.4-7.el9                                                appstream                                        659 k
 cpp                                                             x86_64                                     11.5.0-14.el9                                               appstream                                         11 M
 dejavu-sans-fonts                                               noarch                                     2.37-18.el9                                                 baseos                                           1.3 M
 flexiblas                                                       x86_64                                     3.0.4-9.el9                                                 appstream                                         30 k
 flexiblas-netlib                                                x86_64                                     3.0.4-9.el9                                                 appstream                                        3.0 M
 flexiblas-netlib64                                              x86_64                                     3.0.4-9.el9                                                 appstream                                        2.9 M
 flexiblas-openblas-openmp                                       x86_64                                     3.0.4-9.el9                                                 appstream                                         15 k
 flexiblas-openblas-openmp64                                     x86_64                                     3.0.4-9.el9                                                 appstream                                         15 k
...
 zip                                                             x86_64                                     3.0-35.el9                                                  baseos                                           263 k
 zlib-devel                                                      x86_64                                     1.2.11-40.el9                                               appstream                                         44 k
Installing weak dependencies:
 flexiblas-devel                                                 x86_64                                     3.0.4-9.el9                                                 appstream                                         98 k

# Checking that flexiblas-devel is installed
ld -lflexiblas
# ld: warning: cannot find entry symbol _start; not setting start address

# UBI 9 - registry.access.redhat.com/ubi9/ubi
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
crb enable
dnf install ./rhel-9/R-4.6.1-1-1.x86_64.rpm

Note that I didn't do anything about openblas-devel which we use in R <= 4.2 on RHEL 9 for legacy compatibility reasons. We could if needed, but R 4.2 is EOL in like 9 months, so I didn't think it was worth it.

A hard dependency on flexiblas-devel made the R RPM uninstallable on UBI 9/10,
because flexiblas-devel lives in CodeReady Builder and the UBI CRB repo is a
redistributable subset that does not include it. Red Hat closed RHEL-5411
("flexiblas-devel in ubi-9-codeready-builder") as Done in Oct 2024, but the
package is still absent from the public UBI CRB content.

Split the dependency:

- flexiblas-netlib becomes the hard runtime dependency. R linked with
  --with-blas=flexiblas records a loader dependency on libflexiblas.so.3, and on
  RHEL/Rocky 9 that SONAME is provided by flexiblas-netlib, not the flexiblas
  front-end package (which does not pull netlib in). Depending on flexiblas
  alone leaves R unable to load libflexiblas.so.3 once weak deps are disabled.
  flexiblas-netlib is in AppStream on both RHEL and UBI, so this stays
  installable on UBI. RHEL 10's flexiblas pulls netlib in already, but we depend
  on the SONAME provider directly to keep both versions aligned.
- flexiblas-devel becomes a weak (Recommends) dependency, needed only to compile
  BLAS-linked R packages from source. dnf auto-installs it on full RHEL/Rocky
  where CRB provides it and silently skips it on UBI rather than failing.

Add a regression check to the RHEL 9/10 integration test that reproduces the
UBI environment by installing with weak dependencies disabled. It asserts the
RPM declares flexiblas-devel as a weak Recommends, still installs,
flexiblas-netlib (the SONAME provider) is present, flexiblas-devel is skipped,
and R runs and uses BLAS at runtime.

#212
https://issues.redhat.com/browse/RHEL-5411
@glin
glin requested a review from bschwedler July 9, 2026 21:31
@glin
glin merged commit ad3d4c9 into main Jul 16, 2026
261 checks passed
@glin
glin deleted the relax-flexiblas-devel-weak-dep branch July 16, 2026 18:54
@glin

glin commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

@bschwedler RHEL 9/10 binaries now rebuilt with this fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants