How do I compile Python 3.4 with custom OpenSSL?

后端 未结 3 675
悲&欢浪女
悲&欢浪女 2020-11-29 01:59

I have my own OpenSSL installation in a non-standard location (/my/path for the sake of this example) and I want Python 3.4 to build against that when I compile

3条回答
  •  無奈伤痛
    2020-11-29 02:21

    I managed to figure it out after a lot of hair-pulling. It was a bunch of environment variables... I think I might have done a little overkill, but this basically worked:

    # OpenSSL 1.0.1g
    ./config shared --prefix=/my/path --openssldir=/my/path/openssl
    make
    make install
    
    # Python 3.4
    export LDFLAGS="-L/my/path/lib/ -L/my/path/lib64/"
    export LD_LIBRARY_PATH="/my/path/lib/:/my/path/lib64/"
    export CPPFLAGS="-I/my/path/include -I/my/path/include/openssl"
    ./configure --prefix=/my/path/
    make
    make install
    

提交回复
热议问题