如何使用自定义OpenSSL编译Python 3.4?

 挠挠扣扣笑嘻嘻 发布于 2023-01-16 09:15

我在非标准位置安装了自己的OpenSSL(/my/path为了这个例子),我希望Python 3.4能够针对源代码编译它.我试过的是这个(目录缩写)

CPPFLAGS="-I/my/path/include -I/my/path/include/openssl" ./configure --prefix=/my/path/

我也试过C_INCLUDE_PATH和冒号分开的路径.

然后,我跑了make,得到这个:

building '_ssl' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -IInclude -I/my/path/include -I/my/path/include/openssl -I/usr/local/include -I/my/path/Python-3.4.0/Include -I/my/path/Python-3.4.0 -c /my/path/Python-3.4.0/Modules/_ssl.c -o build/temp.linux-x86_64-3.4/my/path/Python-3.4.0/Modules/_ssl.o
gcc -pthread -shared build/temp.linux-x86_64-3.4/my/path/Python-3.4.0/Modules/_ssl.o -L/my/path/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-3.4/_ssl.cpython-34m.so
*** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-x86_64-3.4/_ssl.cpython-34m.so: undefined symbol: SSL_get0_next_proto_negotiated

它正在寻找SSL_get0_next_proto_negotiated,但这肯定是定义的:

$ grep SSL_get0_next_proto_negotiated /my/path/include/openssl/*
/my/path/include/openssl/ssl.h:void SSL_get0_next_proto_negotiated(const SSL *s,

我不确定我做错了什么,有什么想法吗?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有