[tahoe-dev] Errors building on Windows 7 64-bit

Kyle Markley kyle at arbyte.us
Fri Jul 9 01:22:15 UTC 2010


I managed to get Twisted to install and wanted to document the hassle, to
save the next guy the trouble.

Unable to compile (see original message below), I downloaded a Windows
binary of Twisted:
http://tmrc.mit.edu/mirror/twisted/Twisted/10.1/Twisted-10.1.0.winxp32-py2.6.exe

This binary failed to detect my Python installation.  A little web
searching educated me that it was looking in the registry under
HKEY_CURRENT_USER for the Python information... but my installation had
registered itself under HKEY_LOCAL_MACHINE.

I manually (sigh) copied the whole tree of registry information from
 \HKEY_LOCAL_MACHINE\SOFTWARE\Python\  into
 \HKEY_CURRENT_USER\SOFTWARE\Python\

Then the Twisted binary was able to install.  I think the simplejson
dependency also had some trouble with my compilation environment, but it
looked like it automatically fell back to a python implementation.  I'm not
sure; it all scrolled by pretty quickly.

I was then able to run "setup.py build".  I then tried "setup.py test" and
that didn't work -- it rebuilt some libraries and I eventually got a type
error.  Weird.  I then did a "setup.py install" thinking that this may let
me skip the weird rebuilding issues when trying to run tests, and I was
right.

(I am hugely unimpressed by the reliability of automatic dependency
handling and compilation.  I wonder if the sorts of problems I encounter
are pervasive in the python world, or whether there's something special
about tahoe's dependencies...)

One unit test failed!  allmydata.test.test_runner.TheRightCode.test_path

It looks like it was looking for a return code of 0 but it got an error of
'Cannot find Python executable C:\\Python26\\python.exe\r\n'.  I don't know
whether I care about this or not.  What component(s) of tahoe need to use
this?  I didn't want to put python into the system search path, but that
looks like the obvious way to get this test to pass.

I would really, really appreciate someone telling me if and how this
matters.  :)


On Thu, 08 Jul 2010 02:13:19 -0400, Kyle Markley <kyle at arbyte.us> wrote:
> I've recently been creating a heterogeneous tahoe grid on several
> different operating systems -- OpenBSD 64-bit, Windows XP 32-bit,
Windows
> Vista 32-bit, and Windows 7 64-bit.  The first three went relatively
> smoothly, although I've had to use the MinGW tips from the
> http://tahoe-lafs.org/trac/tahoe-lafs/wiki/AdvancedInstall page.
> 
> I'm not so lucky on Windows 7 64-bit.  There I'm getting the following
> error output (sorry about any ugly line-breaking):
> 
> Not found: tahoe-deps
> Not found: ../tahoe-deps
> conftest.c:1:21: rpc/rpc.h: No such file or directory
> conftest.c:1:23: sys/epoll.h: No such file or directory
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x5a):
> undefined reference to `_imp__PyArg_ParseTupleAndKeywords'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x82):
> undefined reference to `_imp__PyString_FromStringAndSize'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x9d):
> undefined reference to `_imp__PyString_FromStringAndSize'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0xb9):
> undefined reference to `_imp__PyString_AsString'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x1f1):
> undefined reference to `_imp___PyString_Resize'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x232):
> undefined reference to `_imp__Py_InitModule4'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x23b):
> undefined reference to `_imp__PyModule_GetDict'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x24a):
> undefined reference to `_imp__PyExc_Exception'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x25d):
> undefined reference to `_imp__PyErr_NewException'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x277):
> undefined reference to `_imp__PyDict_SetItemString'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x2d9):
> undefined reference to `_imp__PyErr_Occurred'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x2e3):
> undefined reference to `_imp__PyErr_Print'
>
build\temp.win-amd64-2.6\Release\twisted\protocols\_c_urlarg.o:_c_urlarg.c:(.text+0x2f0):
> undefined reference to `_imp__Py_FatalError'
> collect2: ld returned 1 exit status
> Traceback (most recent call last):
>   File "setup.py", line 379, in <module>
>     **setup_args
>   File "C:\Python26\lib\distutils\core.py", line 113, in setup
>     _setup_distribution = dist = klass(attrs)
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\dist.py",
> line 260, in __init__
>     self.fetch_build_eggs(attrs.pop('setup_requires'))
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\dist.py",
> line 284, in fetch_build_eggs
>     parse_requirements(requires), installer=self.fetch_build_egg
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\pkg_resources.py",
line
> 563, in resolve
>     dist = best[req.key] = env.best_match(req, self, installer)
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\pkg_resources.py",
line
> 799, in best_match
>     return self.obtain(req, installer) # try and download/install
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\pkg_resources.py",
line
> 811, in obtain
>     return installer(requirement)
>   File
> "C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\dist.py",
> line 327, in fetch_build_egg
>     return cmd.easy_install(req)
>   File
>
"C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\command\easy_install.py",
> line 452, in easy_install
>     return self.install_item(spec, dist.location, tmpdir, deps)
>   File
>
"C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\command\easy_install.py",
> line 482, in install_item
>     dists = self.install_eggs(spec, download, tmpdir)
>   File
>
"C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\command\easy_install.py",
> line 661, in install_eggs
>     return self.build_and_install(setup_script, setup_base)
>   File
>
"C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\command\easy_install.py",
> line 936, in build_and_install
>     self.run_setup(setup_script, setup_base, args)
>   File
>
"C:\allmydata-tahoe-1.7.0\setuptools-0.6c15dev.egg\setuptools\command\easy_install.py",
> line 927, in run_setup
>     raise DistutilsError("Setup script exited with %s" % (v.args[0],))
> distutils.errors.DistutilsError: Setup script exited with error: command
> 'gcc' failed with exit status 1
> 
> 
> I can't find any trace of this temporary directory it appears to have
been
> trying to build twisted in.  I really wish that when dependencies fail
to
> build, we would leave the build area alone, as it may contain things
> useful
> for debugging!
> 
> Does anyone know what's going on here?  When I googled for one of the
> failed references, I found some web pages encouraging people to use
mingw,
> but I'm already doing that.  (gcc --version says it's version "3.4.5
> (mingw-vista special r3)".)  The missing header files look like
> significant
> problems too, but I don't have enough context to know what they're
about.
> 
> I know there's a Win7-64 buildbot, so this should be working - somehow. 
> :)
> 
> My attempt to build was on a virgin Win7 machine that didn't even have
> python
> installed before I got started, so all the dependencies would definitely
> get
> built from scratch.  I was using the regular .zip file, not the -SUMO
one.

-- 
Kyle Markley


More information about the tahoe-dev mailing list