I'm trying to do this right, without manual patching.
The error message I'm getting during build is:
python setup.py build
....
swig -python -I/usr/include -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
/usr/include/openssl/opensslconf.h:27: Error: CPP #error ""This openssl-devel
package does not work your architecture?"". Use the -cpperraswarn option to
continue swig processing.
error: command 'swig' failed with exit status 1
We went through this before, but last time, the versions of OpenSSL and
of SWIG on the system were old, and I was running on a shared server
and couldn't update it. Eventually, M2Crypto was hammered
into working, but it was ugly. It was necessary to patch "setup.py" as
follows:
107,108d106
< target_cpu_str = '-D__i386__' # PATCH - assume Intel target. OpenSSL build
needs this.
<
116c114< swig_opts = [swig_opts_str,target_cpu_str]
---
swig_opts = [swig_opts_str]The problem is that the include file in OpenSSL assumes that some
system ID, like __i386__, is defined, which GCC does, but SWIG
does not. It might be considered a bug in SWIG.
This time, everything on the dedicated server has been updated with Yum,
so it ought to just work.
Yum says:
>All of those are later than the ones required for M2Crypto, so the system
Installed Packages
openssl.i686 0.9.8a-5.4 installed
openssl-devel.i386 0.9.8a-5.4 installed
python.i386 2.4.3-9.FC5 installed
swig.i386 1.3.31-0.fc5 installed
Available Packages
openssl.i386 0.9.8a-5.4 updates
should be current.
>But it doesn't.
Also reported as a SWIG bug, as #1676049.
John Nagle