Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1395718

Summary: Unable to build binaries for RHEL-5 on RHEL-6 against compat-glibc stubs
Product: Red Hat Enterprise Linux 6 Reporter: Arjun Shankar <ashankar>
Component: compat-glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9CC: mnewsome
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-29 19:04:03 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:

Description Arjun Shankar 2016-11-16 14:00:04 UTC
Trying to compile hello-world for RHEL-5 against compat-glibc on RHEL-6.9 fails when using the latest compat-glibc-2.5-46.2:

The program:
#include <stdio.h>
int main (void) { printf ("Hello, World!\n"); return 0; }

The command line (needs `compat-gcc-34'):
$ gcc34 -I /usr/lib/x86_64-redhat-linux5E/include \
        -B /usr/lib/x86_64-redhat-linux5E/lib64/ hello.c

The error:
/usr/lib/x86_64-redhat-linux5E/lib64/crt1.o: In function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/lib/x86_64-redhat-linux5E/lib64/crt1.o: In function `_start':
(.text+0x19): undefined reference to `__libc_csu_init'
collect2: ld returned 1 exit status

I'm assigning a 'High' severity to this bug because the package's functionality is currently unavailable for use.

Comment 1 Carlos O'Donell 2016-11-16 20:07:31 UTC
When this package was imported in 2010:

commit 52c1c4b798fbe322fd67ecce7429b09ac03be6ec
Author: Dennis Gregorovic <dgregor>
Date:   Tue Jan 19 15:42:40 2010 +0000

    compat-glibc-2.5-46.src.rpm

The libc.so changes which handle turning that file into a linker script were lost. This means that libc_nonshared.a is not being included in the link. This means the package is unsuable.

The immediate workaround is to add libc_nonshared.a back into the link.

e.g.

$ gcc34 -I /usr/lib/x86_64-redhat-linux5E/include \
        -B /usr/lib/x86_64-redhat-linux5E/lib64 
        -o hello hello.c \
        /usr/lib/x86_64-redhat-linux5E/lib64/libc_nonshared.a

Potentially worse and unsolvable is the missing --as-needed on ld.so for any interfaces provided by the dynamic loader, but it might just work since the dynamic loader is added to all global symbol search scopes automatically.

Either way, the code that is missing needs to get added back, and ld.so needs to be shipped. Given the workaround I'm not sure if this is serious enough to warrant an update for the compat package.

Comment 4 Carlos O'Donell 2017-08-29 19:04:03 UTC
Given the workaround in place for rhel-6.9 and rhel-6.10 and the low severity of this issue, I'm marking this as CLOSED/WONTFIX.