Accepting request 129077 from devel:tools
Fix build with glibc 2.16 (forwarded request 129075 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/129077 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=76
This commit is contained in:
commit
9ddf3a5adc
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 27 10:29:23 UTC 2012 - aj@suse.de
|
||||
|
||||
- Fix build with glibc 2.16
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 18 09:47:49 CEST 2012 - jslaby@suse.de
|
||||
|
||||
|
@ -37,6 +37,7 @@ Source2: README-BEFORE-ADDING-PATCHES
|
||||
Patch1: systemtap-docdir-fix.diff
|
||||
Patch2: systemtap-xmlto-fop.diff
|
||||
Patch3: systemtap-docs-autoconf-version.diff
|
||||
Patch4: systemtap-linux-types.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
@ -49,6 +50,7 @@ This package contains the documents and examples for systemtap.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
# fix interpreter
|
||||
|
70
systemtap-linux-types.patch
Normal file
70
systemtap-linux-types.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Subject: Fix build with glibc 2.16
|
||||
Date: 2012-07-27
|
||||
Upstream: yes
|
||||
Signed-Off-by: aj@suse.de
|
||||
|
||||
From Fedora:
|
||||
Squashed cherry-picks from upstream:
|
||||
|
||||
commit 037853b4644bb6ebd68e2f1fac11c3636f551d8e
|
||||
Author: Josh Stone <jistone@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
|
||||
|
||||
commit d9b0c1c8712ff255d4b6171fdb0e1ec39f444501
|
||||
Author: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed Jul 18 18:33:12 2012 -0700
|
||||
|
||||
Further tweak to glibc/kernel-headers workaround
|
||||
|
||||
... following commit 037853b4644bb6ebd68e2f1fac11c3636f551d8e, for
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=840902
|
||||
|
||||
Seems it's not always possible to avoid linux/types.h for the conflict
|
||||
it presents with sys/select.h. Now include linux/types.h very early, so
|
||||
glibc can stomp over it with #undef and #define, rather than vice versa.
|
||||
|
||||
diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h
|
||||
index d01a291..e9ce117 100644
|
||||
--- a/runtime/staprun/staprun.h
|
||||
+++ b/runtime/staprun/staprun.h
|
||||
@@ -10,6 +10,11 @@
|
||||
* Copyright (C) 2005-2008 Red Hat Inc.
|
||||
*/
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
+
|
||||
+/* kernel-headers and glibc like to stomp on each other. We include this early
|
||||
+ * so we can ensure glibc's own definitions will win. rhbz 837641 & 840902 */
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -28,7 +33,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>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 27 10:29:19 UTC 2012 - aj@suse.de
|
||||
|
||||
- Fix build with glibc 2.16
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 18 09:46:52 CEST 2012 - jslaby@suse.de
|
||||
|
||||
|
@ -37,6 +37,7 @@ Source: http://sourceware.org/systemtap/ftp/releases/systemtap-%{version
|
||||
Source2: README-BEFORE-ADDING-PATCHES
|
||||
Source3: stap-server.conf
|
||||
Patch0: link-with-pthread.patch
|
||||
Patch4: systemtap-linux-types.patch
|
||||
Obsoletes: systemtap-client < 1.5
|
||||
Requires: %{name}-runtime = %{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -84,6 +85,7 @@ This package contains the support tools for static probes.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-docs --docdir=%{_docdir}/systemtap
|
||||
|
Loading…
Reference in New Issue
Block a user