Bug 2089211 - glibc: stpncpy build failure with _FORTIFY_SOURCE and old gcc
Summary: glibc: stpncpy build failure with _FORTIFY_SOURCE and old gcc
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Siddhesh Poyarekar
QA Contact: Sergey Kolosov
URL:
Whiteboard:
Depends On:
Blocks: 2033684
TreeView+ depends on / blocked
 
Reported: 2022-05-23 08:53 UTC by Siddhesh Poyarekar
Modified: 2023-07-18 14:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-23 14:49:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2033684 1 None None None 2023-07-18 14:30:35 UTC
Red Hat Issue Tracker RHELPLAN-122744 0 None None None 2022-05-23 08:58:33 UTC
Sourceware 29162 0 P2 RESOLVED [PATCH] string.h syntactic error: include/bits/string_fortified.h:110: error: expected ',' or ';' before '__fortified_at... 2022-05-23 08:53:57 UTC

Description Siddhesh Poyarekar 2022-05-23 08:53:58 UTC
Description of problem:
This was introduced by one of the patches to implement FORTIFY_SOURCE=3 support.  When a program is built with a gcc version older than 4.7 or clang version older than 2.6 or a compiler that does not identify as gcc or clang, it will fail to build due to a typo in string_fortified.h.

This was discovered in NixOS, which builds some packages with gcc 4.1.0:

https://sourceware.org/pipermail/libc-alpha/2022-May/138981.html

Comment 1 Florian Weimer 2022-05-23 08:56:45 UTC
Historic GCC binaries are here: https://pagure.io/glibc/glibc-test-binaries/

The repository has wrapper scripts, so that the binaries still should work on Red Hat Enterprise Linux 8.

Comment 3 Siddhesh Poyarekar 2022-05-23 14:49:00 UTC
I just noticed that I had not backported the offending commit to rhel-8, because there are no access attributes on those functions in RHEL-8.  Nothing to fix here then.


Note You need to log in before you can comment on or make changes to this bug.