[Python-Dev] hashlib bug when built on OS X 10.6 for 10.5

Ronald Oussoren ronaldoussoren at mac.com
Thu Oct 7 10:30:28 CEST 2010


On 6 Oct, 2010, at 22:26, Arnaud Bergeron wrote:

> If you build python (at least 2.6.5, but probably other versions as
> well) in a universal setup using the following command (or similar)
> while the machine currently has 10.6 installed:
> 
> ./configure --with-universal-archs=<doesn't matter>
> --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdk/
> 
> then the hashlib module will be unimportable with the following error:
> 
> ImportError: No module named _md5
> 
> This is because the openssl detection code in setup.py picks up the
> system libssl (in /) which is 0.9.8 and selects not to build the
> additional _sha256, and _sh512 modules.  Then, when the builds
> proceeds the SDK libssl is used (in /Developer/SDKs/MacOSX10.5.sdk/)
> which is version 0.9.7 and the openssl_sha256 and openssl_sha512 raise
> ValueError in the _hashlib that is built.

This definitely looks like a bug I fixed before, see <http://bugs.python.org/issue7724>. The patch should not be present in 2.7 and any of the active branches.

I can build hashlib just fine with the HEAD of the release26-maint branch, could you please test with 2.6.6?

BTW. In general it is better to file bugs at bugs.python.org instead of mailing them here, using the bugtracker ensures that your report doesn't get lost.

Ronald



More information about the Python-Dev mailing list