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 1720375

Summary: "fatal error: gnu/stubs-64.h: No such file or directory" during installation
Product: Red Hat Enterprise Linux 7 Reporter: Alois Mahdal <amahdal>
Component: php-pearAssignee: Remi Collet <rcollet>
Status: CLOSED ERRATA QA Contact: Jakub Heger <jheger>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: bnater, jheger, jorton, jstodola, rcollet
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: 2020-09-29 20:15:57 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:    
Bug Blocks: 1256306, 1473612, 1670353, 1780579    

Description Alois Mahdal 2019-06-13 20:59:14 UTC
Description of problem
======================


When installing php-pecl-memcache, we see this error:

      Installing : anaconda-widgets-devel-21.48.22.147-1.el7.x86_64       4985/5831
      Installing : php-pecl-memcache-3.0.8-4.el7.x86_64                   4986/5831
    In file included from /usr/include/features.h:399:0,
                     from /tmp/glibctesthodAWU:1:
    /usr/include/gnu/stubs.h:10:27: fatal error: gnu/stubs-64.h: No such file or directory
     # include <gnu/stubs-64.h>
                               ^
    compilation terminated.
      Installing : php-mysql-5.4.16-46.el7.x86_64                         4987/5831
      Installing : subscription-manager-gui-1.21.10-2.el7.x86_64          4988/5831


Version-Release number of selected component
============================================

php-pecl-memcache-3.0.8-4.el7.x86_64


How reproducible
================

At times


Steps to Reproduce
==================

probably something like

    yum -y install php-pecl-memcache  # but see below


Actual results
==============

Error when installing


Expected results
================

No error


Additional info
===============

We have a Beaker task that attempts to install a large set of RHEL-7 packages; here's the list of the packages:

    http://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2019/06/36055/3605573/6999777/94751203/taskout.log

I tried to install just php-pecl-memcache on a fresh RHEL-7 machine from 1minutetip, but there it passed without errors.

Comment 4 Joe Orton 2019-07-19 07:25:52 UTC
Looks like this code in /usr/share/pear/OS/Guess.php

Remi could we do something smarter here?  Or else php-pear should requires: glibc-devel I guess? 

    function _detectGlibcVersion()
    {
        static $glibc = false;
        if ($glibc !== false) {
            return $glibc; // no need to run this multiple times
        }
        $major = $minor = 0;
        include_once "System.php";
        // Use glibc's <features.h> header file to
        // get major and minor version number:
        if (@file_exists('/usr/include/features.h') &&
              @is_readable('/usr/include/features.h')) {
            if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {

Comment 5 Joe Orton 2019-07-19 07:44:25 UTC
So php-pear will use cpp on /usr/include/features.h if present and not otherwise.  It looks like glibc-headers is in an inconsistent state at the time the %post script runs where /usr/include/features.h is present but not usable.  Not sure how this happens.

Comment 6 Remi Collet 2019-07-19 08:10:41 UTC
Simple fix: drop all the code using "features.h", as the fallback on reading soname, with a minor fix:

        if (!($major && $minor) && @is_link('/lib64/libc.so.6')) {
            // Let's try reading the libc.so.6 symlink
            if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib64/libc.so.6')), $matches)) {
                list($major, $minor) = explode('.', $matches[1]);
            }
        }
        if (!($major && $minor) && @is_link('/lib/libc.so.6')) {
            // Let's try reading the libc.so.6 symlink
            if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
                list($major, $minor) = explode('.', $matches[1]);
            }
        }

Comment 7 Remi Collet 2019-07-19 08:37:35 UTC
Fixed by https://github.com/pear/pear-core/pull/92
waiting for upstream feedback

Comment 9 Joe Orton 2020-01-17 16:01:34 UTC
*** Bug 1338917 has been marked as a duplicate of this bug. ***

Comment 20 errata-xmlrpc 2020-09-29 20:15:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (php-pear bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3975