[Zope-dev] compiling Zope 2.4.1 on Mac OS 10.1
Jens Vagelpohl
jens@zope.com
Mon, 1 Oct 2001 15:58:47 -0400
i think i found a working solution. since my knowledge of compilers and=20=
linkers isn't the greatest i'll just explain what i did.
trying to compile python2.1.1 on OS X 10.1 failed for me displaying the=20=
very same error. searching through apple's discussion i found the=20
following link:
http://fink.sourceforge.net/doc/porting/shared.php
it explains that some linker/compiler default options have changed. in=20=
order to get python compiled and running i edited the toplevel Makefile=20=
after running ./configure and edited the lines starting with LDSHARED =
and=20
BLDSHARED, this is what they look like now in my setup:
LDSHARED=3D $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined =
suppress
BLDSHARED=3D $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined =
suppress
notice the "-flat_namespace" switch, this gets rid of the new default=20
"twolevel_namespace" that complains about "undefined warning".
running "make" was now successful and i was able to compile and run Zope =
2.
4.1. you will probably have to recompile your python to set that =
switch=20
under 10.1.
i only did some light testing, no guarantees and before using this in=20
production you might want to read up on those compiler/linker options...
jens
On Sunday, September 30, 2001, at 07:19 , Mitchell L Model wrote:
> Trouble compiling Zope 2.4.1 on Mac OS 10.1:
>
> installed a fresh 10.1 that I just got from Apple
>
>
>
> downloaded the Zope 2.4.1 src
>
>
>
> tried 'python wo_pcgi' with both a Python 2.2a4 I just made and with =
my=20
> previous Python 2.1, both with and without sudo
>
>
>
> Whatever I do, it breaks in the same place.=A0 Here's the end of the =
output:
>
> sed -f sedscript ./Makefile.pre.in >Makefile.pre
>
> /usr/local/lib/python2.1/config/makesetup \
>
> =A0=A0=A0=A0=A0=A0=A0=A0 -m Makefile.pre -c =
/usr/local/lib/python2.1/config/config.c.in=20
> Setup -n=A0 /usr/local/lib/py\
>
> thon2.1/config/Setup.config =
/usr/local/lib/python2.1/config/Setup.local=20
> /usr/local/lib/python2.1/co\
>
> nfig/Setup
>
> make -f Makefile do-it-again
>
> /usr/local/lib/python2.1/config/makesetup \
>
> =A0=A0=A0=A0=A0=A0=A0=A0 -m Makefile.pre -c =
/usr/local/lib/python2.1/config/config.c.in=20
> Setup -n=A0 /usr/local/lib/py\
>
> thon2.1/config/Setup.config =
/usr/local/lib/python2.1/config/Setup.local=20
> /usr/local/lib/python2.1/co\
>
> nfig/Setup
>
> make
>
> cc=A0 -g -O2 -Wall -Wstrict-prototypes -I/usr/local/include/python2.1=20=
> -I/usr/local/include/python2.1 \
>
> -DHAVE_CONFIG_H=A0 -I../Components/ExtensionClass/src -c =
././../Components/
> ExtensionClass/src/Extensi\
>
> onClass.c -o ./ExtensionClass.o
>
> In file included from /usr/local/include/python2.1/pyport.h:84,
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from =
/usr/local/include/python2.1/Python.h:54,
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from =
././../Components/ExtensionClass/src/ExtensionClass.
> h:114,
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from =
././../Components/ExtensionClass/src/ExtensionClass.
> c:61:
>
> /usr/include/math.h:191: warning: function declaration isn't a =
prototype
>
> cc=A0 -bundle -undefined suppress=A0 ./ExtensionClass.o=A0=A0 -o =
./ExtensionClass.
> so
>
> /usr/bin/ld: -undefined error must be used when -twolevel_namespace is =
in=20
> effect
>
> make: *** [ExtensionClass.so] Error 1
>
> Traceback (most recent call last):
>
> =A0 File "wo_pcgi.py", line 117, in ?
>
> =A0 File "wo_pcgi.py", line 105, in main
>
> =A0 File "/usr/local/src/Zope-2.4.1-src/inst/build_extensions.py", =
line 102,
> in ?
>
> =A0=A0=A0 make('lib','python')
>
> =A0 File "/usr/local/src/Zope-2.4.1-src/inst/do.py", line 135, in make
>
> =A0=A0=A0 do('make')
>
> =A0 File "/usr/local/src/Zope-2.4.1-src/inst/do.py", line 104, in do
>
> =A0=A0=A0 if i and picky: raise SystemError, i
>
> SystemError: 512
>
>
> The 'two-level namespace' business is a change from the OX X developer=20=
> tools version 10.0 to 10.1.
>
> Anyone know what's going on here and how to fix it?
>
> --
>
>
> =A0=A0=A0 --- Mitchell