Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Some help, a suggestion, an explanation to the error, but not the full answer perhaps:</p> <p>Looking at the Brew recipe for OpenSSL @ <a href="https://github.com/mxcl/homebrew/blob/master/Library/Formula/openssl.rb" rel="nofollow">https://github.com/mxcl/homebrew/blob/master/Library/Formula/openssl.rb</a>, it seems pretty likely that the OpenSSL you built is 64bit only. When building extensions for Python, if you build against the OS default Python, it usually only works right when you build universal binaries (i386+x86_64)</p> <p>OSX provides OpenSSL by default in the 10.9 SDK which you can build against safely, but if you need a newer OpenSSL that can cause some issues. </p> <p>A couple tricks to debug this:</p> <ol> <li><p>Run 'file /Users/user/.python-eggs/M2Crypto-0.21.1-py2.7-macosx-10.9-intel.egg-tmp/M2Crypto/__m2crypto.so' to figure out how your library was built. I bet you it'll say x86_64 shared lib only, and not fat shared library (i386 + x86_64)</p></li> <li><p>Add your OpenSSL library to your shared lib preload list by export DYLD_INSERT_LIBRARIES=/usr/local/lib/$WHATEVER_LIBOPENSSLS_FILENAME_IS</p></li> </ol> <p>A couple other thoughts - the 'expected in flat namespace' issue is usually resolved by passing ld -flat_namespace when compiling. This should happen by default, if it isn't - thats kinda weird. That hasn't been a 'standard' problem with Python on OSX since 10.5 or 10.6. </p> <p>M2Crypto does not see a lot of activity, the last commit was in 2011. I'd personally switch to a different crypto lib depending on your needs. </p> <p>--- EDIT ---</p> <p>Try this, do a make distclean (or make clean, whichever)</p> <p>then try this:</p> <p>Just cut and paste this blob up to the end of 'make' - it's one command:</p> <pre><code>SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/" \ LDFLAGS="-isysroot ${SDK_DIR}" \ CPPFLAGS="-I${SDK_DIR}/usr/include -isysroot ${SDK_DIR}" \ CFLAGS="-I${SDK_DIR}/usr/include -isysroot ${SDK_DIR}" \ ./configure &amp;&amp; make </code></pre> <p>If that doesn't work, add the following flags to CFLAGS and LDFLAGS</p> <pre><code>-flat_namespace -undefined suppress </code></pre> <p>and try one more time? I'm pretty sure you're not supposed to use either one of those flags anymore, but for something as old as M2Crypto, it might need it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload