[systemtap] Patch the bz837641 build failure

Josh Stone jistone at fedoraproject.org
Mon Jul 9 19:32:59 UTC 2012


commit 26f32846ddf8b4f4f740531c928d2807aac2daa7
Author: Josh Stone <jistone at redhat.com>
Date:   Mon Jul 9 12:15:56 2012 -0700

    Patch the bz837641 build failure

 bz837641-staprun-no-linux-types.patch |   38 +++++++++++++++++++++++++++++++++
 systemtap.spec                        |    8 +++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/bz837641-staprun-no-linux-types.patch b/bz837641-staprun-no-linux-types.patch
new file mode 100644
index 0000000..ca1fa38
--- /dev/null
+++ b/bz837641-staprun-no-linux-types.patch
@@ -0,0 +1,38 @@
+(NB: changed paths in backport from master)
+
+commit 037853b4644bb6ebd68e2f1fac11c3636f551d8e
+Author: Josh Stone <jistone at redhat.com>
+Date:   Mon Jul 9 12:07:48 2012 -0700
+
+    Fix the build with glibc 2.16
+    
+    With our elevated compiler warnings as errors, we got:
+    
+      mainloop.c: In function 'stp_main_loop':
+      mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
+      cc1: all warnings being treated as errors
+    
+    This turns out to be a macro fight between glibc-2.16 and
+    kernel-headers, via including linux/types.h.  We apparently don't
+    even need that header, so removing it lets us proceed normally.
+    
+    Those curious can watch this bug to see how the conflict is resolved:
+    https://bugzilla.redhat.com/show_bug.cgi?id=837641
+
+diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h
+index 28c7116..fe42cf2 100644
+--- a/runtime/staprun/staprun.h
++++ b/runtime/staprun/staprun.h
+@@ -28,7 +28,6 @@
+ #include <sys/poll.h>
+ #include <pthread.h>
+ #include <sys/socket.h>
+-#include <linux/types.h>
+ #include <linux/limits.h>
+ #include <sys/wait.h>
+ #include <sys/statfs.h>
diff --git a/systemtap.spec b/systemtap.spec
index 8433be8..48c7e45 100644
--- a/systemtap.spec
+++ b/systemtap.spec
@@ -90,6 +90,8 @@ BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg
 %endif
 %endif
 
+Patch2: bz837641-staprun-no-linux-types.patch
+
 # Install requirements
 Requires: systemtap-client = %{version}-%{release}
 Requires: systemtap-devel = %{version}-%{release}
@@ -249,6 +251,9 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch
 cd ..
 %endif
 
+# bz837641-staprun-no-linux-types.patch
+%patch2 -p1
+
 %build
 
 %if %{with_bundled_elfutils}
@@ -579,6 +584,9 @@ exit 0
 # ------------------------------------------------------------------------
 
 %changelog
+* Mon Jul 09 2012 Josh Stone <jistone at redhat.com>
+- bz837641 build fix
+
 * Sun Jun 17 2012 Frank Ch. Eigler <fche at redhat.com> - 1.8-1
 - Upstream release.
 


More information about the scm-commits mailing list