[Zope] Re: [SUM] zope cvs on Cygwin
Jason Tishler
jason@tishler.net
Mon, 01 Apr 2002 20:36:26 -0500
Didier,
On Sat, Mar 30, 2002 at 04:53:56PM -0500, Jason Tishler wrote:
> On Sat, Mar 30, 2002 at 10:24:53PM +0100, Didier Georgieff wrote:
> > As promized, i summarized the solution in a how-to on zope.org.
> >
> > http://www.zope.org/Members/dgeorgieff/howto_zope_cvs_on_cygwin/
>
> There are some inaccuracies in the above. I'm off on a business trip,
> but I will try to provide feedback ASAP.
Here are my comments:
> How-to compile zope cvs on Cygwin
>
> Created by dgeorgieff. Last modified on 2002/03/30.
>
> If you want to compile a fresh cvs zope under cygwin you'll
> face some compilation problems, because of some Cygwin fork
> () bugs.
The Cygwin fork() problem causes compilation problems but only during
the build of the standard shared extensions. This is due to Cygwin's
fork() aborting child processes (i.e., gcc) due to a Windows DLL base
address conflict.
> Those steps should allow you to have a working zope from
> cvs.
>
> This is tested with :
>
> * Win 98
>
> * Cygwin 1.3.10
>
> * Python 2.1.1 (cygwin source package)
Why not use Python 2.2?
> * Zope source from CVS
>
> Python from source with threads
>
> you have to compile the python source (the one from cygwin)
> with threads enable.
Note that threaded Cygwin Python has a hang bug unless one builds with
the following patches:
http://sourceforge.net/tracker/?group_id=5470&atid=305470&func=detail&aid=525532
http://sources.redhat.com/ml/newlib/2002/msg00122.html
The first one is a Python patch, the second one is a Cygwin (i.e.,
newlib) patch. I will finally release a threaded Cygwin Python once
Cygwin 1.3.11 is released.
> * Get python 2.1.1 with source from cygwin
>
> * Recompile Cygwin python with thread support
>
> + cd $PY_SRC (replace $PY_SRC by your own folder)
>
> + ./configure --with-threads
>
> + make
>
> + make install
>
> * run $PY_SRC/Tools/scripts/h2py.py /usr/include/sys/
> fcntl.h
>
> * save the resulting FCNTL.py file in /usr/local/lib/
> python2.1/plat-cygwin/FCNTL.py
make install should be generating FCNTL.py, etc. Why do you need the
two manual steps above?
> Correct the python problem
>
> You have to run a rebase workaround for the fork() problem,
> to make it work.
>
> * create the rebase program from rebase.cc
>
> + g++ -O2 -o rebase rebase.cc -limagehlp
You can find a pre-built rebase.exe at the following:
http://www.tishler.net/jason/software/rebase/rebase.exe.bz2
> * use this rebase program against the DLLs (replace this
> dll list by yours, and adapt eventually your list by
> removing any dll causing rebase to fail)
>
> + cd /usr/bin
>
> + rebase -d -b 0x68000000 -o 0x10000 cygbz21.0.dll
> cygcrypto.dll cygexslt-0.dll cygform5.dll
> cygform6.dll cyggdbm.dll cyghistory4.dll
> cyghistory5.dll cygintl-1.dll cygintl.dll
> cygitcl30.dll cygitk30.dll cygjpeg6b.dll
> cygltdl-3.dll cygmenu5.dll cygmenu6.dll
> cygncurses++5.dll cygncurses++6.dll cygncurses5.dll
> cygncurses6.dll cygpanel5.dll cygpanel6.dll
> cygpcre.dll cygpcreposix.dll cygreadline4.dll
> cygreadline5.dll cygregex.dll cygssl.dll
> cygtclreg80.dll cygtiff3.dll cygtk80.dll
> cygxml2-2.dll cygxslt-1.dll cygxsltbreakpoint-1.dll
> cygz.dll
>
> + rebase -d -b 0x68000000 -o 0x10000 /usr/src/
> python-2.1.1/libpython2.1.dll
>
> + rebase -d -b 0x68000000 -o 0x10000 /usr/src/
> python-2.1.1/build/lib.cygwin-1.3.10-i686-2.1/*.dll
With the above version of rebase (as opposed to the one that I am building
into Cygwin's setup.exe), one must rebase *all* files in one shot.
One *cannot* invoke rebase three different times. Additionally, note
the following:
o Rebase all Cygwin DLLs in /usr/bin except for cygwin1.dll,
cygcurl-2.dll, and libW11.dll. The above list is the Cygwin DLLs
in my /usr/bin which may be different than what is in other user's
/usr/bin.
o Rebase /usr/local/bin/libpython2.1.dll not the one in the build
tree.
o Rebase all files in /usr/local/lib/python2.2/lib-dynload not the
ones in the build tree.
> [snip]
Jason