Re: [lxml-dev] Segfault on OS X

On Apr 15, 2005, at 12:14 AM, Marc-Antoine Parent wrote:
Sure, thanks for the offer of help! otool output is first: $ otool -L ./build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/etree.so ./build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/etree.so: /opt/local/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0) /opt/local/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.12.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.1) Next, build: socrates:~/sandboxes/lxml paul$ python ./setup.py build running build running build_py creating build creating build/lib.darwin-7.8.0-Power_Macintosh-2.3 creating build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml creating build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/tests/__init__.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/tests/test_etree.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/tests/test_unicode.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/tests/test_xpathevaluator.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/__init__.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml copying src/lxml/_elementpath.py -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml running build_ext building 'lxml.etree' extension creating build/temp.darwin-7.8.0-Power_Macintosh-2.3 creating build/temp.darwin-7.8.0-Power_Macintosh-2.3/src creating build/temp.darwin-7.8.0-Power_Macintosh-2.3/src/lxml gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/python2.3 -c src/lxml/etree.c -o build/temp.darwin-7.8.0-Power_Macintosh-2.3/src/lxml/etree.o -w gcc -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.darwin-7.8.0-Power_Macintosh-2.3/src/lxml/etree.o -L/opt/local/lib -L/opt/local/lib -lxml2 -lxslt -o build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/etree.so creating build/lib.darwin-7.8.0-Power_Macintosh-2.3/.svn copying src/.svn/README.txt -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/.svn creating build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/.svn copying src/lxml/.svn/README.txt -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/.svn copying src/lxml/tests/test.xml -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests copying src/lxml/tests/test_broken.xml -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests creating build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests/.svn copying src/lxml/tests/.svn/README.txt -> build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/tests/.svn socrates:~/sandboxes/lxml paul$ sudo python ./setup.py install running install running build running build_py running build_ext running install_lib copying build/lib.darwin-7.8.0-Power_Macintosh-2.3/lxml/etree.so -> /opt/local/lib/python2.3/site-packages/lxml socrates:~/sandboxes/lxml paul$ socrates:~/sandboxes/lxml paul$ socrates:~/sandboxes/lxml paul$ python Python 2.3.5 (#1, Mar 6 2005, 18:54:59) [GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin Type "help", "copyright", "credits" or "license" for more information.

OK, I have to agree with you: My problem is not related to yours. I noticed you were using Python 2.3.5; I am using 2.4.1, so I tried 2.3.5 to see if it made a difference. (Actually, 2.3.5c1, I did not yet upgrade since.) I ran into compilation problems, which were attributable to an old version of Pyrex (0.9) in my Python 2.3 libraries, which I fixed by upgrading Pyrex to 0.9.3 I doubt that is your issues, but you also may want to look at /opt/local/lib/python2.3/site-packages/Pyrex/Compiler/Version.py After that, I pass all the tests... So I am totally at a loss with your issue. What I will do is send you my etree.so obtained this way (separately); can you see whether it segfaults on your machine? You will have to set export DYLD_LIBRARY_PATH=/opt/local/lib because it will expect to find the libraries in /usr/local/lib, not in /opt/local/lib Hopefully our libxml version mismatch will not affect you (ok, not too likely but I want to try.) Actually, maybe you could also send me your copy of etree.so? Marc-Antoine

Paul Everitt wrote:
Paul, I might've missed it in the thread, but we do we know your version of libxml2/libxslt yet? It just might be relevant. At least thanks to Marc-Antoine we know lxml *can* work on Mac OS X, which is sort of a relief to me. :) Regards, Martijn

Paul, I might've missed it in the thread, but we do we know your version of libxml2/libxslt yet? It just might be relevant.
According to his otool -L, /opt/local/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0) /opt/local/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.12.0) i.e. libxml 2.6.16, libxslt 1.1.12 MAP

OK, I have to agree with you: My problem is not related to yours. I noticed you were using Python 2.3.5; I am using 2.4.1, so I tried 2.3.5 to see if it made a difference. (Actually, 2.3.5c1, I did not yet upgrade since.) I ran into compilation problems, which were attributable to an old version of Pyrex (0.9) in my Python 2.3 libraries, which I fixed by upgrading Pyrex to 0.9.3 I doubt that is your issues, but you also may want to look at /opt/local/lib/python2.3/site-packages/Pyrex/Compiler/Version.py After that, I pass all the tests... So I am totally at a loss with your issue. What I will do is send you my etree.so obtained this way (separately); can you see whether it segfaults on your machine? You will have to set export DYLD_LIBRARY_PATH=/opt/local/lib because it will expect to find the libraries in /usr/local/lib, not in /opt/local/lib Hopefully our libxml version mismatch will not affect you (ok, not too likely but I want to try.) Actually, maybe you could also send me your copy of etree.so? Marc-Antoine

Paul Everitt wrote:
Paul, I might've missed it in the thread, but we do we know your version of libxml2/libxslt yet? It just might be relevant. At least thanks to Marc-Antoine we know lxml *can* work on Mac OS X, which is sort of a relief to me. :) Regards, Martijn

Paul, I might've missed it in the thread, but we do we know your version of libxml2/libxslt yet? It just might be relevant.
According to his otool -L, /opt/local/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0) /opt/local/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.12.0) i.e. libxml 2.6.16, libxslt 1.1.12 MAP
participants (3)
-
Marc-Antoine Parent
-
Martijn Faassen
-
Paul Everitt