I would add a run path to your LDFLAGS, this way you can be sure it
picks up the correct OpenSSL library if your library search paths are
not set to the right value by crle or things like LD_LIBRARY_PATH.

You can do that by adding -R/path/to/lib to LDFLAGS.

Erik

On Tue, Oct 20, 2015 at 5:40 PM, Jesus Cea <j...@jcea.es> wrote:
> My stock OpenSSL library is ancient so I installed an alternative
> current OpenSSL release under "/usr/local/ssl". In order to compile
> "cryptography" in this machine I must do:
>
> $ LDFLAGS="-L/usr/local/ssl/lib" \
>   CFLAGS="-I/usr/local/ssl/include" \
>   python -m pip install -U cryptography
>
> This is a Solaris machine, but I guess the same can be done in Linux,
> and other unix-like OSs.
>
> Please, add something about this in
> <https://cryptography.io/en/latest/installation/>.
>
> Thanks for "cryptography". It is an amazing product.
>
> PS: How can I know what OpenSSL version is using "cryptography", beside
> checking the loaded shared objects by hand? :):
>
> """
> $ python3
> Python 3.5.0 (dtrace-issue13405_3.5:a7da156226da, Sep 13 2015, 18:22:50)
> [GCC 5.2.0] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import cryptography
>>>> from cryptography.hazmat.bindings.openssl.binding import Binding
>>>> import os
>>>> os.getpid()
> 22075
> ...
> [In another terminal]
> $ # pmap 22075 | grep -i ssl
> FDF00000    1536K r-x--  /usr/local/ssl/lib/libcrypto.so.1.0.0
> FE08F000      92K rwx--  /usr/local/ssl/lib/libcrypto.so.1.0.0
> FE0A6000       8K rwx--  /usr/local/ssl/lib/libcrypto.so.1.0.0
> FE0B0000     376K r-x--  /usr/local/ssl/lib/libssl.so.1.0.0
> FE11D000      28K rwx--  /usr/local/ssl/lib/libssl.so.1.0.0
> FE130000     552K r-x--
> /usr/local/lib/python3.5/site-packages/cryptography/hazmat/bindings/_openssl.so
> FE1C9000      60K rwx--
> /usr/local/lib/python3.5/site-packages/cryptography/hazmat/bindings/_openssl.so
> """
>
> --
> Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
> j...@jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
> Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
> jabber / xmpp:j...@jabber.org  _/_/  _/_/    _/_/          _/_/  _/_/
> "Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
> "My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
>
>
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev@python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev
>
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to