Building M2Crypto , for stackless Python 2.6, on a Fedora 13 :

Building M2Crypto for stackless python 2.6 on a Fedora 13 is not straightforward, you may hit several errors when building.

Fedora's openssl implementation is not standard, and simply doing

  <path-to-stackless-python>python2.6 build 

does not work, you would hit : "This openssl-devel package does not work your architecture?" and gcc would fail.

M2Crypto authors give a script for fedora installation, but unfortunately it doesn't work either, due to changes in openssl include files...

The solution is to only use part of the install script : SWIG_FEATURES=-cpperraswarn

You will need the latest M2Crypto svn ( >= 721 ), older revisions trigger build errors.

Then you will need to build your own openssl from source, so that you have the ecdh.h and ecdsa.h headers ( Fedora doesn't include these, due to possible patent issues . See : and )

Here comes a working receipe for Fedora 13 users, as of 01/11/2010 :

Lets first build openssl from latest source

Choose where you want to install openssl, we will name it <path-to-custom-ssl>

cd <path-to-custom-ssl>


md5sum openssl-1.0.0c.tar.gz

tar xzf openssl-1.0.0c.tar.gz

cd openssl-1.0.0c

./config --prefix=<path-to-custom-ssl>openssl  --openssldir=<path-to-custom-ssl>openssl


make test

make install

Now to install M2Crypto

cd <where you want to install M2Crypto>

svn co m2crypto

cd m2crypto

SWIG_FEATURES=-cpperraswarn <path-to-stackless-python>python2.6 build_ext --openssl=<path-to-custom-ssl>openssl --library-dirs=<path-to-custom-ssl>openssl/lib --include-dirs=<path-to-custom-ssl>openssl/include/openssl build

sudo SWIG_FEATURES=-cpperraswarn <path-to-stackless-python>python2.6 build_ext --openssl=<path-to-custom-ssl>openssl --library-dirs=<path-to-custom-ssl>openssl/lib --include-dirs=<path-to-custom-ssl>openssl/include/openssl install

Netsukuku/eng/Fedora (last edited 2011-01-12 11:49:35 by anonymous)