public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner).
Date: Sun, 28 Jun 2026 00:00:10 GMT	[thread overview]
Message-ID: <178260481015.1.15104758493471321439.rpms-gdb-23564f9afbae@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 23564f9afbae3a271f2d23d90aa6f27791cb23c4
Author : Kevin Buettner <kevinb@redhat.com>
Date   : 2021-02-18T23:16:16-07:00
Stats  : +64/-2 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/23564f9afbae3a271f2d23d90aa6f27791cb23c4?branch=gdb-17.2-rebase-f44

Log:
Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner).

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 9c1279a..f4a4002 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -403,3 +403,6 @@ Patch098: gdb-rhbz1905996-fix-off-by-one-error-in-ada_fold_name.patch
 # (RH BZ 1912985).
 Patch099: gdb-rhbz1912985-libstdc++-assert.patch
 
+# Backport fix for rawhide build error (RH BZ 1930528).
+Patch100: gdb-rhbz1930528-fix-gnulib-build-error.patch
+

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index dddd45a..fd3cf02 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -97,3 +97,4 @@
 %patch097 -p1
 %patch098 -p1
 %patch099 -p1
+%patch100 -p1

diff --git a/_patch_order b/_patch_order
index e426c2f..4e243cf 100644
--- a/_patch_order
+++ b/_patch_order
@@ -97,3 +97,4 @@ gdb-vla-intel-fix-print-char-array.patch
 gdb-rhbz1553104-s390x-arch12-test.patch
 gdb-rhbz1905996-fix-off-by-one-error-in-ada_fold_name.patch
 gdb-rhbz1912985-libstdc++-assert.patch
+gdb-rhbz1930528-fix-gnulib-build-error.patch

diff --git a/gdb-rhbz1930528-fix-gnulib-build-error.patch b/gdb-rhbz1930528-fix-gnulib-build-error.patch
new file mode 100644
index 0000000..ed9290d
--- /dev/null
+++ b/gdb-rhbz1930528-fix-gnulib-build-error.patch
@@ -0,0 +1,54 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Kevin Buettner <kevinb@redhat.com>
+Date: Thu, 18 Feb 2021 23:04:29 -0700
+Subject: gdb-rhbz1930528-fix-gnulib-build-error.patch
+
+;; Backport fix for rawhide build error (RH BZ 1930528).
+
+amd64-linux-siginfo.c: Adjust include order to avoid gnulib error
+
+On Fedora rawhide, after updating to glibc-2.33, I'm seeing the
+following build failure:
+
+  CXX    nat/amd64-linux-siginfo.o
+In file included from /usr/include/bits/sigstksz.h:24,
+                 from /usr/include/signal.h:315,
+                 from ../gnulib/import/signal.h:52,
+                 from /ironwood1/sourceware-git/rawhide-gnulib/bld/../../worktree-gnulib/gdbserver/../gdb/nat/amd64-linux-siginfo.c:20:
+../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first."
+  663 |  #error "Please include config.h first."
+      |   ^~~~~
+
+glibc-2.33 has changed signal.h to now include <bits/sigstksz.h> which,
+in turn, includes <unistd.h>. For a gdb build, this causes the gnulib
+version of unistd.h to be pulled in first.  The build failure shown
+above happens because gnulib's config.h has not been included before
+the include of <signal.h>.
+
+The fix is simple - we just rearrange the order of the header file
+includes to make sure that gdbsupport/commondefs.h is included before
+attempting to include signal.h.  Note that gdbsupport/commondefs.h
+includes <gnulib/config.h>.
+
+Build and regression tested on Fedora 33.  On Fedora rawhide, GDB
+builds again.
+
+gdb/ChangeLog:
+
+	* nat/amd64-linux-siginfo.c: Include "gdbsupport/common-defs.h"
+	(which in turn includes <gnulib/config.h>) before include
+	of <signal.h>.
+
+diff --git a/gdb/nat/amd64-linux-siginfo.c b/gdb/nat/amd64-linux-siginfo.c
+--- a/gdb/nat/amd64-linux-siginfo.c
++++ b/gdb/nat/amd64-linux-siginfo.c
+@@ -17,8 +17,8 @@
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+ 
+-#include <signal.h>
+ #include "gdbsupport/common-defs.h"
++#include <signal.h>
+ #include "amd64-linux-siginfo.h"
+ 
+ #define GDB_SI_SIZE 128

diff --git a/gdb.spec b/gdb.spec
index 18bad1b..067e0f9 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -37,7 +37,7 @@ Version: 10.1
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 6%{?dist}
+Release: 7%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1195,7 +1195,10 @@ fi
 %endif
 
 %changelog
-* Thu Feb 11 2021 Kevin Buettner <kevinb@redhat.com> - 10.1-6
+* Thu Feb 18 2021 Kevin Buettner <kevinb@redhat.com> - 10.1-7
+- Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner).
+
+* Wed Feb 17 2021 Kevin Buettner <kevinb@redhat.com> - 10.1-6
 - Fix libstdc++ assert when performing tab completion; build must be made
   with -D_GLIBCXX_DEBUG flag in order to trigger assert (RHBZ 1912985,
   Kevin Buettner).

                 reply	other threads:[~2026-06-28  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260481015.1.15104758493471321439.rpms-gdb-23564f9afbae@fedoraproject.org \
    --to=kevinb@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox