[lxml-dev] Build on AIX5

Hi guys, Managed to build lxml 1.1.2 on AIX5.2, however I had to make a minor patch to "setup.py" (at the bottom of this post for anyone interested). But when I tried to run the test suite it fails as shown below. The "Installing lxml" page on the website says that Python 2.3 is supported but "DocFileSuite" seems to have arrived in 2.4. Does that mean 2.3 isn't really supported for use with lxml? -bash-2.05b$ gmake test_inplace python setup.py build_ext -i Building lxml version 1.1.2 running build_ext python test.py -p -v TESTED VERSION: Python: (2, 3, 4, 'final', 0) lxml.etree: (1, 1, 2, 0) libxml used: (2, 6, 23) libxml compiled: (2, 6, 23) libxslt used: (1, 1, 15) libxslt compiled: (1, 1, 15) Traceback (most recent call last): File "test.py", line 591, in ? exitcode = main(sys.argv) File "test.py", line 554, in main test_cases = get_test_cases(test_files, cfg, tracer=tracer) File "test.py", line 258, in get_test_cases test_suite = module.test_suite() File "/home/matrix/lxml-1.1.2/src/lxml/tests/test_etree.py", line 1262, in test_suite suite.addTests( AttributeError: 'module' object has no attribute 'DocFileSuite' gmake: *** [test_inplace] Error 1 Thanks, Chris *** setup.py.orig Sun Oct 29 18:28:34 2006 --- setup.py Wed Jan 3 16:56:59 2007 *************** *** 124,129 **** --- 124,133 ---- xslt_libs.insert(i, libname.replace('xslt', 'exslt')) break + # Sometimes (eg. AIX) "libxml2" is missing from the link list. + if not xslt_libs.count('-lxml2'): + xslt_libs.extend(flags('xml2-config --libs')) + if '--rpath' in sys.argv: # compile with --rpath under gcc sys.argv.remove('--rpath')

Chris Allen wrote:
Sorry, should have looked back at the archive first, just noticed the thread "lxml 1.1 problems with python 2.3" back in November about segfaults and I can't open a basic file unfortunately: -bash-2.05b$ PYTHONPATH=lxml-1.1.2/src ./test_lxml_basic.py pthread_mutex_lock[3]: Error 0 Segmentation fault (core dumped) -bash-2.05b$ cat test_lxml_basic.py #!/usr/bin/python from lxml import etree from StringIO import StringIO f = open('lxml-1.1.2/src/lxml/tests/test.xml', 'r') tree = etree.parse(f) f.close() -bash-2.05b$ dbx /usr/bin/python core (dbx) where PyThread_release_lock() at 0xd2aad298 PyEval_ReleaseThread() at 0xd2a732c8 PyGILState_Release() at 0xd2aac3fc __pyx_f_5etree_18_FileParserContext_copyToBuffer() at 0xd2c2b234 __pyx_f_5etree__readFilelikeParser() at 0xd2c58f48 xmlParserInputBufferGrow(0x2000b908, 0xfa0) at 0xd2cc201c xmlParserInputGrow(0x20177eb8, 0xfa) at 0xd2d1a580 xmlGROW(0x20177c38) at 0xd2ceb224 xmlParseDocument(0x20177c38) at 0xd2d03594 xmlDoRead(0x20177c38, 0x20185e2c, 0x0, 0x4002, 0x1) at 0xd2ce026c xmlCtxtReadIO(0x20177c38, 0x200d3720, 0x0, 0x20177e88, 0x20185e2c, 0x0, 0x4002) at 0xd2cfee44 __pyx_f_5etree_18_FileParserContext__readDoc() at 0xd2c2b308 __pyx_f_5etree_11_BaseParser__parseDocFromFilelike() at 0xd2c287a4 __pyx_f_5etree__parseDocFromFilelike() at 0xd2c5734c __pyx_f_5etree__parseFilelikeDocument() at 0xd2c563d8 __pyx_f_5etree__parseDocument() at 0xd2c56d90 __pyx_f_5etree_parse() at 0xd2c39128 PyCFunction_Call() at 0xd2ab1e70 call_function() at 0xd2a6ed08 eval_frame() at 0xd2a71e84 PyEval_EvalCodeEx() at 0xd2a72fa0 PyEval_EvalCode() at 0xd2a73044 run_node() at 0xd2a69e60 run_err_node_65_14() at 0xd2a6c2a4 run_err_node() at 0xd2a69ed8 PyRun_FileExFlags() at 0xd2a6ac10 PyRun_SimpleFileExFlags() at 0xd2a6b57c PyRun_AnyFileExFlags() at 0xd2a6b7cc Py_Main() at 0xd2af796c .() at 0x10002084 Regards, Chris

Chris Allen wrote:
Sorry, should have looked back at the archive first, just noticed the thread "lxml 1.1 problems with python 2.3" back in November about segfaults and I can't open a basic file unfortunately: -bash-2.05b$ PYTHONPATH=lxml-1.1.2/src ./test_lxml_basic.py pthread_mutex_lock[3]: Error 0 Segmentation fault (core dumped) -bash-2.05b$ cat test_lxml_basic.py #!/usr/bin/python from lxml import etree from StringIO import StringIO f = open('lxml-1.1.2/src/lxml/tests/test.xml', 'r') tree = etree.parse(f) f.close() -bash-2.05b$ dbx /usr/bin/python core (dbx) where PyThread_release_lock() at 0xd2aad298 PyEval_ReleaseThread() at 0xd2a732c8 PyGILState_Release() at 0xd2aac3fc __pyx_f_5etree_18_FileParserContext_copyToBuffer() at 0xd2c2b234 __pyx_f_5etree__readFilelikeParser() at 0xd2c58f48 xmlParserInputBufferGrow(0x2000b908, 0xfa0) at 0xd2cc201c xmlParserInputGrow(0x20177eb8, 0xfa) at 0xd2d1a580 xmlGROW(0x20177c38) at 0xd2ceb224 xmlParseDocument(0x20177c38) at 0xd2d03594 xmlDoRead(0x20177c38, 0x20185e2c, 0x0, 0x4002, 0x1) at 0xd2ce026c xmlCtxtReadIO(0x20177c38, 0x200d3720, 0x0, 0x20177e88, 0x20185e2c, 0x0, 0x4002) at 0xd2cfee44 __pyx_f_5etree_18_FileParserContext__readDoc() at 0xd2c2b308 __pyx_f_5etree_11_BaseParser__parseDocFromFilelike() at 0xd2c287a4 __pyx_f_5etree__parseDocFromFilelike() at 0xd2c5734c __pyx_f_5etree__parseFilelikeDocument() at 0xd2c563d8 __pyx_f_5etree__parseDocument() at 0xd2c56d90 __pyx_f_5etree_parse() at 0xd2c39128 PyCFunction_Call() at 0xd2ab1e70 call_function() at 0xd2a6ed08 eval_frame() at 0xd2a71e84 PyEval_EvalCodeEx() at 0xd2a72fa0 PyEval_EvalCode() at 0xd2a73044 run_node() at 0xd2a69e60 run_err_node_65_14() at 0xd2a6c2a4 run_err_node() at 0xd2a69ed8 PyRun_FileExFlags() at 0xd2a6ac10 PyRun_SimpleFileExFlags() at 0xd2a6b57c PyRun_AnyFileExFlags() at 0xd2a6b7cc Py_Main() at 0xd2af796c .() at 0x10002084 Regards, Chris
participants (1)
-
Chris Allen