Re: Build error with wip/kdebindings4-python (issue for Python < 2.5)
"David H. Gutteridge" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.wip.general |
|---|---|
| Message-ID | <[email protected]> |
On Monday, 2 Feb 2009 23:30:00 Mark Davies wrote: >From: Mark Davies <[email protected]> >To: [email protected] >CC: "David H. Gutteridge" <[email protected]> >Subject: Re: Build error with wip/kdebindings4-python (issue for Python < >2.5) >Date: Mon, 2 Feb 2009 23:30:00 +1300 > >On Monday 02 February 2009 18:09:01 David H. Gutteridge wrote: > > I've confirmed that rebuilding against python25-2.5.2nb4 avoids this > > problem; everything compiles and installs successfully. > > > > So I think either the package needs to be marked as requiring Python > > 2.5 or above, or else there needs to be a patch to fix this issue if a > > user's employing an older version of Python? > >Yeah, I've never tried building it with 2.4. I'll happily take a patch if >you have one. > >cheers >mark Hi Mark, The diff the Python developers applied for 2.5 is here: http://svn.python.org/view/python/trunk/Include/object.h?rev=42531&r1=42410&r2=42531 --- python/trunk/Include/object.h 2006/02/16 14:24:38 42410 +++ python/trunk/Include/object.h 2006/02/20 22:27:28 42531 @@ -345,7 +345,7 @@ typedef struct _heaptypeobject { /* Note: there's a dependency on the order of these members in slotptr() in typeobject.c . */ - PyTypeObject type; + PyTypeObject ht_type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; /* as_sequence comes after as_mapping, @@ -354,13 +354,13 @@ a given operator (e.g. __getitem__). see add_operators() in typeobject.c . */ PyBufferProcs as_buffer; - PyObject *name, *slots; + PyObject *ht_name, *ht_slots; /* here are optional user slots, followed by the members. */ } PyHeapTypeObject; /* access macro to the members which are floating "behind" the object */ #define PyHeapType_GET_MEMBERS(etype) \ - ((PyMemberDef *)(((char *)etype) + (etype)->type.ob_type->tp_basicsize)) + ((PyMemberDef *)(((char *)etype) + (etype)->ht_type.ob_type->tp_basicsize)) /* Generic type check */ But one of the Python developers notes "it may break existing applications", which is why it wasn't applied against 2.4. I haven't tried the patch (I just upgraded to Python 2.5 instead, which I really wanted anyway, it's just pkgsrc defaults to 2.4 right now it seems), I assume it would work for these purposes, but I suppose it might break something else if it got applied against the python24 package. Incidentally, the rest of the KDE 4.2 build went quite smoothly for me. Regards, Dave ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com