首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
安装编译curl时错误
### 除了这个模块其他的都可以安装成功,尝试过选择curl时使用--enable-openssl指向/usr/bin里面的openssl,仍然会报这个错 ### Swoole 4.6.6,PHP 7.3.26,centos 6.9 64位,libcurl-7.19.7-54.el6_10.x86_64 ### 相关代码 ```php #warning "libcurl was compiled with SSL support, but configure could not determine which" "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp] #warning "libcurl was compiled with SSL support, but configure could not determine which" \ ^~~~~~~ In file included from /usr/local/php/include/php/main/php_ini.h:22:0, from /usr/local/php/include/php/main/fopen_wrappers.h:24, from /usr/local/php/include/php/main/php.h:462, from /tmp/pear/temp/swoole/php_swoole.h:20, from /tmp/pear/temp/swoole/ext-src/php_swoole_private.h:25, from /tmp/pear/temp/swoole/ext-src/php_swoole_cxx.h:19, from /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:19: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc: In function ‘void _php_curl_set_default_options(php_curl*)’: /usr/local/php/include/php/Zend/zend_ini.h:143:73: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] #define INI_STR(name) zend_ini_string_ex((name), sizeof(name)-1, 0, NULL) ^ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:952:14: note: in expansion of macro ‘INI_STR’ cainfo = INI_STR("openssl.cafile"); ^~~~~~~ /usr/local/php/include/php/Zend/zend_ini.h:143:73: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] #define INI_STR(name) zend_ini_string_ex((name), sizeof(name)-1, 0, NULL) ^ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:954:18: note: in expansion of macro ‘INI_STR’ cainfo = INI_STR("curl.cainfo"); ^~~~~~~ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc: In function ‘void _php_curl_free(php_curl*)’: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2741:23: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ if (ch->handlers->fnmatch) { ^~~~~~~ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2742:38: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ zval_ptr_dtor(&ch->handlers->fnmatch->func_name); ^~~~~~~ In file included from /usr/local/php/include/php/Zend/zend.h:29:0, from /usr/local/php/include/php/main/php.h:33, from /tmp/pear/temp/swoole/php_swoole.h:20, from /tmp/pear/temp/swoole/ext-src/php_swoole_private.h:25, from /tmp/pear/temp/swoole/ext-src/php_swoole_cxx.h:19, from /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:19: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2743:29: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ efree(ch->handlers->fnmatch); ^ /usr/local/php/include/php/Zend/zend_alloc.h:161:34: note: in definition of macro ‘efree’ #define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) ^~~ make: *** [thirdparty/php/curl/interface.lo] Error 1 ERROR: `make' failed ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
发布于5年前 · 5 次浏览 · 来自
提问
滴滴123
### 除了这个模块其他的都可以安装成功,尝试过选择curl时使用--enable-openssl指向/usr/bin里面的openssl,仍然会报这个错 ### Swoole 4.6.6,PHP 7.3.26,centos 6.9 64位,libcurl-7.19.7-54.el6_10.x86_64 ### 相关代码 ```php #warning "libcurl was compiled with SSL support, but configure could not determine which" "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp] #warning "libcurl was compiled with SSL support, but configure could not determine which" \ ^~~~~~~ In file included from /usr/local/php/include/php/main/php_ini.h:22:0, from /usr/local/php/include/php/main/fopen_wrappers.h:24, from /usr/local/php/include/php/main/php.h:462, from /tmp/pear/temp/swoole/php_swoole.h:20, from /tmp/pear/temp/swoole/ext-src/php_swoole_private.h:25, from /tmp/pear/temp/swoole/ext-src/php_swoole_cxx.h:19, from /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:19: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc: In function ‘void _php_curl_set_default_options(php_curl*)’: /usr/local/php/include/php/Zend/zend_ini.h:143:73: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] #define INI_STR(name) zend_ini_string_ex((name), sizeof(name)-1, 0, NULL) ^ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:952:14: note: in expansion of macro ‘INI_STR’ cainfo = INI_STR("openssl.cafile"); ^~~~~~~ /usr/local/php/include/php/Zend/zend_ini.h:143:73: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] #define INI_STR(name) zend_ini_string_ex((name), sizeof(name)-1, 0, NULL) ^ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:954:18: note: in expansion of macro ‘INI_STR’ cainfo = INI_STR("curl.cainfo"); ^~~~~~~ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc: In function ‘void _php_curl_free(php_curl*)’: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2741:23: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ if (ch->handlers->fnmatch) { ^~~~~~~ /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2742:38: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ zval_ptr_dtor(&ch->handlers->fnmatch->func_name); ^~~~~~~ In file included from /usr/local/php/include/php/Zend/zend.h:29:0, from /usr/local/php/include/php/main/php.h:33, from /tmp/pear/temp/swoole/php_swoole.h:20, from /tmp/pear/temp/swoole/ext-src/php_swoole_private.h:25, from /tmp/pear/temp/swoole/ext-src/php_swoole_cxx.h:19, from /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:19: /tmp/pear/temp/swoole/thirdparty/php/curl/interface.cc:2743:29: error: ‘struct php_curl_handlers’ has no member named ‘fnmatch’ efree(ch->handlers->fnmatch); ^ /usr/local/php/include/php/Zend/zend_alloc.h:161:34: note: in definition of macro ‘efree’ #define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) ^~~ make: *** [thirdparty/php/curl/interface.lo] Error 1 ERROR: `make' failed ``` ### 你期待的结果是什么?实际看到的错误信息又是什么?
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2021-05-04
鲁飞
先加载openssl扩展,后加载curl扩展。
赞
1
回复
2021-05-05
滴滴123
回复
鲁飞
意思我要重新去编译这两个模块吗,但奇怪的事,军哥一键的PHP编译后的info指示界面curl模块却可以正常搞出SSL的功能呢?这两个curl是一样用底层的方法去实现的吗?
赞
0
回复
2021-05-07
鲁飞
php扩展的,你是直接编译到php的?
赞
0
回复
2021-05-07
滴滴123
回复
鲁飞
php自带了一个curl的扩展,因为用一键安装包也没清楚目前版本到底这个是默认配置的还是安装包给编译的,打开配置文件查看PHP的curl扩展似乎也是依赖libcurl这个包,如果PHP可以编译成功这个扩展,那么是不是可以通过配置什么方法可以可以直接编译成功swoole的curl?
赞
0
回复
2021-05-08
滴滴123
该问题已解决,原因是ceotos中默认的curl指向的是NSS而并非openssl,所以一直在提示,直接把curl编译升级后较高版本默认就是指向openssl。
赞
0
回复
2021-05-09
akss5768
编译时,可以使用--with-openssl-dir=/usr/local/Cellar/openssl@1.1/1.1.1k参数,指定openssl地址
赞
0
回复