我正在尝试为草莓perl构建/安装WWW :: Curl模块。
我必须根据http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32
中的说明在Makefile.PL中进行一些调整并在此处:Installing WWW::Curl on WIndows 7, running into "List form of pipe open not implemented"
当我执行 perl Makefile.PL 时,在命令提示符下,我收到以下消息:
Found curl.h in d:\curldev\include\curl\curl.h
Building curlopt-constants.c for your libcurl version
Building Easy.pm constants for your libcurl version
Building Share.pm constants for your libcurl version
Warning (mostly harmless): No library found for -lcurl
Warning (mostly harmless): No library found for -lcurldll
Writing Makefile for WWW::Curl
Writing MYMETA.yml and MYMETA.json
之后,当我运行 dmake 时,我收到以下错误消息:
D:\perl\cpan\build\WWW-Curl>dmake
Skip blib\lib\WWW\Curl\Share.pm (unchanged)
Skip blib\lib\WWW\Curl\Form.pm (unchanged)
Skip blib\lib\WWW\Curl.pm (unchanged)
Skip blib\lib\WWW\Curl\Easy.pm (unchanged)
Skip blib\lib\WWW\Curl\Multi.pm (unchanged)
gcc -c -Id:\curldev\include -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IM
PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2
-DVERSION=\"4.15\" -DXS_VERSION=\"4.15\" "-ID:\perl\perl\lib\CORE" Curl.
c
Curl.xs: In function 'XS_WWW__Curl__Easy_init':
D:\perl\perl\lib\CORE/XSUB.h:526:20: error: 'PerlSIO_fread' undeclared (first us e in this function)
D:\perl\perl\lib\CORE/XSUB.h:526:20: note: each undeclared identifier is reported only once for each function it appears in
Curl.xs:620: confused by earlier errors, bailing out
dmake: Error code 129, while making 'Curl.o'
问题是:导致此错误的原因是什么? 可能是它在运行Makefile.PL之后与消息中的警告行有关,但不确定。
提前致谢。
答案 0 :(得分:0)
这可能听起来很疯狂但是,我能够通过在相应文件中注释掉未声明的变量来克服这个问题。它还抱怨PerlISO_fwrite或类似的东西。你也必须发表评论
答案 1 :(得分:0)
https://rt.cpan.org/Public/Bug/Display.html?ShowHeaders=1;id=62609
将此添加到curl.xs文件可修复它:
#include "XSUB.h"
/* add new code here */
#ifdef fread
#undef fread
#endif
#ifdef fwrite
#undef fwrite
#endif
/* end new code */
#include <curl/curl.h>