[tahoe-dev] [tahoe-lafs] #1093: win32 build hell
tahoe-lafs
trac at tahoe-lafs.org
Sun Jun 20 01:51:29 PDT 2010
#1093: win32 build hell
---------------------+------------------------------------------------------
Reporter: zeromus | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone: undecided
Component: unknown | Version: 1.7.0
Keywords: | Launchpad Bug:
---------------------+------------------------------------------------------
I am experiencing hell getting the win32 stuff to build. I should mention
that the building works OK by embedding into my python install. But I need
a zipfile with an EXE in it if I am going to get any buy-in from my
friends.
I am basically following instructions at http://tahoe-lafs.org/trac/tahoe-
lafs/wiki/AdvancedInstall, but modified in this as a last ditch effort. i
assure you the results are the same when i follow those steps as well by
running setup.py directly
Here's what I do:
install python-2.5.4.msi to C:\Python25\
install pywin32-214.win32-py2.5.exe
extract allmydata-tahoe-1.7.0-SUMO.zip to C:\tahoe-lafs
open a command prompt to c:\tahoe-lafs and setup mingw,python25
environment
ran mingw32-make.exe
{{{
error: Setup script exited with error: Don't know how to compile
cryptopp\x64dll.asm
}}}
it seems that distutils msvccompiler.py doesnt know how to compile a .asm
file which pycryptopp supplies as a source file to be compiled. it is easy
to make msvccompiler.py handle a .asm file. making this change allows me
to proceed..
[apparently this has already been covered at
http://bugs.python.org/issue8597]
build OK.
ran mingw32-make.exe windows-exe
build OK.
now run windows\dist\tahoe:
{{{
Traceback (most recent call last):
File "tahoe.py", line 1, in <module>
File "allmydata\__init__.pyc", line 27, in <module>
File "nevow\__init__.pyc", line 143, in <module>
File "nevow\__init__.pyc", line 29, in load
File "nevow\util.pyc", line 183, in _namedAnyWithBuiltinTranslation
File "twisted\python\reflect.pyc", line 464, in namedAny
File "twisted\python\reflect.pyc", line 400, in _importAndCheckStack
File "formless\webform.pyc", line 26, in <module>
File "pkg_resources.pyc", line 882, in resource_filename
File "pkg_resources.pyc", line 1344, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip
}}}
Around this time, I ought to mention I know diddly squat about python. So
I start trying to fix it anyway.
google says (from 5yrs ago) it isnt possible to run resource_filename()
from a zip and nevow needs be changed.
newest nevow says setuptools can handle it in a comment on that function
but yet the latest setuptools is what generates the error i pasted. it
makes no effort to handle resource_filenames() from a zip.
Now, I can attempt to bully my way through this problem by unzipping
library.zip to a directory called library.zip
Then I get this error:
{{{
Traceback (most recent call last):
File "tahoe.py", line 7, in <module>
File "allmydata\scripts\runner.pyc", line 6, in <module>
File "C:\tahoe-lafs\windows\dist\library.zip\pkg_resources.pyc", line
666, in
require
File "C:\tahoe-lafs\windows\dist\library.zip\pkg_resources.pyc", line
565, in
resolve
equivalent subpath. For an example namespace handler, see
pkg_resources.DistributionNotFound: twisted
}}}
This can be resolved by pasting a bunch of egg directories in the
windows\dist\library.zip directory. After I paste twisted, I will get:
pkg_resources.DistributionNotFound: zope.interface
pkg_resources.DistributionNotFound: setuptools
After those, I will get
pkg_resources.DistributionNotFound: allmydata-tahoe
This confuses me, because I don't even see my system looking for a file
that looks like allmydata-tahoe
At this point, all I can do is comment out
pkg_resources.require('allmydata-tahoe')
from runner.py
Then I will get
{{{
C:\tahoe-lafs\windows\dist\library.zip\allmydata\scripts\runner.py:6:
UserWarnin
g: Module twisted was already imported from C:\tahoe-
lafs\windows\dist\library.z
ip\twisted\__init__.pyc, but c:\tahoe-
lafs\windows\dist\library.zip\twisted-10.0
.0-py2.5-win32.egg is being added to sys.path
Traceback (most recent call last):
File "tahoe.py", line 9, in <module>
TypeError: 'module' object is not callable
}}}
Finally, I paste the contents of runner.py into tahoe.py (starting in
tahoe.py after _junk = depends)
And then I remove the run function and just replace it with
{{{
rc = runner(sys.argv[1:])
sys.exit(rc)
}}}
(just making it the main function or whatever you call it in python)
And FINALLY, tahoe.exe works. I can use create-client and configure it to
use the public test grid, and then when i use tahoe start...
Can't find twistd (it comes with Twisted). Aborting.
------------
flashback hours ago
------------
I installed the last public build of Allmydata win32 client. Can't test it
now. But look! It comes with tahoe.exe. create-client worked, and then
when i use tahoe start...
{{{
Can't find twistd (it comes with Twisted). Aborting.
}}}
So I guess I'll try to build my own.
-------------
Flash forward to present
--------------
And around that time I gave up.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1093>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list