I'm looking to install the 2.6.6 Python as 32-bit with pyenv on OS X, but get:
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Despite having consulted Common Build Problems, and applying the flags suggested there, as well as installing Xcode developer tools, the problem persists. Here is the full command:
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include -arch i386 -I$(brew --prefix openssl)/include" LDFLAGS="-arch i386 -L$(brew --prefix openssl)/lib" CONFIGURE_OPTS="--with-arch=i386" pyenv install 2.6.6
... but this builds the 64-bit build, which is not what I need.
Oddly, the build works when just the following is tried:
CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install 2.6.6
What are we missing? Does the following from the log imply that I need an openssl which was built for i386 / 32-bit?
ld: warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib, file
was built for x86_64 which is not the architecture being linked (i386):
/usr/local/opt/openssl/lib/libcrypto.dylibld: warning:
ignoring file /usr/local/opt/openssl/lib/libssl.dylib, file was built for
x86_64 which is not the architecture being linked (i386):
/usr/local/opt/openssl/lib/libssl.dylib
darwin-i386-cc
when building. – Pasternpython
binary somewhere in your build directory. You just need to point pyenv to that. And yes, those instructions look good. – Pasternsudo ln -s /tmp/openssl-1.0.0a /usr/local/opt/openssl
then the build would pick up this 32-bit openssl, but it continues to warn about:warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib
so I guess something is amiss. – Ludly-L$(brew --prefix openssl)/lib"
with-L/tmp/openssl-1.0.0a/lib"
Make sure that path exists first (lib
may be in a deeper subdir). – Pastern-I$(brew --prefix openssl)/include
as well. – Pastern