I am in the process of getting libpfm into fedora rawhide.  When building with 
the older version of swig in rawhide (2.0.6) there was the following message in 
the build:

swig -python -I../include -o src/perfmon_int_wrap.c src/perfmon_int.i
src/perfmon_int.i:95: Warning 521: Illegal destructor name ~perf_event_attr_t. 
Ignored.

For the newer version of swig in rawhide (2.0.7) swig gets a segmentation 
fault. I have filed the following bug to get swig fixed:

https://bugzilla.redhat.com/show_bug.cgi?id=830249


In the meantime it would be good to get libpfm upstream fixed so swig doesn't 
complain about this error. I think that the attached patch eliminates this 
problem.  This is based on the approach mentioned in a similar swig bug report:

http://sourceforge.net/tracker/?func=detail&aid=3530118&group_id=1645&atid=101645

-Will
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 */
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to