Heikki Toivonen wrote:
> John Nagle wrote:
> 
>>    Actually, at the moment I'm having an M2Crypto problem related
>>to a SWIG/OpenSSL conflict.  Older versions of OpenSSL have an
>>include file that needs __i386__ defined, which is something GCC
>>does based on what platform you're on.  SWIG uses CPP, but
>>doesn't set the platform defines, so the SWIG phase of the
>>M2Crypto build fails.  I'm currently trying to get the shared
>>host where that build took place upgraded to a later version of
>>OpenSSL, but that requires a server restart, so it may take
>>a few days.  I'm doing something that requires M2Crypto to
>>run on a range of machines, which turns out to be rather harder
>>than expected.
> 
> 
> Which version of OpenSSL is that?

M2Crypto 0.17 requirements:
        Python 2.3 or newer
           o m2urllib2 requires Python 2.4 or newer
        OpenSSL 0.9.7 or newer
           o Some optional new features will require OpenSSL 0.9.8 or newer
        SWIG 1.3.24 or newer

Server in use:
        Python version: "Python 2.5 (r25:51908, Jan 18 2007, 10:46:37)"
        OpenSSL version: "OpenSSL 0.9.7a Feb 19 2003"
        SWIG version: "SWIG Version 1.3.31"
        GCC version: "[GCC 3.4.4 20050721 (Red Hat 3.4.4-2)] on linux2"
        Computer: Athlon 686 rackmount server.

The actual build failure is:

running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
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

The problem is that "opensslconf.h" expects the compiler to define __i386__
when running the C preprocessor, and SWIG doesn't do that.  Compare
"opensslconf.h" in different versions of OpenSSL; it's changed considerably.

                                        John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to