I’m trying to compile PyPy on cygwin, and the compilation stops when python tries to open the file “externmod”, which was just compiled with gcc. The problem with gcc on cygwin is that it automatically appends a ‘.exe’ to whatever you’re compiling, so even though gcc is called as gcc -shared -Wl,--enable-auto-image-base -pthread -o /tmp/usession-release-1.8/shared_cache/externmod, the output file ends up being externmod.exe regardless. So python tries to open /tmp/usession-release-1.8/shared_cache/externmod and can’t find it–thus the compilation stops. Anyone know how to solve this, short of recompiling gcc? I don’t want to do that.
I’m trying to compile PyPy on cygwin, and the compilation stops when python tries
Share
To answer your question, the easiest way to solve your problem is to modify init.py in pypy/translator/platform such that it points to an actual platform, instead of the ‘None’ that it’s getting right now. In linux.py, you’ll notice that there’s the line `so_ext = ‘so’ ‘, which is probably what fixes the extension issue.
Note that, although the little hack of pretending cygwin is linux will work in this exact instance, there’re a few road bumps later on that will get you (none that I can remember with sufficient detail to avert, unfortunately).
Edit: the relevant section of my init.py currently looks like