Issue
I'm trying to install the WWW::Curl module for strawberry perl.All versions of the modules are the latest. All instructions from here href="https://stackoverflow.com/questions/16597227/error-when-building-wwwcurl-module-v4-15-in-strawberry-perl-v5-16-3">there is a person with a similar problem were followed by me.
When I run Makefile.PL, at the command prompt, I get this messages:
C:\WWW-Curl-4.17>Makefile.PL
The version is
Found curl.h in c:/curl/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
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lcurl
Warning (mostly harmless): No library found for -lcurldll
Generating a gmake-style Makefile
Writing Makefile for WWW::Curl
Writing MYMETA.yml and MYMETA.json
After, when I run gmake I get this errors:
C:\WWW-Curl-4.17>gmake
cp lib/WWW/Curl/Easy.pm blib\lib\WWW\Curl\Easy.pm
cp lib/WWW/Curl/Multi.pm blib\lib\WWW\Curl\Multi.pm
cp lib/WWW/Curl.pm blib\lib\WWW\Curl.pm
cp lib/WWW/Curl/Share.pm blib\lib\WWW\Curl\Share.pm
cp lib/WWW/Curl/Form.pm blib\lib\WWW\Curl\Form.pm
Running Mkbootstrap for Curl ()
"C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command -e chmod -- 644 "Curl.bs"
"C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command::MM -e cp_nonempty -- Curl.bs blib\arch\auto\WWW\Curl\Curl.bs 644
"C:\Strawberry\perl\bin\perl.exe" "-Iinc" "C:\Strawberry\perl\site\lib\ExtUtils/xsubpp" -typemap C:\Strawberry\perl\lib\ExtUtils\typemap -typemap C:\WWW-Curl-4.17\typemap Curl.xs > Curl.xsc
"C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command -e mv -- Curl.xsc Curl.c
gcc -c -Ic:/curl/include -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" "-IC:\Strawberry\perl\lib\CORE" Curl.c
Curl.xs:76:12: error: expected '{' before 'void'
struct void *curlm;
^~~~
Curl.xs:76:12: error: two or more data types in declaration specifiers
In file included from Curl.xs:14:
Curl.xs: In function 'perl_curl_multi_new':
C:\Strawberry\perl\lib\CORE/handy.h:2479:25: warning: division by zero [-Wdiv-by-zero]
MEM_SIZE_MAX/sizeof(t)) > MEM_SIZE_MAX/sizeof(t))
^
C:\Strawberry\perl\lib\CORE/perl.h:3650:62: note: in definition of macro 'EXPECT'
# define EXPECT(expr,val) __builtin_expect(expr,val)
^~~~
C:\Strawberry\perl\lib\CORE/perl.h:3671:52: note: in expansion of macro 'cBOOL'
#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE)
^~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2482:9: note: in expansion of macro 'UNLIKELY'
(void)(UNLIKELY(_MEM_WRAP_WILL_WRAP(n,t)) \
^~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2482:18: note: in expansion of macro '_MEM_WRAP_WILL_WRAP'
(void)(UNLIKELY(_MEM_WRAP_WILL_WRAP(n,t)) \
^~~~~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2494:30: note: in expansion of macro 'MEM_WRAP_CHECK'
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
^~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2577:28: note: in expansion of macro 'MEM_WRAP_CHECK_'
#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
^~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2583:23: note: in expansion of macro 'Newxz'
#define Newz(x,v,n,t) Newxz(v,n,t)
^~~~~
Curl.xs:236:5: note: in expansion of macro 'Newz'
Newz(1, self, 1, perl_curl_multi);
^~~~
C:\Strawberry\perl\lib\CORE/handy.h:2479:51: warning: division by zero [-Wdiv-by-zero]
MEM_SIZE_MAX/sizeof(t)) > MEM_SIZE_MAX/sizeof(t))
^
C:\Strawberry\perl\lib\CORE/perl.h:3650:62: note: in definition of macro 'EXPECT'
# define EXPECT(expr,val) __builtin_expect(expr,val)
^~~~
C:\Strawberry\perl\lib\CORE/perl.h:3671:52: note: in expansion of macro 'cBOOL'
#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE)
^~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2482:9: note: in expansion of macro 'UNLIKELY'
(void)(UNLIKELY(_MEM_WRAP_WILL_WRAP(n,t)) \
^~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2482:18: note: in expansion of macro '_MEM_WRAP_WILL_WRAP'
(void)(UNLIKELY(_MEM_WRAP_WILL_WRAP(n,t)) \
^~~~~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2494:30: note: in expansion of macro 'MEM_WRAP_CHECK'
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
^~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2577:28: note: in expansion of macro 'MEM_WRAP_CHECK_'
#define Newxz(v,n,t) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
^~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/handy.h:2583:23: note: in expansion of macro 'Newxz'
#define Newz(x,v,n,t) Newxz(v,n,t)
^~~~~
Curl.xs:236:5: note: in expansion of macro 'Newz'
Newz(1, self, 1, perl_curl_multi);
^~~~
In file included from Curl.xs:574:
curlopt-constants.c: In function 'constant':
curlopt-constants.c:19:51: error: 'CURL_DEPRECATED' undeclared (first use in this function); did you mean 'CURLOPT_PRIVATE'?
if (strEQ(name, "DEPRECATED")) return CURL_DEPRECATED;
^~~~~~~~~~~~~~~
CURLOPT_PRIVATE
curlopt-constants.c:19:51: note: each undeclared identifier is reported only once for each function it appears in
curlopt-constants.c:20:58: warning: 'return' with no value, in function returning non-void
if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_DID_MEMORY_FUNC_TYPEDEFS;
^~~~~~
curlopt-constants.c:2:1: note: declared here
constant(const char *name)
^~~~~~~~
curlopt-constants.c:67:59: error: 'CURL_IGNORE_DEPRECATION' undeclared (first use in this function); did you mean 'CURLINFO_REDIRECT_TIME'?
if (strEQ(name, "IGNORE_DEPRECATION")) return CURL_IGNORE_DEPRECATION;
^~~~~~~~~~~~~~~~~~~~~~~
CURLINFO_REDIRECT_TIME
curlopt-constants.c:129:51: warning: overflow in conversion from 'long long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow]
if (strEQ(name, "SOCKET_BAD")) return CURL_SOCKET_BAD;
^~~~~~~~~~~~~~~
curlopt-constants.c:147:49: error: 'CURL_STRICTER' undeclared (first use in this function); did you mean 'CURLH_TRAILER'?
if (strEQ(name, "STRICTER")) return CURL_STRICTER;
^~~~~~~~~~~~~
CURLH_TRAILER
curlopt-constants.c:196:39: warning: 'return' with no value, in function returning non-void
if (strEQ(name, "WIN32")) return CURL_WIN32;
^~~~~~
curlopt-constants.c:2:1: note: declared here
constant(const char *name)
^~~~~~~~
In file included from Curl.xs:17:
c:/curl/include/curl/curl.h:2366:30: warning: overflow in conversion from 'long long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow]
#define CURL_ZERO_TERMINATED ((size_t) -1)
^
curlopt-constants.c:203:56: note: in expansion of macro 'CURL_ZERO_TERMINATED'
if (strEQ(name, "ZERO_TERMINATED")) return CURL_ZERO_TERMINATED;
^~~~~~~~~~~~~~~~~~~~
In file included from Curl.xs:574:
curlopt-constants.c:2005:40: warning: 'return' with no value, in function returning non-void
if (strEQ(name, "CURL_H")) return CURLINC_CURL_H;
^~~~~~
curlopt-constants.c:2:1: note: declared here
constant(const char *name)
^~~~~~~~
curlopt-constants.c:2814:48: error: 'CURLOPT' undeclared (first use in this function); did you mean 'CURLSH'?
if (strEQ(name, "CURLOPT")) return CURLOPT;
^~~~~~~
CURLSH
curlopt-constants.c:2815:58: error: 'CURLOPTDEPRECATED' undeclared (first use in this function); did you mean 'CURLOPT_PRIVATE'?
if (strEQ(name, "CURLOPTDEPRECATED")) return CURLOPTDEPRECATED;
^~~~~~~~~~~~~~~~~
CURLOPT_PRIVATE
In file included from Curl.xs:17:
Curl.xs: In function 'XS_WWW__Curl__Easy_init':
C:\Strawberry\perl\lib\CORE/XSUB.h:578:20: error: 'PerlSIO_fread' undeclared (first use in this function); did you mean 'PerlIO_read'?
# define fread PerlSIO_fread
^~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:47: note: in expansion of macro 'fread'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~
c:/curl/include/curl/typecheck-gcc.h:560:4: note: in expansion of macro 'curlcheck_read_cb'
(curlcheck_read_cb(expr) || \
^~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:627:9: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(self->curl, CURLOPT_WRITEFUNCTION, write_callback_func);
^~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/XSUB.h:579:21: error: 'PerlSIO_fwrite' undeclared (first use in this function); did you mean 'PerlIO_write'?
# define fwrite PerlSIO_fwrite
^~~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:47: note: in expansion of macro 'fwrite'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:627:9: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(self->curl, CURLOPT_WRITEFUNCTION, write_callback_func);
^~~~~~~~~~~~~~~~
Curl.xs: In function 'XS_WWW__Curl__Easy_duphandle':
C:\Strawberry\perl\lib\CORE/XSUB.h:578:20: error: 'PerlSIO_fread' undeclared (first use in this function); did you mean 'PerlIO_read'?
# define fread PerlSIO_fread
^~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:47: note: in expansion of macro 'fread'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~
c:/curl/include/curl/typecheck-gcc.h:560:4: note: in expansion of macro 'curlcheck_read_cb'
(curlcheck_read_cb(expr) || \
^~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:658:9: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(clone->curl, CURLOPT_WRITEFUNCTION, write_callback_func);
^~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/XSUB.h:579:21: error: 'PerlSIO_fwrite' undeclared (first use in this function); did you mean 'PerlIO_write'?
# define fwrite PerlSIO_fwrite
^~~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:47: note: in expansion of macro 'fwrite'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:658:9: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(clone->curl, CURLOPT_WRITEFUNCTION, write_callback_func);
^~~~~~~~~~~~~~~~
Curl.xs: In function 'XS_WWW__Curl__Easy_setopt':
C:\Strawberry\perl\lib\CORE/XSUB.h:578:20: error: 'PerlSIO_fread' undeclared (first use in this function); did you mean 'PerlIO_read'?
# define fread PerlSIO_fread
^~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:47: note: in expansion of macro 'fread'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~
c:/curl/include/curl/typecheck-gcc.h:560:4: note: in expansion of macro 'curlcheck_read_cb'
(curlcheck_read_cb(expr) || \
^~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:717:3: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(self->curl, CURLOPT_HEADERFUNCTION, SvOK(value) ? header_callback_func : NULL);
^~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/XSUB.h:579:21: error: 'PerlSIO_fwrite' undeclared (first use in this function); did you mean 'PerlIO_write'?
# define fwrite PerlSIO_fwrite
^~~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:47: note: in expansion of macro 'fwrite'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:717:3: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(self->curl, CURLOPT_HEADERFUNCTION, SvOK(value) ? header_callback_func : NULL);
^~~~~~~~~~~~~~~~
Curl.xs: In function 'XS_WWW__Curl__Multi_info_read':
Curl.xs:1091:45: error: 'perl_curl_multi' {aka 'struct <anonymous>'} has no member named 'curlm'
while ((msg = curl_multi_info_read(self->curlm, &queue))) {
^~
In file included from Curl.xs:17:
C:\Strawberry\perl\lib\CORE/XSUB.h:578:20: error: 'PerlSIO_fread' undeclared (first use in this function); did you mean 'PerlIO_read'?
# define fread PerlSIO_fread
^~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:543:47: note: in expansion of macro 'fread'
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
^~~~~
c:/curl/include/curl/typecheck-gcc.h:560:4: note: in expansion of macro 'curlcheck_read_cb'
(curlcheck_read_cb(expr) || \
^~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:1100:3: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL);
^~~~~~~~~~~~~~~~
C:\Strawberry\perl\lib\CORE/XSUB.h:579:21: error: 'PerlSIO_fwrite' undeclared (first use in this function); did you mean 'PerlIO_write'?
# define fwrite PerlSIO_fwrite
^~~~~~~~~~~~~~
c:/curl/include/curl/curl.h:50:49: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
#define CURL_IGNORE_DEPRECATION(statements) statements
^~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:4: note: in expansion of macro 'curlcheck_cb_compatible'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~~~~~~~~~~~~~~~~~~
c:/curl/include/curl/typecheck-gcc.h:561:47: note: in expansion of macro 'fwrite'
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
^~~~~~
c:/curl/include/curl/typecheck-gcc.h:58:17: note: in expansion of macro 'curlcheck_write_cb'
if(!curlcheck_write_cb(value)) \
^~~~~~~~~~~~~~~~~~
Curl.xs:1100:3: note: in expansion of macro 'curl_easy_setopt'
curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL);
^~~~~~~~~~~~~~~~
Curl.xs:1101:32: error: 'perl_curl_multi' {aka 'struct <anonymous>'} has no member named 'curlm'
curl_multi_remove_handle(self->curlm, easy);
^~
Curl.xs: In function 'XS_WWW__Curl__Multi_fdset':
Curl.xs:1128:30: error: 'perl_curl_multi' {aka 'struct <anonymous>'} has no member named 'curlm'
curl_multi_fdset(self->curlm, &fdread, &fdwrite, &fdexcep, &maxfd);
^~
gmake: *** [Makefile:348: Curl.o] Error 1
My questions is: what is causing this errors? Could there be errors because the compiler did not find the library or is the problem something else?
In advance, many thanks to all who responded to help.
Solution
Known bug. There's a patch in the ticket. Or you could use Net::Curl instead
Answered By - ikegami Answer Checked By - David Marino (WPSolving Volunteer)