[lxml-dev] python crashes in xmlDictFree inside Zope

I have been prototyping some XMLSchema parsing/validating using lxml 1.3beta. Everthing works great from python 2.4.4 started from the command line, or running from inside Eclipse. However, when I moved my code over to my Plone product, python crashes when Zope is initializing the product. I am creating my XMLSchema object there. THe code is essentially the same, running under the same python and with the same libs (afaik). Some earlier attempts (with python 2.4.3) gave me this error: python(11139) malloc: *** Deallocation of a pointer not malloced: 0x80; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug I'm not seeing that now, as I have "upgraded" to python 2.4.4 which seems to be stripped or something. I don't have a test case immediately available, but here is the stack backtrace from the python crash log: OS Version: 10.4.9 (Build 8P2137) Report Version: 4 Command: Python Path: /opt/local/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python .app/Contents/MacOS/Python Parent: bash [11055] Version: 2.4a0 (2.4alpha1) PID: 11135 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000001 Thread 0 Crashed: 0 libxml2.2.dylib 0x033f6294 xmlDictFree + 45 1 libxml2.2.dylib 0x033f62e2 xmlDictFree + 123 2 libxml2.2.dylib 0x033f62e2 xmlDictFree + 123 3 etree.so 0x06406a08 __pyx_f_5etree_14_ParserContext_initThreadDictRef + 63 (etree.c:19725) 4 etree.so 0x06406a5b __pyx_f_5etree_14_ParserContext_initParserDict + 35 (etree.c:19740) 5 etree.so 0x06431bca __pyx_f_5etree_11_BaseParser__parseDocFromFile + 99 (etree.c:21340) 6 etree.so 0x0646a8f4 __pyx_f_5etree__parseDocument + 395 (etree.c:22486) 7 etree.so 0x0646cc50 __pyx_f_5etree_parse + 176 (etree.c:10300) 8 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 9 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 10 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 11 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 12 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 13 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 14 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 15 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 16 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 17 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 18 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 19 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 20 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 21 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 22 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 23 org.python.python 0x002808a5 PyEval_EvalCode + 87 (ceval.c:490) 24 org.python.python 0x002a75fd PyRun_FileExFlags + 200 (pythonrun.c:1285) 25 org.python.python 0x002a78e0 PyRun_SimpleFileExFlags + 640 (pythonrun.c:869) 26 org.python.python 0x002b13ec Py_Main + 3199 (main.c:493) 27 org.python.python 0x00001fae 0x1000 + 4014 28 org.python.python 0x00001ed5 0x1000 + 3797 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x033f6275 ecx: 0x00000000 edx: 0x00000000 edi: 0x00000001 esi: 0x05856fd0 ebp: 0xbfffcfe8 esp: 0xbfffcfb0 ss: 0x0000001f efl: 0x00010286 eip: 0x033f6294 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 Binary Images Description: 0x1000 - 0x2fff org.python.python 2.4a0 (2.4alpha1) /opt/local/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python .app/Contents/MacOS/Python 0xa0000 - 0xa1fff icglue.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/icglue.so 0xb8000 - 0xb9fff time.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/time.so 0xc3000 - 0xc6fff strop.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/strop.so 0x205000 - 0x2d9fff org.python.python 2.4a0 (2.2) /opt/local/Library/Frameworks/Python.framework/Versions/2.4/Python 0x575000 - 0x576fff cStringIO.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/cStringIO.so 0x580000 - 0x581fff collections.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/collections.so 0x5cc000 - 0x5d2fff _socket.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_socket.so 0x5e7000 - 0x5e8fff _ssl.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_ssl.so 0x705000 - 0x737fff libssl.0.9.8.dylib /opt/local/lib/libssl.0.9.8.dylib 0x74b000 - 0x75cfff libz.1.dylib /opt/local/lib/libz.1.dylib 0x761000 - 0x763fff struct.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/struct.so 0x76f000 - 0x771fff binascii.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/binascii.so 0x7bc000 - 0x7bdfff math.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/math.so 0x7c5000 - 0x7c6fff _random.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_random.so 0x7cd000 - 0x7cefff fcntl.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/fcntl.so 0x7d6000 - 0x7d7fff md5.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/md5.so 0x7de000 - 0x7dffff sha.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/sha.so 0x7e6000 - 0x7e6fff _bisect.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_bisect.so 0x1008000 - 0x10f7fff libcrypto.0.9.8.dylib /opt/local/lib/libcrypto.0.9.8.dylib 0x11a0000 - 0x11abfff datetime.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/datetime.so 0x120e000 - 0x1211fff array.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/array.so 0x1222000 - 0x1222fff grp.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/grp.so 0x126e000 - 0x127bfff cPickle.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/cPickle.so 0x129a000 - 0x129dfff _Res.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_Res.so 0x12ac000 - 0x12b2fff _File.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_File.so 0x12cb000 - 0x12ccfff MacOS.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/MacOS.so 0x1348000 - 0x1374fff pyexpat.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/pyexpat.so 0x1427000 - 0x1427fff _weakref.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_weakref.so 0x142d000 - 0x142dfff _initgroups.so /Applications/Plone-2.5.2/lib/python/initgroups/_initgroups.so 0x1433000 - 0x1433fff crypt.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/crypt.so 0x1439000 - 0x143afff _heapq.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_heapq.so 0x1442000 - 0x1442fff _Missing.so /Applications/Plone-2.5.2/lib/python/Missing/_Missing.so 0x144e000 - 0x1450fff cPersistence.so /Applications/Plone-2.5.2/lib/python/persistent/cPersistence.so 0x145b000 - 0x145cfff TimeStamp.so /Applications/Plone-2.5.2/lib/python/persistent/TimeStamp.so 0x1463000 - 0x1464fff cPickleCache.so /Applications/Plone-2.5.2/lib/python/persistent/cPickleCache.so 0x146e000 - 0x146ffff _zope_interface_coptimizations.so /Applications/Plone-2.5.2/lib/python/zope/interface/_zope_interface_coptimiz ations.so 0x1477000 - 0x1477fff _MultiMapping.so /Applications/Plone-2.5.2/lib/python/MultiMapping/_MultiMapping.so 0x14fe000 - 0x1502fff cAccessControl.so /Applications/Plone-2.5.2/lib/python/AccessControl/cAccessControl.so 0x1510000 - 0x1512fff _ExtensionClass.so /Applications/Plone-2.5.2/lib/python/ExtensionClass/_ExtensionClass.so 0x151c000 - 0x1520fff _Acquisition.so /Applications/Plone-2.5.2/lib/python/Acquisition/_Acquisition.so 0x152e000 - 0x152ffff _Record.so /Applications/Plone-2.5.2/lib/python/Record/_Record.so 0x1537000 - 0x1539fff cDocumentTemplate.so /Applications/Plone-2.5.2/lib/python/DocumentTemplate/cDocumentTemplate.so 0x1585000 - 0x1591fff parser.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/parser.so 0x15e8000 - 0x15eafff zlib.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/zlib.so 0x1633000 - 0x1635fff operator.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/operator.so 0x167f000 - 0x1681fff _zope_proxy_proxy.so /Applications/Plone-2.5.2/lib/python/zope/proxy/_zope_proxy_proxy.so 0x168f000 - 0x1691fff itertools.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/itertools.so 0x16a0000 - 0x16a0fff _zope_i18nmessageid_message.so /Applications/Plone-2.5.2/lib/python/zope/i18nmessageid/_zope_i18nmessageid_ message.so 0x16e7000 - 0x16e7fff _zope_thread.so /Applications/Plone-2.5.2/lib/python/zope/thread/_zope_thread.so 0x16ee000 - 0x16f1fff _proxy.so /Applications/Plone-2.5.2/lib/python/zope/security/_proxy.so 0x1701000 - 0x1702fff _zope_security_checker.so /Applications/Plone-2.5.2/lib/python/zope/security/_zope_security_checker.so 0x174a000 - 0x174afff _zope_hookable.so /Applications/Plone-2.5.2/lib/python/zope/hookable/_zope_hookable.so 0x1790000 - 0x1790fff _ComputedAttribute.so /Applications/Plone-2.5.2/lib/python/ComputedAttribute/_ComputedAttribute.so 0x17d6000 - 0x17d9fff _zope_app_container_contained.so /Applications/Plone-2.5.2/lib/python/zope/app/container/_zope_app_container_ contained.so 0x17e8000 - 0x17e8fff _Persistence.so /Applications/Plone-2.5.2/lib/python/Persistence/_Persistence.so 0x17ee000 - 0x17eefff _MethodObject.so /Applications/Plone-2.5.2/lib/python/MethodObject/_MethodObject.so 0x17f4000 - 0x17f5fff select.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/select.so 0x20c8000 - 0x20d3fff _OOBTree.so /Applications/Plone-2.5.2/lib/python/BTrees/_OOBTree.so 0x20f0000 - 0x20f0fff stopper.so /Applications/Plone-2.5.2/lib/python/Products/ZCTextIndex/stopper.so 0x20f6000 - 0x20f6fff okascore.so /Applications/Plone-2.5.2/lib/python/Products/ZCTextIndex/okascore.so 0x2245000 - 0x2250fff _OIBTree.so /Applications/Plone-2.5.2/lib/python/BTrees/_OIBTree.so 0x226d000 - 0x2278fff _IOBTree.so /Applications/Plone-2.5.2/lib/python/BTrees/_IOBTree.so 0x2297000 - 0x22a3fff _IIBTree.so /Applications/Plone-2.5.2/lib/python/BTrees/_IIBTree.so 0x2abd000 - 0x2ae7fff _imaging.so /opt/local/lib/python2.4/site-packages/PIL/_imaging.so 0x2b79000 - 0x2b94fff libjpeg.62.dylib /opt/local/lib/libjpeg.62.dylib 0x2be2000 - 0x2be4fff _csv.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/_csv.so 0x2bf0000 - 0x2bf0fff _ThreadLock.so /Applications/Plone-2.5.2/lib/python/ThreadLock/_ThreadLock.so 0x2f85000 - 0x2f87fff unicodedata.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/li b-dynload/unicodedata.so 0x3285000 - 0x32a8fff libxml2mod.so /opt/local/lib/python2.4/site-packages/libxml2mod.so 0x3337000 - 0x3427fff libxml2.2.dylib /opt/local/lib/libxml2.2.dylib 0x3456000 - 0x354bfff libiconv.2.dylib /opt/local/lib/libiconv.2.dylib 0x3c05000 - 0x3c10fff _fsBTree.so /Applications/Plone-2.5.2/lib/python/BTrees/_fsBTree.so 0x52eb000 - 0x52ecfff ZopeSplitter.so /Applications/Plone-2.5.2/lib/python/Products/PluginIndexes/TextIndex/Splitt er/ZopeSplitter/ZopeSplitter.so 0x56c5000 - 0x56d0fff libexslt.0.dylib /opt/local/lib/libexslt.0.dylib 0x5a05000 - 0x5a2efff libxslt.1.dylib /opt/local/lib/libxslt.1.dylib 0x6405000 - 0x6477fff etree.so /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/si te-packages/lxml-1.3beta-py2.4-macosx-10.4-i386.egg/lxml/etree.so 0x8fe00000 - 0x8fe4afff dyld 46.12 /usr/lib/dyld 0x90000000 - 0x90170fff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x901c0000 - 0x901c2fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x901c4000 - 0x90201fff com.apple.CoreText 1.1.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x90228000 - 0x902fefff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x9031e000 - 0x90773fff com.apple.CoreGraphics 1.258.61 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x9080a000 - 0x908d2fff com.apple.CoreFoundation 6.4.7 (368.28) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x90910000 - 0x90910fff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x90912000 - 0x90a05fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a55000 - 0x90ad4fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90afd000 - 0x90b61fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x90bd0000 - 0x90bd7fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x90bdc000 - 0x90c4ffff com.apple.framework.IOKit 1.4.6 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90c64000 - 0x90c76fff libauto.dylib /usr/lib/libauto.dylib 0x90c7c000 - 0x90f22fff com.apple.CoreServices.CarbonCore 682.21 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x90f65000 - 0x90fcdfff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x91006000 - 0x91044fff com.apple.CFNetwork 129.20 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x91057000 - 0x91067fff com.apple.WebServices 1.1.3 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebS ervicesCore.framework/Versions/A/WebServicesCore 0x91072000 - 0x910f1fff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x9112b000 - 0x91149fff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x91155000 - 0x91163fff libz.1.dylib /usr/lib/libz.1.dylib 0x91166000 - 0x91305fff com.apple.security 4.5.2 (29774) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x91403000 - 0x9140bfff com.apple.DiskArbitration 2.1.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x91412000 - 0x91419fff libbsm.dylib /usr/lib/libbsm.dylib 0x9141d000 - 0x91443fff com.apple.SystemConfiguration 1.8.6 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x91455000 - 0x914cbfff com.apple.audio.CoreAudio 3.0.4 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x9151c000 - 0x9151cfff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x9151e000 - 0x9154afff com.apple.AE 314 (313) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/AE.framework/Versions/A/AE 0x9155d000 - 0x91631fff com.apple.ColorSync 4.4.9 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x9166c000 - 0x916dffff com.apple.print.framework.PrintCore 4.6 (177.13) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x9170d000 - 0x917b6fff com.apple.QD 3.10.24 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x917dc000 - 0x91827fff com.apple.HIServices 1.5.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x91846000 - 0x9185cfff com.apple.LangAnalysis 1.6.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/LangAnalysis.framework/Versions/A/LangAnalysis 0x91868000 - 0x91883fff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/FindByContent.framework/Versions/A/FindByContent 0x9188e000 - 0x918cbfff com.apple.LaunchServices 182 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/LaunchServices.framework/Versions/A/LaunchServices 0x918df000 - 0x918ebfff com.apple.speech.synthesis.framework 3.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x918f2000 - 0x91931fff com.apple.ImageIO.framework 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x91944000 - 0x919f6fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib 0x91a3c000 - 0x91a52fff libcups.2.dylib /usr/lib/libcups.2.dylib 0x91a57000 - 0x91a75fff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x91a7a000 - 0x91ad9fff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x91aeb000 - 0x91aeffff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91af1000 - 0x91b75fff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRaw.dylib 0x91b79000 - 0x91bb6fff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x91bbc000 - 0x91bd6fff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x91bdb000 - 0x91bddfff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x91bdf000 - 0x91cbdfff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x91cda000 - 0x91cdafff com.apple.Accelerate 1.3.1 (Accelerate 1.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x91cdc000 - 0x91d6afff com.apple.vImage 2.5 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x91d71000 - 0x91d71fff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x91d73000 - 0x91dccfff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x91dd5000 - 0x91df9fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x91e01000 - 0x9220afff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x92244000 - 0x925f8fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x92625000 - 0x92712fff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x92714000 - 0x92791fff com.apple.DesktopServices 1.3.6 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x927d2000 - 0x92a02fff com.apple.Foundation 6.4.8 (567.29) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x92baa000 - 0x92baafff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x92bac000 - 0x92bbcfff com.apple.ImageCapture 3.0.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x92bcb000 - 0x92bd3fff com.apple.speech.recognition.framework 3.6 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x92bd9000 - 0x92bdffff com.apple.securityhi 2.0.1 (24742) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x92be5000 - 0x92c76fff com.apple.ink.framework 101.2.1 (71) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x92c8a000 - 0x92c8efff com.apple.help 1.0.3 (32.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x92c91000 - 0x92caffff com.apple.openscripting 1.2.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x92cc1000 - 0x92cc7fff com.apple.print.framework.Print 5.2 (192.4) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x92ccd000 - 0x92d30fff com.apple.htmlrendering 66.1 (1.1.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRender ing.framework/Versions/A/HTMLRendering 0x92d57000 - 0x92d98fff com.apple.NavigationServices 3.4.4 (3.4.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x92dbf000 - 0x92dcdfff com.apple.audio.SoundManager 3.9.1 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSoun d.framework/Versions/A/CarbonSound 0x92dd4000 - 0x92dd9fff com.apple.CommonPanels 1.2.3 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x92dde000 - 0x930d3fff com.apple.HIToolbox 1.4.9 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox --

Hi, from the stack traces I can see that you are on MacOS-X. Could you check which libxml2 version you are using? Just run "test.py" from the source distribution or look at "lxml.etree.LIBXML*". There are known issues with older versions of libxml2, so especially when you are using XML-Schema, you should care for installing a recent version. Stefan

Hi, Eric Tiffany wrote:
Is this the Python version? I'm asking because you said it was 2.4.3. lxml.etree behaves different for Python <= 2.4.2, as there are known bugs with threading in earlier versions. If you're sure you can reproduce the *same* bug with a version older than 2.4.2 (and libxml 2.6.28, as you also mentioned), that would completely shift the focus of the bug hunt. Is there any way to detect MacOS-X at the C level? In that case, we could try to disable thread concurrency support completely for this platform - in case that's the source of the segfault. You can try to see if this would fix the problem by passing the option "--without-threading" to setup.py when building lxml. Could you please try that with your current setup and report back to the list? Another question: are you using a custom parser (i.e. passing a second argument to the parse() function) here or is it the default parser that crashes here? Stefan

Sorry for the delay in responding -- been on vacation in Italy. Responses inline. I am quite mystified at this point. On 5/21/07 2:21 AM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:
For some reason, the python reports its version incorrectly in the crashdump. It is actually 2.4.4.
There are certainly ways to detect MacOS at compile-time, though I'm not sure of the details. I get this from the shell: $ uname -a Darwin etmac.local 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 I have attempted to build from SVN using --without-threading using $ make clean $ python setup.py build --without-threading $ sudo python setup.py install (interestingly, it makes an egg called lxml-1.3beta-py2.4-macosx-10.3-i386.egg even though the OS version 10.4.9 not 10.3, but whatever). Also, I see a problem with the self tests regarding test_module_HTML_unicode, but I'll report that elsewhere.
It is the default parser. And it is still crashing inside Zope even with the --without-threading. Here is my code: schemaPath = "/Applications/Plone-2.5.2/Instance/Products/xtend/xtend/schedules.xsd" print >> sys.stderr, "Loading schema doc from ", schemaPath schemaDoc = etree.parse(schemaPath) print >> sys.stderr, "creating XMLSchema ..." schemaTree = etree.XMLSchema(schemaDoc) print >> sys.stderr, "Trying validation" And here is the output (when running inside Zope): Loading schema doc from /Applications/Plone-2.5.2/Instance/Products/xtend/xtend/schedules.xsd creating XMLSchema ... Bus error So it seems pretty clear that it is croaking while trying to do the XMLSchema construction. Inside a python shell, that code runs fine. In both environments (zope and shell) I have lxml.etree: (1, 3, -1, 43887) libxml used: (2, 6, 28) libxml compiled: (2, 6, 28) libxslt used: (1, 1, 20) libxslt compiled: (1, 1, 20) Here is the thread backtrace for the thread that crashed: Thread 1 Crashed: 0 <<00000000>> 0xffff07c7 __memcpy + 39 (cpu_capabilities.h:228) 1 libSystem.B.dylib 0x9000b569 __sfvwrite + 409 2 libSystem.B.dylib 0x9001063d __vfprintf + 19692 3 libSystem.B.dylib 0x90011428 vfprintf + 91 4 libxml2.2.dylib 0x91befd3b xmlGenericErrorDefaultFunc + 75 5 libxml2.2.dylib 0x0354bad1 xmlSchemaCheckFacet + 709 6 libxml2.2.dylib 0x0354c020 xmlSchemaFixupSimpleTypeStageTwo + 927 7 libxml2.2.dylib 0x0355175b xmlSchemaFixupComponents + 4054 8 libxml2.2.dylib 0x03552207 xmlSchemaParse + 290 9 etree.so 0x06464039 __pyx_f_5etree_9XMLSchema___init__ + 980 (etree.c:38191) 10 org.python.python 0x0025283e type_call + 166 (typeobject.c:435) 11 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 12 org.python.python 0x0027e397 PyEval_EvalFrame + 16838 (ceval.c:3776) 13 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 14 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 15 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 16 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 17 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 18 org.python.python 0x00214c90 instance_call + 90 (classobject.c:2087) 19 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 20 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 21 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 22 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 23 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 24 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 25 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 26 org.python.python 0x00214c90 instance_call + 90 (classobject.c:2087) 27 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 28 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 29 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 30 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 31 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 32 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 33 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 34 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 35 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 36 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 37 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 38 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 39 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 40 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 41 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 42 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 43 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 44 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 45 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 46 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 47 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 48 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 49 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 50 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 51 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 52 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 53 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 54 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 55 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 56 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 57 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 58 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 59 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 60 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 61 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 62 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 63 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 64 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 65 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 66 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 67 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 68 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 69 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 70 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 71 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 72 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 73 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 74 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 75 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 76 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 77 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 78 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 79 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 80 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 81 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 82 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 83 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 84 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 85 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 86 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 87 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 88 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 89 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 90 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 91 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 92 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 93 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 94 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 95 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 96 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 97 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 98 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 99 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 100 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 101 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 102 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 103 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 104 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 105 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 106 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 107 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 108 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 109 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 110 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 111 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 112 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 113 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 114 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 115 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 116 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 117 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 118 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 119 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 120 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 121 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 122 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 123 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 124 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 125 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 126 org.python.python 0x00217aaa PyInstance_New + 114 (classobject.c:588) 127 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 128 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 129 org.python.python 0x002b3126 t_bootstrap + 62 (threadmodule.c:434) 130 libSystem.B.dylib 0x90024987 _pthread_body + 84

OK, some more info. If I use the builtin libxml2 (2.6.16) libs from Apple, rather than the 2.6.28 version from MacPorts, then I don¹t get these errors crashing Python/Zope. However, the lxml parsing/validation doesn¹t seem to work correctly. So, it seems that Apple has built their libs in a more friendly way, but I¹m now wondering whether there is some known issue with using lxml with libxml2 2.6.16. I¹m continuing to investigate. ET On 5/30/07 2:14 PM, "Eric Tiffany" <etiffany@alum.mit.edu> wrote:

Hi Eric, Eric Tiffany wrote:
That's expected, lxml switches off threading support for this version. It's the same as doing "--without-threading". That's why I was puzzled when you said --without-threading doesn't help you.
However, the lxml parsing/validation doesn’t seem to work correctly.
That's expected, too, XMLSchema ist still under development and definitely was at the time.
Please do. It hard for me to come up with a solution without being able to reproduce the problem. Stefan

OK, I think I've sorted this out to a certain degree. Using lxml 1.3 beta (including threading support) works to parse and validate my XMLSchema stuff using the builtin MacOS libxml2 libs (2.6.16). I think the failures I was seeing earlier had to do with my cluelessness about how Zope coughs up file data from the database. I will next try using with the MacPorts version of libxml2 2.6.28, but I'll turn on the threading switches in the configuration (or, maybe, turn them off). I suspect that my earlier problems with the lxml - libxml2 configurations were due to mismatched threading expectations. Anyway, thanks for the excellent product, and I'll report back on any further insights. ET On 5/31/07 9:29 AM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:

Hi, Eric Tiffany wrote:
Ok, good to know. I was actually wrong in telling you that this disables threading support. Even on 2.6.16, it is enabled by default.
I think the failures I was seeing earlier had to do with my cluelessness about how Zope coughs up file data from the database.
Ok, so that means what? You got a validation error and it crashed because of that?
Please do. We are always interested in ways to work around problems on whatever platform. If you ran into such problems, others will, too. Stefan

On 6/3/07 12:45 PM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:
Sorry, should be clearer. I had two problems using lxml within Zope. 1. Using libxml2 2.6.28 built from Macports (probably without threading, in retrospect) I was getting crashes when running XMLSchema from within Zope, but success when running from toplevel. This was fixed by reverting to the Apple libxml2 2.6.16. 2. I erroneously reported that lxml was still not working with libxml2 2.6.16 (it wasn't crashing, but I thought it wasn't parsing correctly). In fact, I was passing bogus data because there is precious little documentation about how Zope makes file objects available. Once I fixed my code, it all seems to work. ET -- ____________________________________________________ Eric Tiffany | eric@projectliberty.org Interop Tech Lead | +1 413-458-3743 Liberty Alliance | +1 413-627-1778 mobile

On Jun 4, 2007, at 8:55 AM, David Pratt wrote:
FWIW, I'm using zc.buildout to build a project-local (non-system- installed) libxml2, libxslt, and lxml. This works out reasonably well on the Mac (caveats below) and on other platforms (known success on Centos/RHEL, Ubuntu). It's a bit of philosophy to not use the system-installed libs for this, so you may not like this solution if your philosophy differs on this point. The big caveat on Mac is that you must start python with DYLD_LIBRARY_PATH=/Users/gary/Dev/MYPROJECT/parts/libxml2/lib:/Users/ gary/Dev/MYPROJECT/parts/libxslt/lib for the project-installed libraries to be found (otherwise you still get the system ones). You can get around this by having a wrapper script that inserts the values in the environment for you; for instance, zdaemon will do it for you if so configured. My zc.buildout setup is similar to what Martijn Faassen blogged about last year. If anyone is interested I'll dig up the details-- particularly the differences. Gary

Hi Gary. I'd definitely be interested in more details about your buildout for these tools. I am also using buildouts and would much rather keep everything local to project. I am no longer using my system python for anything and relying on mac's tools seems lame since I want more control over versions being used, etc. Regards, David Gary Poster wrote:

On Jun 4, 2007, at 9:39 AM, David Pratt wrote:
ok in [buildout], make sure "parts" includes "libxml2 libxslt lxml". I also include 'lxml' in my install_requires in my setup.py, but that probably is redundant; haven't bothered to find out. I use these three sections: [lxml] recipe = zc.recipe.egg:custom egg = lxml == 1.3beta include-dirs = ${libxml2:location}/include/libxml2:$ {libxslt:location}/include rpath = ${libxml2:location}/lib:${libxslt:location}/lib library-dirs = ${libxml2:location}/lib:${libxslt:location}/lib [libxml2] recipe = zc.recipe.cmmi url = XXX our private download cache of libxml2-2.6.28.tar.gz XXX extra_options = --without-python [libxslt] recipe = zc.recipe.cmmi url = XXX our private download cache of libxslt-1.1.20.tar.gz XXX extra_options = --without-python --with-libxml-prefix=$ {libxml2:location} When I run bin/test and bin/py I need to insert the DYLD_LIBRARY_PATH in the environment; I've planned to write a quick recipe for a shell script that would do that, but have not gotten around to it. If you are using zdaemon, you can leverage it to do that for zopectl start and zopectl fg. Using one of the Zope 3 instance recipes I specify the environment: zdaemon.conf = <environment> DYLD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib LD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib </environment> (Mac only needs the DYLD one) Gary

OK, after I added the DYLD_LIBRARY_PATH=/opt/local/lib to my environment for starting zope from the Eclipse debugger, my code works with the Macports 2.6.28 libxml2. Thanks for that hint. I'm a bit perplexed because, all along, lxml was reporting this information in my logs: lxml.etree: (1, 3, -1, 43887) libxml used: (2, 6, 28) libxml compiled: (2, 6, 28) So evidently lxml thought it was using 2.6.28, while python was somehow using the default Apple libxml2 libs. That happened whether I was running inside Eclipse or from the normal zopectl startup, but in both of these cases python would crash when I tried to create a XMLSchema. Strangely, it worked properly when running without zope (and without any special env settings). Anyway, my libxml2 was compiled --with-threads. No clue if that is required in my circumstances, but now that it works I'm not going to do any more experiments for the time being. ET On 6/4/07 10:37 AM, "David Pratt" <fairwinds@eastlink.ca> wrote:

Hi, Eric Tiffany wrote:
So evidently lxml thought it was using 2.6.28, while python was somehow using the default Apple libxml2 libs.
If you want to avoid problems like this, consider compiling in libxml2 and libxslt statically into lxml.etree and the other two Pyrex libraries. That adds a couple of MBs to each of the three Pyrex modules, but that's usually a low price for the comfort of always getting the versions you expect. We have a sort-of-recipe for doing that on Windows, but it should not be too hard to adapt that to MacOS-X. http://codespeak.net/lxml/dev/build.html Stefan

Stefan Behnel wrote:
It would be great if someone could distribute a pre-built lxml egg for Mac with libxml2 linked in directly. Only a small number of Mac users currently seem to be able to use lxml without segfaults and bus errors. -- Ian Bicking | ianb@colorstudy.com | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers

Hi, from the stack traces I can see that you are on MacOS-X. Could you check which libxml2 version you are using? Just run "test.py" from the source distribution or look at "lxml.etree.LIBXML*". There are known issues with older versions of libxml2, so especially when you are using XML-Schema, you should care for installing a recent version. Stefan

Hi, Eric Tiffany wrote:
Is this the Python version? I'm asking because you said it was 2.4.3. lxml.etree behaves different for Python <= 2.4.2, as there are known bugs with threading in earlier versions. If you're sure you can reproduce the *same* bug with a version older than 2.4.2 (and libxml 2.6.28, as you also mentioned), that would completely shift the focus of the bug hunt. Is there any way to detect MacOS-X at the C level? In that case, we could try to disable thread concurrency support completely for this platform - in case that's the source of the segfault. You can try to see if this would fix the problem by passing the option "--without-threading" to setup.py when building lxml. Could you please try that with your current setup and report back to the list? Another question: are you using a custom parser (i.e. passing a second argument to the parse() function) here or is it the default parser that crashes here? Stefan

Sorry for the delay in responding -- been on vacation in Italy. Responses inline. I am quite mystified at this point. On 5/21/07 2:21 AM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:
For some reason, the python reports its version incorrectly in the crashdump. It is actually 2.4.4.
There are certainly ways to detect MacOS at compile-time, though I'm not sure of the details. I get this from the shell: $ uname -a Darwin etmac.local 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 I have attempted to build from SVN using --without-threading using $ make clean $ python setup.py build --without-threading $ sudo python setup.py install (interestingly, it makes an egg called lxml-1.3beta-py2.4-macosx-10.3-i386.egg even though the OS version 10.4.9 not 10.3, but whatever). Also, I see a problem with the self tests regarding test_module_HTML_unicode, but I'll report that elsewhere.
It is the default parser. And it is still crashing inside Zope even with the --without-threading. Here is my code: schemaPath = "/Applications/Plone-2.5.2/Instance/Products/xtend/xtend/schedules.xsd" print >> sys.stderr, "Loading schema doc from ", schemaPath schemaDoc = etree.parse(schemaPath) print >> sys.stderr, "creating XMLSchema ..." schemaTree = etree.XMLSchema(schemaDoc) print >> sys.stderr, "Trying validation" And here is the output (when running inside Zope): Loading schema doc from /Applications/Plone-2.5.2/Instance/Products/xtend/xtend/schedules.xsd creating XMLSchema ... Bus error So it seems pretty clear that it is croaking while trying to do the XMLSchema construction. Inside a python shell, that code runs fine. In both environments (zope and shell) I have lxml.etree: (1, 3, -1, 43887) libxml used: (2, 6, 28) libxml compiled: (2, 6, 28) libxslt used: (1, 1, 20) libxslt compiled: (1, 1, 20) Here is the thread backtrace for the thread that crashed: Thread 1 Crashed: 0 <<00000000>> 0xffff07c7 __memcpy + 39 (cpu_capabilities.h:228) 1 libSystem.B.dylib 0x9000b569 __sfvwrite + 409 2 libSystem.B.dylib 0x9001063d __vfprintf + 19692 3 libSystem.B.dylib 0x90011428 vfprintf + 91 4 libxml2.2.dylib 0x91befd3b xmlGenericErrorDefaultFunc + 75 5 libxml2.2.dylib 0x0354bad1 xmlSchemaCheckFacet + 709 6 libxml2.2.dylib 0x0354c020 xmlSchemaFixupSimpleTypeStageTwo + 927 7 libxml2.2.dylib 0x0355175b xmlSchemaFixupComponents + 4054 8 libxml2.2.dylib 0x03552207 xmlSchemaParse + 290 9 etree.so 0x06464039 __pyx_f_5etree_9XMLSchema___init__ + 980 (etree.c:38191) 10 org.python.python 0x0025283e type_call + 166 (typeobject.c:435) 11 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 12 org.python.python 0x0027e397 PyEval_EvalFrame + 16838 (ceval.c:3776) 13 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 14 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 15 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 16 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 17 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 18 org.python.python 0x00214c90 instance_call + 90 (classobject.c:2087) 19 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 20 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 21 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 22 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 23 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 24 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 25 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 26 org.python.python 0x00214c90 instance_call + 90 (classobject.c:2087) 27 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 28 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 29 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 30 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 31 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 32 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 33 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 34 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 35 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 36 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 37 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 38 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 39 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 40 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 41 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 42 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 43 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 44 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 45 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 46 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 47 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 48 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 49 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 50 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 51 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 52 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 53 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 54 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 55 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 56 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 57 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 58 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 59 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 60 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 61 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 62 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 63 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 64 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 65 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 66 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 67 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 68 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 69 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 70 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 71 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 72 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 73 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 74 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 75 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 76 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 77 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 78 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 79 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 80 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 81 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 82 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 83 org.python.python 0x0027e69c PyEval_EvalFrame + 17611 (ceval.c:3845) 84 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 85 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 86 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 87 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 88 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 89 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 90 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 91 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 92 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 93 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 94 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 95 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 96 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 97 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 98 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 99 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 100 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 101 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 102 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 103 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 104 _Acquisition.so 0x0151e9ac CallMethodO + 60 (_Acquisition.c:97) 105 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 106 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 107 org.python.python 0x002715a1 builtin_apply + 201 (bltinmodule.c:100) 108 org.python.python 0x0027faca PyEval_EvalFrame + 22777 (ceval.c:3568) 109 org.python.python 0x0027ebaa PyEval_EvalFrame + 18905 (ceval.c:3651) 110 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 111 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 112 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 113 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 114 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 115 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 116 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 117 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 118 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 119 org.python.python 0x0027e49f PyEval_EvalFrame + 17102 (ceval.c:3661) 120 org.python.python 0x00280665 PyEval_EvalCodeEx + 1774 (ceval.c:2741) 121 org.python.python 0x00228063 function_call + 320 (funcobject.c:548) 122 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 123 org.python.python 0x00215667 instancemethod_call + 401 (classobject.c:2532) 124 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 125 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 126 org.python.python 0x00217aaa PyInstance_New + 114 (classobject.c:588) 127 org.python.python 0x0020d87f PyObject_Call + 45 (abstract.c:1795) 128 org.python.python 0x0027944a PyEval_CallObjectWithKeywords + 112 (ceval.c:3435) 129 org.python.python 0x002b3126 t_bootstrap + 62 (threadmodule.c:434) 130 libSystem.B.dylib 0x90024987 _pthread_body + 84

OK, some more info. If I use the builtin libxml2 (2.6.16) libs from Apple, rather than the 2.6.28 version from MacPorts, then I don¹t get these errors crashing Python/Zope. However, the lxml parsing/validation doesn¹t seem to work correctly. So, it seems that Apple has built their libs in a more friendly way, but I¹m now wondering whether there is some known issue with using lxml with libxml2 2.6.16. I¹m continuing to investigate. ET On 5/30/07 2:14 PM, "Eric Tiffany" <etiffany@alum.mit.edu> wrote:

Hi Eric, Eric Tiffany wrote:
That's expected, lxml switches off threading support for this version. It's the same as doing "--without-threading". That's why I was puzzled when you said --without-threading doesn't help you.
However, the lxml parsing/validation doesn’t seem to work correctly.
That's expected, too, XMLSchema ist still under development and definitely was at the time.
Please do. It hard for me to come up with a solution without being able to reproduce the problem. Stefan

OK, I think I've sorted this out to a certain degree. Using lxml 1.3 beta (including threading support) works to parse and validate my XMLSchema stuff using the builtin MacOS libxml2 libs (2.6.16). I think the failures I was seeing earlier had to do with my cluelessness about how Zope coughs up file data from the database. I will next try using with the MacPorts version of libxml2 2.6.28, but I'll turn on the threading switches in the configuration (or, maybe, turn them off). I suspect that my earlier problems with the lxml - libxml2 configurations were due to mismatched threading expectations. Anyway, thanks for the excellent product, and I'll report back on any further insights. ET On 5/31/07 9:29 AM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:

Hi, Eric Tiffany wrote:
Ok, good to know. I was actually wrong in telling you that this disables threading support. Even on 2.6.16, it is enabled by default.
I think the failures I was seeing earlier had to do with my cluelessness about how Zope coughs up file data from the database.
Ok, so that means what? You got a validation error and it crashed because of that?
Please do. We are always interested in ways to work around problems on whatever platform. If you ran into such problems, others will, too. Stefan

On 6/3/07 12:45 PM, "Stefan Behnel" <stefan_ml@behnel.de> wrote:
Sorry, should be clearer. I had two problems using lxml within Zope. 1. Using libxml2 2.6.28 built from Macports (probably without threading, in retrospect) I was getting crashes when running XMLSchema from within Zope, but success when running from toplevel. This was fixed by reverting to the Apple libxml2 2.6.16. 2. I erroneously reported that lxml was still not working with libxml2 2.6.16 (it wasn't crashing, but I thought it wasn't parsing correctly). In fact, I was passing bogus data because there is precious little documentation about how Zope makes file objects available. Once I fixed my code, it all seems to work. ET -- ____________________________________________________ Eric Tiffany | eric@projectliberty.org Interop Tech Lead | +1 413-458-3743 Liberty Alliance | +1 413-627-1778 mobile

On Jun 4, 2007, at 8:55 AM, David Pratt wrote:
FWIW, I'm using zc.buildout to build a project-local (non-system- installed) libxml2, libxslt, and lxml. This works out reasonably well on the Mac (caveats below) and on other platforms (known success on Centos/RHEL, Ubuntu). It's a bit of philosophy to not use the system-installed libs for this, so you may not like this solution if your philosophy differs on this point. The big caveat on Mac is that you must start python with DYLD_LIBRARY_PATH=/Users/gary/Dev/MYPROJECT/parts/libxml2/lib:/Users/ gary/Dev/MYPROJECT/parts/libxslt/lib for the project-installed libraries to be found (otherwise you still get the system ones). You can get around this by having a wrapper script that inserts the values in the environment for you; for instance, zdaemon will do it for you if so configured. My zc.buildout setup is similar to what Martijn Faassen blogged about last year. If anyone is interested I'll dig up the details-- particularly the differences. Gary

Hi Gary. I'd definitely be interested in more details about your buildout for these tools. I am also using buildouts and would much rather keep everything local to project. I am no longer using my system python for anything and relying on mac's tools seems lame since I want more control over versions being used, etc. Regards, David Gary Poster wrote:

On Jun 4, 2007, at 9:39 AM, David Pratt wrote:
ok in [buildout], make sure "parts" includes "libxml2 libxslt lxml". I also include 'lxml' in my install_requires in my setup.py, but that probably is redundant; haven't bothered to find out. I use these three sections: [lxml] recipe = zc.recipe.egg:custom egg = lxml == 1.3beta include-dirs = ${libxml2:location}/include/libxml2:$ {libxslt:location}/include rpath = ${libxml2:location}/lib:${libxslt:location}/lib library-dirs = ${libxml2:location}/lib:${libxslt:location}/lib [libxml2] recipe = zc.recipe.cmmi url = XXX our private download cache of libxml2-2.6.28.tar.gz XXX extra_options = --without-python [libxslt] recipe = zc.recipe.cmmi url = XXX our private download cache of libxslt-1.1.20.tar.gz XXX extra_options = --without-python --with-libxml-prefix=$ {libxml2:location} When I run bin/test and bin/py I need to insert the DYLD_LIBRARY_PATH in the environment; I've planned to write a quick recipe for a shell script that would do that, but have not gotten around to it. If you are using zdaemon, you can leverage it to do that for zopectl start and zopectl fg. Using one of the Zope 3 instance recipes I specify the environment: zdaemon.conf = <environment> DYLD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib LD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib </environment> (Mac only needs the DYLD one) Gary

OK, after I added the DYLD_LIBRARY_PATH=/opt/local/lib to my environment for starting zope from the Eclipse debugger, my code works with the Macports 2.6.28 libxml2. Thanks for that hint. I'm a bit perplexed because, all along, lxml was reporting this information in my logs: lxml.etree: (1, 3, -1, 43887) libxml used: (2, 6, 28) libxml compiled: (2, 6, 28) So evidently lxml thought it was using 2.6.28, while python was somehow using the default Apple libxml2 libs. That happened whether I was running inside Eclipse or from the normal zopectl startup, but in both of these cases python would crash when I tried to create a XMLSchema. Strangely, it worked properly when running without zope (and without any special env settings). Anyway, my libxml2 was compiled --with-threads. No clue if that is required in my circumstances, but now that it works I'm not going to do any more experiments for the time being. ET On 6/4/07 10:37 AM, "David Pratt" <fairwinds@eastlink.ca> wrote:

Hi, Eric Tiffany wrote:
So evidently lxml thought it was using 2.6.28, while python was somehow using the default Apple libxml2 libs.
If you want to avoid problems like this, consider compiling in libxml2 and libxslt statically into lxml.etree and the other two Pyrex libraries. That adds a couple of MBs to each of the three Pyrex modules, but that's usually a low price for the comfort of always getting the versions you expect. We have a sort-of-recipe for doing that on Windows, but it should not be too hard to adapt that to MacOS-X. http://codespeak.net/lxml/dev/build.html Stefan

Stefan Behnel wrote:
It would be great if someone could distribute a pre-built lxml egg for Mac with libxml2 linked in directly. Only a small number of Mac users currently seem to be able to use lxml without segfaults and bus errors. -- Ian Bicking | ianb@colorstudy.com | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers
participants (5)
-
David Pratt
-
Eric Tiffany
-
Gary Poster
-
Ian Bicking
-
Stefan Behnel