[Python-Dev] Cygwin report

Paul Prescod paul@prescod.net
Sat, 01 Jul 2000 14:45:00 -0500

Here are instructions for compiling on cygwin. If anyone out there wants
to make some tweaks to the build process so that this stuff isn't
required anymore, it would be appreciated.
Threading does not work:

I don't know much about posix threading APIs but I note that the
standard Cygwin's pthread.h does not seem to define a pthread_cond_t
type. I guess cygwin's pthread is incomplete.

There seems to be a more complete one here:


But I don't care enough to download and try it out. If there is an easy
way to turn off threads by default when the platform is cygwin, that
would make life a little easier for people using it.



gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./socketmodule.c
./socketmodule.c:146: netinet/tcp.h: No such file or directory

(I just commented this module out)


Then I got an error I haven't seen before 

/python/python/dist/src/Modules/python.c:12: undefined reference to
collect2: ld returned 1 exit status

libpython2.0.a was too small to be real so I deleted it and tried "make"
again. It worked. Now I have modules/python.exe

mv python ../python
mv: cannot move `python' to `../python/python': No such file or
make[1]: *** [link] Error 1
make[1]: Leaving directory `/python/python/dist/src/Modules'
make: *** [python] Error 2

Adding "EXE=exe" to Makefile, Modules\Setup.local and Modules\Makefile
does not seem to help.

For now, I'll move the file myself. (I'm not clear why it is the
"Modules" makefile's responsibility to build and move python.exe


If you compile using cygwin, do not make the mistake of trying to use ^Z
as end of term. It hangs cygwin. Use ^D instead.

  File "./Lib/random.py", line 84, in ?
    NV_MAGICCONST = 4*exp(-0.5)/sqrt(2.0)
OverflowError: math range error

(comment out the line that imports random and try again)


 Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it 
gave rise made modern science possible, but it was the algorithm that 
made the modern world possible.
	- The Advent of the Algorithm (pending), by David Berlinski