I decided to try running buildbot on Wine today. The installation procedure is roughly wine msiexec /i python-2.6.2.msi /qb wine Twisted_NoDocs-8.2.0.win32-py2.6.exe
The last bit complains Traceback (most recent call last): File "C:\Python26\scripts\twisted_postinstall.py", line 11, in <module> from twisted.scripts import tkunzip File "C:\Python26\lib\site-packages\twisted\scripts\tkunzip.py", line 26, in <module> from twisted.internet import reactor, defer File "C:\Python26\lib\site-packages\twisted\internet\reactor.py", line 37, in <module> from twisted.internet import selectreactor File "C:\Python26\lib\site-packages\twisted\internet\selectreactor.py", line 21, in <module> from twisted.internet import posixbase File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 25, in <module> from twisted.internet import tcp, udp File "C:\Python26\lib\site-packages\twisted\internet\tcp.py", line 78, in <module> from twisted.internet import defer, base, address File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 17, in <module> from twisted.python import log, failure, lockfile File "C:\Python26\lib\site-packages\twisted\python\lockfile.py", line 28, in <module> from win32api import OpenProcess ImportError: No module named win32api and hangs, possibly because of http://twistedmatrix.com/trac/ticket/3707 so I tried doing wine pywin32-212.win32-py2.6.exe first. This fails immediately as described in http://bugs.winehq.org/show_bug.cgi?id=13844 It seems to terminate because it tries to get a handle to the loaded copy of mscoree.dll and fails (because there isn't one).
The installer seems to have been created by python's distutils.
Mark Hammond seems to be well aware of low level issues that affect the installer, see e.g. http://bugs.python.org/issue5075 so perhaps he could explain why the installer expects mscoree.dll to be resident...
so I tried doing wine pywin32-212.win32-py2.6.exe first. This fails immediately as described in http://bugs.winehq.org/show_bug.cgi?id=13844 It seems to terminate because it tries to get a handle to the loaded copy of mscoree.dll and fails (because there isn't one).
The installer seems to have been created by python's distutils.
Mark Hammond seems to be well aware of low level issues that affect the installer, see e.g. http://bugs.python.org/issue5075 so perhaps he could explain why the installer expects mscoree.dll to be resident...
This is explained here: http://bugs.winehq.org/show_bug.cgi?id=6880#c7 (I guess it's the same issue)
Copy and paste:
--- snip --- I've seen quite some applications that fail in the end like this one: 0009:Call kernel32.GetModuleHandleA(011bf1d4 "mscoree.dll") ret=00c5936f 0009:Ret kernel32.GetModuleHandleA() retval=00000000 ret=00c5936f Then ExitProcess. --- snip ---
This has nothing to do with this bug. The application uses dynamic msvc 7.1 runtime, which implicitly pulls mscoree.dll in.
Normally mscrt __crtExitProcess() calls just ExitProcess() but on newer versions a call to __crtCorExitProcess() is made to ensure proper shutdown of managed parts (even if you don't use managed = .NET code).
CorExitProcess() basically does this:
--- snip --- hModule = GetModuleHandle("mscoree.dll"); if (hModule != NULL) { pfn = (PFN_EXIT_PROCESS) GetProcAddress( hModule, "CorExitProcess"); if (pfn != NULL) pfn(status); } --- snip ---
If mscoree module or the export is not found it causes no harm. It works as designed.
The reason for this additional (implicit) shutdown code is you have no control whether a part of operation system or application dll (3rd party/injected) might pull in managed stuff thats why this code exists.
Regards
Thanks for the tip about the mscoree access being unimportant. It turns out the pywin32 installer works fine with win2K set, but that doesn't help Twisted_NoDocs-8.2.0.win32-py2.6.exe, which still fails to find win32api. However, if I install ActiveState's python instead of the one from python.org, twisted installs successfully.
Now on with the buildbot experiment :-)