Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1932645

Summary: Build problem in aarch64-linux-hw-point.c
Product: [Fedora] Fedora Reporter: Kevin Buettner <kevinb>
Component: gdbAssignee: Kevin Buettner <kevinb>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jan.kratochvil, keiths, kevinb, pmuldoon, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-10.1-7.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 22:00:44 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 Kevin Buettner 2021-02-24 20:16:24 UTC
Description of problem:

Due to a recent glibc header file change, the file
nat/aarch64-linux-hw-point.c no longer builds on Fedora rawhide.

An enum for PTRACE_SYSEMU is now provided by <sys/ptrace.h>.  In the
past, PTRACE_SYSEMU was defined only in <asm/ptrace.h>.  This is
what it looks like...

In <asm/ptrace.h>:

 #define PTRACE_SYSEMU		  31

In <sys/ptrace.h>:

enum __ptrace_request
{
  ...
  PTRACE_SYSEMU = 31,
 #define PT_SYSEMU PTRACE_SYSEMU

  ...
}

When <asm/ptrace.h> and <sys/ptrace.h> are both included in a source
file, we run into the following build problem when the former is
included before the latter:

In file included from nat/aarch64-linux-hw-point.c:26:
/usr/include/sys/ptrace.h:86:3: error: expected identifier before numeric constant
   86 |   PTRACE_SYSEMU = 31,
      |   ^~~~~~~~~~~~~

(There are more errors after this one too.)

The file builds without error when <asm/ptrace.h> is included after
<sys/ptrace.h>.  I found that this is already done in
nat/aarch64-sve-linux-ptrace.h (which is included by
nat/aarch64-linux-ptrace.c).


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


How reproducible:

Always.


Steps to Reproduce:
1. Attempt to build gdb w/ fedpkg build.
2. Observe build failure for aarch64 architecture.

Actual results:

Build failure.


Expected results:

Successful build.


Additional info:

I have a patch for this problem:

https://sourceware.org/pipermail/gdb-patches/2021-February/176553.html

I'll be applying it and (hopefully) committing / pushing it soon.

Comment 1 Kevin Buettner 2021-02-24 22:00:44 UTC
Upstream patch applied. The gdb package now builds cleanly in rawhide.  Closing this bug...

Comment 2 Fedora Update System 2021-03-03 04:41:17 UTC
FEDORA-2021-41af532e06 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-41af532e06

Comment 3 Fedora Update System 2021-03-03 15:46:55 UTC
FEDORA-2021-41af532e06 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-41af532e06`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-41af532e06

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2021-03-19 17:43:58 UTC
FEDORA-2021-41af532e06 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2021-03-19 19:59:59 UTC
FEDORA-2021-41af532e06 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.