[XML-SIG] [Bug #115544] Compile Problems on Mac OS X

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 28 Sep 2000 10:10:18 +0200

> Details: I have successfully compiled and installed Python 2.0b2 on
> my Mac OS X system, but I am having trouble building the current
> Python/XML CVS version.  During the linking stage, I get a warning
> and an error:

I assume that your Python build does not include the pyexpat module,
right? If it did, PyXML should not attempt to build it itself.

Since building is controlled by distutils, I've cc'ed this to the
distutils-sig. Since likely fixes will also need to appear in Python
2.0, it would be good if we resolve this within the next week.

> cc -bundle -prebind build/temp.darwin-1.2-Power Macintosh-2.0/extensions/pyexpat.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmltok/xmltok.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmltok/xmlrole.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlwf/xmlfile.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlwf/xmlwf.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlwf/codepage.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlparse/xmlparse.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlparse/hashtable.o build/temp.darwin-1.2-Power Macintosh-2.0/extensions/expat/xmlwf/unixfilemap.o -o build/lib.darwin-1.2-Power Macintosh-2.0/_xmlplus/parsers/pyexpat.so

I guess I need some help in resolving this, as I have no MacOS X myself.
Can you spot anything that is incorrect in this command line?

> /usr/bin/ld: warning -prebind has no effect with -bundle

What is the intended effect of -prebind and -bundle? Where do these
options come from, anyway? Grepping the distutils sources, I see no
mentioning of them, so what magic finds those options?

> /usr/bin/ld: Undefined symbols:
> _PyArg_ParseTuple
> _PyArg_ParseTupleAndKeywords
> ...*removed a few dozen more symbols*...

It's certainly the case that these symbols are undefined - we are
building an extension module, after all. On MacOS X, the compiler is
gcc, right? Normally, you'll have to pass -shared to the compiler
to have it build shared libraries.

I notice that Python's configure.in has two alternatives for building
extension modules on next/*: If dyld is used, then the options are
"-bundle -prebind", otherwise they are "-nostdlib -r". Do you use
WITH_DYLD? Can you try linking the module with "-nostdlib -r"?


> For detailed info, follow this link:
> http://sourceforge.net/bugs/?func=detailbug&bug_id=115544&group_id=6473