Bug 2164489

Summary: Removal of libpthread_nonshared.a breaks installation of Oracle Database
Product: Red Hat Enterprise Linux 9 Reporter: Paulo Andrade <pandrade>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: aoliva, arjun.is, asa.j.welle, ashankar, codonell, dj, dyeisley, extras-qa, fweimer, law, mfabian, mnewsome, pfrankli, rth, siddhesh, sipoyare
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1625507 Environment:
Last Closed: 2023-02-03 14:52:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1625507    
Bug Blocks: 1614439, 1654309    

Description Paulo Andrade 2023-01-25 15:28:57 UTC
+++ This bug was initially created as a clone of Bug #1625507 +++

The relinking step as part of the Oracle Database installation assumes that a libpthread_nonshared.a library exists.  Apparently, it doesn't use -lpthread as it should, and instead links against the individual files expected to be in the libpthread linker script.

We should add a workaround to F29 for this by including an empty libpthread_nonshared.a in a compat subpackage.

Failure during Oracle install looks like this:
/usr/bin/make -f ins_rdbms.mk client_sharedlib ORACLE_HOME=/ora/db/
/ora/db/bin/genclntsh
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a
genclntsh: Failed to link libclntshcore.so.12.1

This affects Oracle 12cR2.

---

  Should this be provided by rhel9, or should we instruct users to run:

# ar cr /usr/lib64/libpthread_nonshared.a

in some documentation?

  The package is built, just not available for rhel9, probably in the minimization process or rhel9.

Comment 3 Florian Weimer 2023-01-25 17:41:27 UTC
The file can be created manually using this command:

ar cr /usr/lib64/libpthread_nonshared.a

It produces the same empty archive.

However, if I recall correctly, we noticed during early testing that this was NOT sufficient for a successful installation because the Oracle-provided stub objects need to adapt to the changes in glibc 2.34. Specifically, the stat function used to be part of libc_nonshared.a in glibc 2.28, but in glibc 2.34, it has been replaced by a shared implementation in libc.so.6 proper, and is gone from libc_nonshared.a. Usually, such a change is transparent to pre-compiled binaries, but in this particular case, the Oracle-provided libc.so.6 stub object does not contain a stat symbol. As a workaround, it is necessary to replace the libc.so.6 stub object with the real system libc.so.6.

Comment 10 Carlos O'Donell 2023-02-03 14:52:28 UTC
I want to answer the original question in comment #1, and again state that yes customers can create libpthread_nonshared.a as Florian says in comment #3.

We do not believe that there is a glibc packaging change that will simplify the installation, and so we have not provided a similar compatibility library in RHEL9.

A KCS article should be created that documents any recommended practices regarding the installation of Oracle Database on RHEL9.