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 2124810

Summary: the motif libraries are not compiled with the LONG_BIT being set
Product: Red Hat Enterprise Linux 8 Reporter: Francisco Peralta <fperalta>
Component: motifAssignee: Olivier Fourdan <ofourdan>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: high Docs Contact:
Priority: high    
Version: 8.4CC: ndegraef, ofourdan, sbarcomb, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: All   
Whiteboard:
Fixed In Version: motif-2.3.4-19.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2125560 (view as bug list) Environment:
Last Closed: 2023-05-16 08:16:29 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: 2125560    

Description Francisco Peralta 2022-09-07 07:29:56 UTC
Description of problem:
Currently compiled and RPM packaged in RHEL 8 and RHEL 9 Motif libraries have the problem of LONG_BIT not being defined.
For instance /lib64/libXm.so is a 64-bit shared library but it seems not to be built with LONG_BIT == 64.

The problem is with Motif code (upstream) actually.

Even with "#include <limits.h>" added, LONG_BIT is still not defined *unless* you add -D_XOPEN_SOURCE to the build command line.

But if you do so, the build fails because caddr_t (an old BSD'ism) is not defined. So to build properly, we need two things:

1. Define _XOPEN_SOURCE where LONG_BIT is used
2. Replace caddr_t 

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

Motif-library (/lib64/libXm.so.4.0.4)
In motif-2.3.4-16.el8.x86_64.rpm etc.

How reproducible:

Always

Steps to Reproduce:

The error message on RHEL 7 and 8 was: _XtGetStringValues: bad size 8
Tracing it back in the Motif source we found::
static void _XtGetStringValues(Widget w, Arg *warg, int numargs)
{
    ...
    switch (res->resource_size)
    {
        case 1:
        ...
        case 2:
        ...
        case 4:
        ...
#if (LONG_BIT == 64)
        case 8:
        ...
#endif
        default:
           fprintf(stderr, "_XtGetStringValues: bad size %d\n", res->resource_size);
            string = "bad size";
            ...
    }
}


Expected results:

Libraries to be compiled with LONG_BIT set to 64.

Additional info:

Customer Case NR: 03305642
SO discussion: https://stackoverflow.com/questions/15817380/long-bit-in-limits-h

Comment 3 Olivier Fourdan 2022-09-09 10:10:39 UTC
Awaiting confirmation that the proposed fix addresses the issue.

Comment 11 errata-xmlrpc 2023-05-16 08:16:29 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 (motif 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-2023:2756