Hi, Jon Rosebaugh wrote:
I'm beginning to think that it's not actually compiling statically. I set up a fresh install of OS X, installed Python, installed XCode, installed macports, libiconv, libxml2, zlib, libxslt, and tried building statically with the following options in the setup file and the following command:
STATIC_INCLUDE_DIRS = ["/opt/local/include", "/opt/local/include/libxml2"] STATIC_LIBRARY_DIRS = ["/opt/local/lib"] STATIC_CFLAGS = ["-liconv", "-lz"]
euterpe:~/lxml-2.0 jon$ export DYLD_LIBRARY_PATH=/opt/local/lib euterpe:~/lxml-2.0 jon$ python setup.py bdist_egg --static
However, I noticed (a) that the gcc line still says -dynamic and (b) the file size of etree.so does not differ whether or not I build with the --static option. And I still get the same segfaults.
Sorry for that, I just checked. "--static" will explicitly not work for other platforms than win32 (see the file setupinfo.py). I didn't write that code, so I wasn't aware how platform specific it is. Is there any chance you could figure out what you need to do for a static compile on MacOS? I.e., what binaries of the libs you need to include in the build, etc. If we can get them into setupinfo.py, I bet you wouldn't be the only happy Mac user. Otherwise, you'd have to stick with the normal build - but there's not much I can do myself to find out what's going wrong - I don't have a Mac (and when I see how difficult it seems to be to update a system library, I guess it won't become my favourite platform either...) Stefan