Avoid triggering swig segfault

When building with swig 2.0.7 in rawhide the the printing of a warning
message in swig would cause swig to segfault.  This patch avoids the error
message and allow libpfm to build.
This commit is contained in:
William Cohen 2012-06-08 13:55:16 -04:00
parent 9ae3bad453
commit 1bd5d57e0d
2 changed files with 17 additions and 1 deletions

11
libpfm-swig.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up libpfm-4.2.0/python/src/perfmon_int.i.ill libpfm-4.2.0/python/src/perfmon_int.i
--- libpfm-4.2.0/python/src/perfmon_int.i.ill 2012-06-08 12:39:16.872998571 -0400
+++ libpfm-4.2.0/python/src/perfmon_int.i 2012-06-08 12:39:30.183000006 -0400
@@ -92,7 +92,6 @@ ptr_argout(pfm_event_attr_info_t);
/* Kernel interface */
%include <perfmon/perf_event.h>
-ptr_argout(perf_event_attr_t);
/* Library interface */
/* We never set the const char * members. So no memory leak */

View File

@ -10,7 +10,7 @@
Name: libpfm
Version: 4.2.0
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Library to encode performance events for use by perf tool
@ -20,6 +20,7 @@ URL: http://perfmon2.sourceforge.net/
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
Patch1: libpfm4-python.patch
Patch2: libpfm-siginfo_t.patch
Patch3: libpfm-swig.patch
%if %{with python}
BuildRequires: python-devel
@ -66,6 +67,7 @@ Python bindings for libpfm4 and perf_event_open system call.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%if %{with python}
@ -112,6 +114,9 @@ make \
%endif
%changelog
* Fri Jun 8 2012 William Cohen <wcohen@redhat.com> 4.2.0-7
- Eliminate swig error.
* Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-6
- Eliminate rpm_build_root macro in build section.
- Correct location of shared library files.