[Pythonmac-SIG] Re: Compiler flags question for OSX compilation...

Tony McDonald tony.mcdonald@ncl.ac.uk
Mon, 21 May 2001 08:17:25 +0100


On 20/5/01 6:22 pm, "Daniel Lord" <dano@brightfire.com> wrote:

> The fact that you used the pre-compiled version is the tip off.  that
> means you never learned about the compile flag adjustments you need to
> make.
> I assume the same problem is occurring for you.
> 

Unfortunately :( I did know about the compile flags and tried them out a
while back. I had no joy then ...

> Per the recommendation in the README file distributed with the
> Python-2.1 source straight from python.org, I did this:
> 
> ./configure OPT='-g -traditional-cpp'   --with-dyld
> 
> Afterwards the make, make install cycle worked fine although I got some
> warnings about improper prototypes.
> Python 2.1 runs perfectly; although I hear some tests fail due to stack
> size limitation but that appears to be a shell default problem, not a
> python problem.
> 

Heard about the stack problems and fixing them through the tchs 'ulimit' ?
command - but thanks for the info.

My setup was actually
./configure  --with-dyld --with-suffix=.exe 'OPT=-g -traditional-cpp'
Otherwise I'd get a problem at the end with python trying to overwrite a
directory (the case-sensitivity of the file structure problem).

> so the compiler command line options might need to be:  '-g
> -traditional-cpp'   --with-dyld
> 
> Haven't tried it myself on anything but the Python 2,.1 source though.
> 
> 

...and this is where the fun begins :(

I've built up the python2.1 distribution with the above configure line and
installed it. I thought that distutils would use the compiler flags from the
python Makefile.

After the 
python setup.py install
Incantation for PyXML-0.6.5 everything compiles and installs ok.

Then I 'cd' to the ...lib/_xmlplus/parsers directory.

Python 2.1 (#6, 05/20/01, 22:45:35)
[GCC Apple DevKit-based CPP 6.0alpha] on darwin1
Type "copyright", "credits" or "license" for more information.
import readline # builtin
>>> import sgmlop
import sgmlop # dynamically loaded from sgmlop.so
>>> import pyexpat
dyld: python multiple definitions of symbol _main
python definition of _main
pyexpat.so definition of _main

...sigh. (I use the pyexpat example 'cos it's easier to do than the 4Suite
one).

Thanks for the advice Daniel, but I'm really at a loss here :(
Tone.
-- 
Dr Tony McDonald,  Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE  http://www.fmcc.org.uk/mailman/listinfo/zope