WWW::Curl 通过 CPAN 安装失败并出现多个错误

WWW::Curl installation via CPAN fails with multiple errors

我尝试像 perl -MCPAN -e 'install WWW::Curl' 一样安装 WWW::Curl。 在 Curl.xs 构建期间,我收到以下错误:

cc -c -I/usr/local/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE" Curl.c In file included from Curl.xs:574:

./curlopt-constants.c:19:58: error:

non-void function 'constant' should return a value [-Wreturn-type] if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_DID_MEMORY_FUNC_TYPEDEFS;

./curlopt-constants.c:136:49: error: use of undeclared identifier

'CURL_STRICTER' if (strEQ(name, "STRICTER")) return CURL_STRICTER;

之后还有很多警告。

有什么我遗漏的吗?

我尝试在 FreeBSD 11.1

上使用 perl 5.24.3 构建 WWW::Curl

the module repository. It's not closed, but you might want to follow it since there might be a fix in the upcoming releases or in the repo itself. The fix might be

中似乎有一个未解决的问题
if ($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z|CURL_DID_MEMORY_FUNC_TYPEDEFS\z)/) {

第 140 行 Makefile.PL