2

I am trying to install WWW::Curl::Easy on my Fedora 26 machine

gcc -c  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib64/perl5/CORE"   Curl.c
Curl.xs: In function ‘fwrite_wrapper2’:
Curl.xs:363:13: warning: unused variable ‘sv’ [-Wunused-variable]
         SV *sv;
             ^~
In file included from Curl.xs:574:0:
curlopt-constants.c: In function ‘constant’:
curlopt-constants.c:19: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:130:49: error: ‘CURL_STRICTER’ undeclared (first use in this function); did you mean ‘PMf_STRICT’?
             if (strEQ(name, "STRICTER")) return CURL_STRICTER;
                                                 ^~~~~~~~~~~~~
                                                 PMf_STRICT
curlopt-constants.c:130:49: note: each undeclared identifier is reported only once for each function it appears in
curlopt-constants.c:2077:44: warning: overflow in implicit constant conversion [-Woverflow]
             if (strEQ(name, "ANY")) return CURLAUTH_ANY;
                                            ^~~~~~~~~~~~
curlopt-constants.c:2078:48: warning: overflow in implicit constant conversion [-Woverflow]
             if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE;
                                                ^~~~~~~~~~~~~~~~

Full output

I have curl, curl-config and curl-devel installed. I have tried all suggestions I found on similar problems, but I can't get this to work. Any ideas appreciated.

ikegami
  • 367,544
  • 15
  • 269
  • 518
TheAdam122
  • 99
  • 11

1 Answers1

2

Okay, this is how I got it to work: The error was related to CURL_STRICTER, it was missing in a line of MAKEFILE.pl. I found this bug and this patch, so I downloaded the WWW-Curl-4.17.tar.gz and extracted it, and changed the following line according to the patch:

if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) {

to look like

if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) {

After that I installed it according to the included README and it worked.

TheAdam122
  • 99
  • 11
  • Thanks, I needed that fix. It was also necessary on Ubuntu 20.04 to add this line to the @includes '/usr/include/x86_64-linux-gnu' – Jared Still Aug 22 '22 at 20:16