[Pythonmac-SIG] Tiger hand rolled Python 2.4.1: libxml2 oddities
Bob Ippolito
bob at redivi.com
Thu May 5 20:20:44 CEST 2005
On May 5, 2005, at 12:55 PM, Gary Poster wrote:
> Using Python 2.4.1 compiled on Tiger. This symptom did not occur on
> Panther.
>
> Running my app using one command makes an import of libxml2 succeed:
> all test pass, including a lot of code that relies on libxml2.
>
> Running it with another command makes it fail:
>
> *** ImportError: Failure linking new module: /Users/gary/jic/opt/
> libxml2/lib/python/libxml2mod.so: Symbol not found:
> _xmlTextReaderByteConsumed
> Referenced from: /Users/gary/jic/opt/libxml2/lib/python/
> libxml2mod.so
> Expected in: flat namespace
>
> I've put a pdb before the import to examine the two environments.
> I've checked sys.path, os.environ, and sys.getdlopenflags()
> (recommended by a coworker) and gotten results that were either
> identical or that (in the case of sys.path) I munged until they were
> identical, and still one import works, the other doesn't.
It sounds like libxml2 (or the Python extension) uses the linker
option flat_namespace .. that's bad. -flat_namespace has been
deprecated since 10.2 (maybe earlier) and shouldn't be used for
anything. I can't help you though, I don't use libxml2 so I don't
know the specifics of why its build/link procedure is broken.
-bob
More information about the Pythonmac-SIG
mailing list