[tahoe-dev] build failure on intel mac
Terrell Russell
terrellrussell at gmail.com
Tue Jan 22 16:00:18 PST 2008
As I don't want to pollute but one list with my bumblings - I send this
only to the tahoe list for now - please reply with pertinent bits to the
crypto++ list...
So - a three part email:
1) errors before I started clean
2) current status with clean new everything
3) process for getting to the clean everything
------------------------------------------------------------
part 1)
This is the output from trying to isolate the pycryptopp build issue...
I got stumped/frustrated - which led me to parts 2 and 3.
> 7. Instead of build all of Tahoe's dependencies, let's try building
> just pycryptopp this time: "easy_install -v -v -v misc/dependencies/
> pycryptopp* 2>&1 | tee build.log.txt". That should build pycryptopp
> and install it, verbosely, and make a copy of all output into
> "build.log.txt".
>
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ more build.log.txt
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/Current/bin/easy_install",
line 8, in <module>
load_entry_point('setuptools==0.6c7', 'console_scripts',
'easy_install')()
File "build/bdist.linux-i686/egg/pkg_resources.py", line 277, in
load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2179, in
load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1912, in load
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 21, in <module>
File "build/bdist.linux-i686/egg/setuptools/package_index.py", line
3, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py",
line 88, in <module>
import hashlib
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/hashlib.py",
line 133, in <module>
md5 = __get_builtin_constructor('md5')
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/hashlib.py",
line 60, in __get_builtin_construct
or
import _md5
ImportError: No module named _md5
------------------------------------------------------------
part 2)
After I got my clean setup working again (part 3), I document the seven
step program that zooko put me on.
>
> 1. Remove the libcryptopp and include/cryptopp files that you
> earlier installed.
>
done
> 2. Make sure there aren't any other libcryptopp.a files lying around
> anywhere, or any other "cryptopp" directories which include header
> files like "cryptlib.h", including any left by earlier attempts to
> build the macports port of Crypto++ v5.1.
done as far as i can see...
>
> 3. Run "make clean" in your Crypto++ v5.5.2 directory.
done
>
> 4. Run "make && ./cryptest.exe v && make install PREFIX=/usr/local"
> in your Crypto++ v5.5.2 directory.
done, but the "make install PREFIX=/usr/local" had to be
"sudo make install PREFIX=/usr/local"
>
> 5. Run "make clean" in your Tahoe directory.
done
>
> 6. Make sure that "python -c 'import pycryptopp'" gives an
> ImportError -- there shouldn't be any pycryptopp package anywhere on
> your system at this point. If it doesn't give an import error then
> figure out where it lives with "python -c 'import pycryptopp ; print
> pycryptopp'" and remove it and go back to step 6. :-)
>
done
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ python -c 'import
pycryptopp'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pycryptopp
> 7. Instead of build all of Tahoe's dependencies, let's try building
> just pycryptopp this time: "easy_install -v -v -v misc/dependencies/
> pycryptopp* 2>&1 | tee build.log.txt". That should build pycryptopp
> and install it, verbosely, and make a copy of all output into
> "build.log.txt".
>
I couldn't make easy_install happen with a clean install (only appears
after a make - so here is the pertinent bits of the end of "make test".
The included pieces of tahoe seemed to build until it got to
pycryptopp.
...snip...
Searching for pycryptopp>=0.2.9
Best match: pycryptopp 0.2.10
Processing pycryptopp-0.2.10.tar
Running pycryptopp-0.2.10/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-SBYsXm/pycryptopp-0.2.10/egg-dist-tmp-a6Zet2
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
C/ObjC but not for C++
pycryptopp/publickey/rsamodule.cpp: In function 'PyObject*
VerifyingKey_verify(VerifyingKey*, PyObject*, PyObject*)':
pycryptopp/publickey/rsamodule.cpp:70: warning: format '%d' expects type
'int', but argument 3 has type 'size_t'
pycryptopp/publickey/rsamodule.cpp:70: warning: format '%d' expects type
'int', but argument 4 has type 'size_t'
/usr/bin/ld: table of contents for archive: /usr/local/lib/libcryptopp.a
is out of date; rerun ranlib(1) (can't load from it)
collect2: ld returned 1 exit status
error: Setup script exited with error: command '/usr/bin/g++-4.0' failed
with exit status 1
make[1]: *** [build] Error 1
make: *** [.built] Error 2
but i just built it...
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ ls -al
/usr/local/lib/libcryptopp.a
-rw-r--r-- 1 root wheel 30770732 Jan 22 17:33
/usr/local/lib/libcryptopp.a
a slightly different error - zfec seems to not be happy (and this is
after pulling the recent patch for zfec-1.1)
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ python setup.py
darcsver
running darcsver
setup.py darscver: wrote '0.7.0-126' into src/allmydata/_version.py
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ make check-deps
python -c 'import twisted, zope.interface' || make signal-error-twisted-dep
python -c 'import OpenSSL' || make signal-error-pyopenssl-dep
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ make check-all-deps
python -c 'import twisted, zope.interface' || make signal-error-twisted-dep
python -c 'import OpenSSL' || make signal-error-pyopenssl-dep
PYTHONPATH="/Users/trel/Desktop/tahoestuff/tahoefromdarcs/src::/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.18-py2.5.egg:/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/setuptools-0.6c7.egg:/Users/trel/Desktop/tahoestuff/tahoefromdarcs/darcsver-1.0.1-py2.5.egg:/Users/trel/Desktop/tahoestuff/tahoefromdarcs/setuptools_darcs-1.1.7-py2.5.egg"
\
python -c 'import _auto_deps ; _auto_deps.require_auto_deps()' || make
signal-error-deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/_auto_deps.py",
line 18, in require_auto_deps
pkg_resources.require(requirement)
File
"/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/setuptools-0.6c7.egg/pkg_resources.py",
line 626, in require
needed = self.resolve(parse_requirements(requirements))
File
"/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/setuptools-0.6c7.egg/pkg_resources.py",
line 524, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: zfec>=1.1.0
ERROR: Not all of Tahoe's dependencies are in place. Please see
docs/install.html for help on installing dependencies.
exit 1
make[1]: *** [signal-error-deps] Error 1
make: *** [check-auto-deps] Error 2
> 8. Now "import pycryptopp" should work
>
and unsurprisingly...
trelpancake:~/Desktop/tahoestuff/tahoefromdarcs trel$ python -c 'import
pycryptopp'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pycryptopp
------------------------------------------------------------
part 3)
Here's my clean new system log...
intel mac 10.4.11
jan 22, 2008
numbered list from
http://allmydata.org/source/tahoe/trunk/docs/install.html
I tried to get as much installed via macports as possible - to reduce
the number of moving parts...
1. g++ >= v3.3 -- the Cygwin version of gcc/g++ works for Cygwin and for
Windows
trelpancake:~ trel$ which g++
/usr/bin/g++
trelpancake:~ trel$ g++ --version
i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5250)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2. GNU make
trelpancake:~ trel$ which make
/usr/bin/make
trelpancake:~ trel$ ls -al /usr/bin/make
lrwxr-xr-x 1 root wheel 7 Jan 22 16:14 /usr/bin/make@ -> gnumake
trelpancake:~ trel$ which gnumake
/usr/bin/gnumake
trelpancake:~ trel$ gnumake -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
3. Python >= v2.4.2 including development headers i.e. "Python.h"
via macports - python25
and a symlink
trelpancake:~ trel$ which python
/usr/bin/python
trelpancake:~ trel$ ls -al /usr/bin/python
lrwxr-xr-x 1 root wheel 24 Jan 22 17:15 /usr/bin/python@ ->
/opt/local/bin/python2.5
trelpancake:~ trel$ python -V
Python 2.5.1
4. Twisted >= v2.4.0 -- from the Twisted "sumo" source tarball
via macports - py25-twisted
trelpancake:~ trel$ which twistd
/opt/local/bin/twistd
trelpancake:~ trel$ twistd --version
twistd (the Twisted daemon) 2.5.0
Copyright (c) 2001-2006 Twisted Matrix Laboratories.
See LICENSE for details.
5. OpenSSL >= v0.9.7, including development headers
via macports - openssl
trelpancake:~ trel$ which openssl
/opt/local/bin/openssl
trelpancake:~ trel$ openssl version
OpenSSL 0.9.8g 19 Oct 2007
6. PyOpenSSL == v0.6
macports - py-openssl
trelpancake:~ trel$ port installed | grep py-openssl
py-openssl @0.6_2 (active)
7. Crypto++ >= v5.2.1, including development headers
macports version (libcryptopp) is old (5.1)
so this is from source
installed into PREFIX=/usr/local and "cryptest.exe v" reports success
trelpancake:~/Desktop/tahoestuff/crypto552 trel$ head -2 Readme.txt
Crypto++: a C++ Class Library of Cryptographic Schemes
Version 5.5.2 (9/24/2007)
darcs itself is a binary from
http://wiki.darcs.net/DarcsWiki/CategoryBinaries
trelpancake:~ trel$ which darcs
/usr/local/bin/darcs
trelpancake:~ trel$ darcs -v
1.0.9rc2 (unknown)
More information about the tahoe-dev
mailing list