strange bug with python24+darwin_8, py-wxpython and xml parsing

Ryan Schmidt ryandesign at macports.org
Thu Aug 9 14:27:37 PDT 2007


On Aug 9, 2007, at 11:28, Lorenz Schori wrote:

> Derek Harland <derek <at> chocolate-fish.com> writes:
>
>>> Date: Mon, 06 Aug 2007 22:36:25 +0200
>>> From: Mark Asbach <asbach <at> ient.rwth-aachen.de>
>>> when using py-xml together with py-wxpython, I get a reproductible
>>> bus error whenever I try to use sax or minidom (both relying on
>>> expat). Invoking the parsers crashes the application with a bus
>>> error. The workaround I found is to import xml.parsers.pyexpat  
>>> before
>>> importing wx - but this is a workaround, not a bug fix.
>>
>> <backtrace clipped>
>>
>>> Can someone comment on this? What could I do to narrow the bug?
>>
>> * This problem may be caused by wxPython being built/linking against
>> older versions of libexpat than pyexpat is.
>
> Apparently the wxwidgets Portfile is causing this error.  
> "configure.ldflags"
> lacks "-L${prefix}/lib" and thus configure thinks that expat does  
> not exist in
> the system and links to its own version of the library.

I agree. When I configure wxwidgets, I see:

configure: WARNING: system expat library not found, will use built-in  
instead

"-L${prefix}/lib" should be in the LDFLAGS by default for all  
portfiles. MacPorts base is supposed to ensure that. But wxwidgets's  
use of configure.ldflags is overriding the MacPorts defaults.

This seems to have been done deliberately in r25114 for ticket #11577  
to fix a different problem -- perhaps the problem that "-L${prefix}/ 
lib" caused the wxwidgets build to pick up libraries from the  
previous wxwidgets installation?

One could use configure.ldflags-append instead of configure.ldflags,  
but that would still put "-L${prefix}/lib" first, which might still  
cause the same problems as in #11577.

Hopefully putting "-L${prefix}/lib" at the end would be sufficient:


Index: Portfile
===================================================================
--- Portfile    (revision 27571)
+++ Portfile    (working copy)
@@ -53 +53 @@
-configure.ldflags      -L${build.dir}/lib
+configure.ldflags      -L${build.dir}/lib -L${prefix}/lib





More information about the macports-users mailing list