http://www.perlmonks.org?node_id=1208666

igods has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to port some perl code over from my OS X 10.6.8 server to my new OS X 10.12.6 server. When I run the code, it trips over a missing WWW::Curl::Easy module:
------------------------------
[ns3:~/linkrabbit] administrator% ./linkrabbit.pl -s iq Can't locate WWW/Curl/Easy.pm in @INC (you may need to install the WWW +::Curl::Easy module) (@INC contains: /Users/administrator/perl5/perlb +rew/build/perl-5.24.0/ /Library/Perl/5.18/darwin-thread-multi-2level +/Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2le +vel /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-th +read-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5 +.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Libr +ary/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/ +Extras/5.18 . /usr/local/Cellar/curl/7.56.1/) at ./linkrabbit.pl line + 35. BEGIN failed--compilation aborted at ./linkrabbit.pl line 35. [ns3:~/linkrabbit] administrator%

------------------------------
Sure enough, WWW::Curl::Easy is not installed. So I pop over to cpanp to install the module, but fail miserably:
------------------------------
[ns3:~/linkrabbit] administrator% sudo cpanp -i WWW::Curl::Easy Password: Installing WWW::Curl::Easy (4.17) CPANPLUS::Dist::Build::Constants will be removed from the Perl core di +stribution in the next major release. Please install it from CPAN. It + is being used at /System/Library/Perl/5.18/CPANPLUS/Dist/Build.pm, l +ine 16. Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; + $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ +if $@; } /Users/administrator/.cpanplus/5.18.2/build/WWW-Curl-4.17/Ma +kefile.PL]... Locating required external dependency bin:curl-config... found at /usr +/bin/curl-config. The version is libcurl 7.54.0 Found curl.h in /usr/include/curl/curl.h In file included from /usr/include/curl/curl.h:38: In file included from /usr/include/curl/curlbuild.h:145: In file included from /Applications/Xcode.app/Contents/Developer/Toolc +hains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/inttypes.h +:30: In file included from /usr/include/inttypes.h:224: In file included from /usr/include/Availability.h:190: /usr/include/AvailabilityInternal.h:22938:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12 ^ /usr/include/AvailabilityInternal.h:22867:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_4 ^ /usr/include/AvailabilityInternal.h:22800:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_3 ^ /usr/include/AvailabilityInternal.h:22737:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_2 ^ /usr/include/AvailabilityInternal.h:22678:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11 ^ /usr/include/AvailabilityInternal.h:22623:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10_3 ^ /usr/include/AvailabilityInternal.h:22572:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10_2 ^ /usr/include/AvailabilityInternal.h:22525:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 ^ /usr/include/AvailabilityInternal.h:22482:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 ^ /usr/include/AvailabilityInternal.h:22443:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 ^ /usr/include/AvailabilityInternal.h:22408:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_7 ^ /usr/include/AvailabilityInternal.h:22377:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 ^ /usr/include/AvailabilityInternal.h:22350:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_5 ^ /usr/include/AvailabilityInternal.h:22327:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_4 ^ /usr/include/AvailabilityInternal.h:22308:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_3 ^ /usr/include/AvailabilityInternal.h:22293:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_2 ^ /usr/include/AvailabilityInternal.h:22282:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_1 ^ /usr/include/AvailabilityInternal.h:30:2: error: unterminated conditio +nal directive #ifndef __AVAILABILITY_INTERNAL__ ^ In file included from /usr/include/curl/curl.h:38: In file included from /usr/include/curl/curlbuild.h:145: In file included from /Applications/Xcode.app/Contents/Developer/Toolc +hains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/inttypes.h +:30: In file included from /usr/include/inttypes.h:224: /usr/include/Availability.h:239:2: error: #else without #if #else ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. Building curlopt-constants.c for your libcurl version Building Easy.pm constants for your libcurl version Building Share.pm constants for your libcurl version Generating a Unix-style Makefile Writing Makefile for WWW::Curl Writing MYMETA.yml and MYMETA.json [ERROR] MAKE failed: Inappropriate ioctl for device Skip blib/lib/WWW/ +Curl/Easy.pm (unchanged) Skip blib/lib/WWW/Curl/Multi.pm (unchanged) Skip blib/lib/WWW/Curl/Form.pm (unchanged) Skip blib/lib/WWW/Curl.pm (unchanged) Skip blib/lib/WWW/Curl/Share.pm (unchanged) Running Mkbootstrap for Curl () chmod 644 "Curl.bs" "/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Cu +rl.bs blib/arch/auto/WWW/Curl/Curl.bs 644 cc -c -I/usr/include -arch x86_64 -arch i386 -g -pipe -fno-common -DP +ERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"4 +.17\" -DXS_VERSION=\"4.17\" "-I/System/Library/Perl/5.18/darwin-thre +ad-multi-2level/CORE" Curl.c In file included from Curl.xs:574: ./curlopt-constants.c:19:58: error: non-void function 'constant' shoul +d return a value [-Wreturn-type] if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_D +ID_MEMORY_FUNC_TYPEDEFS; ^ ./curlopt-constants.c:128:49: error: use of undeclared identifier 'CUR +L_STRICTER' if (strEQ(name, "STRICTER")) return CURL_STRICTER; ^ ./curlopt-constants.c:2051:44: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551599 to -17 [- +Wconstant-conversion] if (strEQ(name, "ANY")) return CURLAUTH_ANY; ~~~~~~ ^~~~~~~~~~~~ /usr/include/curl/curl.h:679:32: note: expanded from macro 'CURLAUTH_A +NY' #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) ^~~~~~~~~~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2052:48: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551598 to -18 [- +Wconstant-conversion] if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE; ~~~~~~ ^~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:680:32: note: expanded from macro 'CURLAUTH_A +NYSAFE' #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings and 2 errors generated. make: *** [Curl.o] Error 1 [ERROR] Unable to create a new distribution object for 'WWW::Curl::Eas +y' -- cannot continue *** Install log written to: /Users/administrator/.cpanplus/install-logs/WWW-Curl-Easy-4.17-15180 +47969.log Error installing 'WWW::Curl::Easy' Problem installing one or more modules [ns3:~/linkrabbit] administrator%

------------------------------
My linkrabbit.pl file begins with this (line 35 is use WWW::Curl::Easy;):
#! /usr/bin/perl # ############################################## use strict; use lib "/Users/administrator/perl5/perlbrew/build/perl-5.24.0/"; BEGIN {push @INC, '/usr/local/Cellar/curl/7.56.1/'} use Time::Local; use Time::HiRes; use Getopt::Long; use IO::Handle; use HTML::TokeParser; use XML::LibXML; use WWW::RobotRules; use LWP::Simple qw(get); use URI; use Switch; use WWW::Curl::Easy; use WWW::Curl::Multi; use WWW::Google::PageRank; use File::Copy;

------------------------------
I have googled my brains out (and I google for a living), but haven't been able to get past this point for months. At this point, I'm quite lost. I'm hoping that I can reach out to someone who might better understand my predicament.

Can anyone assist?

My humble thanks.
Cameron Knowlton

Replies are listed 'Best First'.
Re: installing WWW::Curl::Easy perl module in OS X 10.12.6
by syphilis (Archbishop) on Feb 08, 2018 at 01:04 UTC
    /usr/include/AvailabilityInternal.h:22938:10: error: unterminated conditional directive

    The syntax of /usr/include/AvailabilityInternal.h is illegal, at least in the eyes of your C compiler.
    For every "#if" there needs to be a corresponding "#endif", and the C pre-processor hasn't found those requisite occurrences of "#endif". (All other errors are probably a consequence of this.)

    I suppose one could fix the offending file, but if you're using the system perl (as I suspect you are) then I believe that, instead of using cpan, it's recommended that you install modules using your system's package manager.
    /usr/include/AvailabilityInternal.h wouldn't even be looked at if you were to install WWW::Curl::Easy using the package manager.

    Update: See
    https://stackoverflow.com/questions/42031921/unterminated-unconditional-directive-error-when-preprocessing-c-code
    if you wish to persevere with a cpanp installation.

    Cheers,
    Rob
      Thank you Rob, I got further this time... I verified (and updated) curl and pkg_config in brew:
      ns3:linkrabbit administrator$ brew info curl curl: stable 7.58.0 (bottled), HEAD [keg-only] Get a file from an HTTP, HTTPS or FTP server https://curl.haxx.se/ /usr/local/Cellar/curl/7.51.0 (368 files, 2.6MB) Poured from bottle on 2016-11-21 at 15:29:25 /usr/local/Cellar/curl/7.56.1 (414 files, 3.0MB) Poured from bottle on 2017-11-08 at 11:37:40 /usr/local/Cellar/curl/7.58.0 (415 files, 3MB) Poured from bottle on 2018-02-09 at 10:38:12 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/cu +rl.rb ==> Dependencies Build: pkg-config ✔ Optional: openssl ✔, rtmpdump ✘, libssh2 ✘, c-are +s ✘, libmetalink ✘, nghttp2 ✘ ==> Options --with-c-ares Build with C-Ares async DNS support --with-gssapi Build with GSSAPI/Kerberos authentication support. --with-libmetalink Build with libmetalink support. --with-libssh2 Build with scp and sftp support --with-nghttp2 Build with HTTP/2 support (requires OpenSSL) --with-openssl Build with OpenSSL instead of Secure Transport --with-rtmpdump Build with RTMP support --HEAD Install HEAD version ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/l +ocal, because macOS already provides this software and installing another ve +rsion in parallel can cause all kinds of trouble. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profil +e For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/curl/lib CPPFLAGS: -I/usr/local/opt/curl/include For pkg-config to find this software you may need to set: PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig ns3:linkrabbit administrator$
      I believe what I had missed was appending my .bash_profile to be able to find the brew installed curl:
      export PATH="/usr/local/opt/curl/bin:$PATH" export CURL_CONFIG=/usr/local/Cellar/curl/7.58.0/bin/curl-config
      I then attempted again to install the WWW::Curl::Easy module using cpanp... I now encounter different problems (so this is progress, yes?!)
      ns3:linkrabbit administrator$ sudo cpanp -i WWW::Curl::Easy Installing WWW::Curl::Easy (4.17) CPANPLUS::Dist::Build::Constants will be removed from the Perl core di +stribution in the next major release. Please install it from CPAN. It + is being used at /System/Library/Perl/5.18/CPANPLUS/Dist/Build.pm, l +ine 16. [ERROR] MAKE failed: "/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM +-e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644 cc -c -I/usr/local/Cellar/curl/7.58.0/include -arch x86_64 -arch i386 + -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-prot +ector -Os -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" "-I/System/Libr +ary/Perl/5.18/darwin-thread-multi-2level/CORE" Curl.c In file included from Curl.xs:574: ./curlopt-constants.c:19:58: error: non-void function 'constant' shoul +d return a value [-Wreturn-type] if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_D +ID_MEMORY_FUNC_TYPEDEFS; ^ ./curlopt-constants.c:136:49: error: use of undeclared identifier 'CUR +L_STRICTER' if (strEQ(name, "STRICTER")) return CURL_STRICTER; ^ ./curlopt-constants.c:179:56: warning: implicit conversion from 'size_ +t' (aka 'unsigned long') to 'int' changes value from 1844674407370955 +1615 to -1 [-Wconstant-conversion] if (strEQ(name, "ZERO_TERMINATED")) return CURL_ZERO_TERMI +NATED; ~~~~~~ ^~~~~~~~~~~~~~~ +~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:1969:31: note: expan +ded from macro 'CURL_ZERO_TERMINATED' #define CURL_ZERO_TERMINATED ((size_t) -1) ^~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2145:44: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551599 to -17 [- +Wconstant-conversion] if (strEQ(name, "ANY")) return CURLAUTH_ANY; ~~~~~~ ^~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:708:32: note: expand +ed from macro 'CURLAUTH_ANY' #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) ^~~~~~~~~~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2146:48: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551598 to -18 [- +Wconstant-conversion] if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE; ~~~~~~ ^~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:709:32: note: expand +ed from macro 'CURLAUTH_ANYSAFE' #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Curl.xs:1100:26: warning: implicit conversion from enumeration type 'C +URLINFO' to different enumeration type 'CURLoption' [-Wenum-conversio +n] curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:2744:68: note: expan +ded from macro 'curl_easy_setopt' #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt +,param) ~~~~~~~~~~~~~~~~ ^~~ 4 warnings and 2 errors generated. make: *** [Curl.o] Error 1 [ERROR] Unable to create a new distribution object for 'WWW::Curl::Eas +y' -- cannot continue *** Install log written to: /Users/administrator/.cpanplus/install-logs/WWW-Curl-Easy-4.17-15182 +02859.log Error installing 'WWW::Curl::Easy' Problem installing one or more modules ns3:linkrabbit administrator$
      Rob, I'm not sure if I'm reading you right.. are you suggeting that I install WWW::Curl::Easy using brew? I'm not sure how to do that beyond:
      brew install curl

        I tried compiling WWW::Curl::Easy by hand, but came across the same errors:
        [ns3:~/src/WWW-Curl-4.17] administrator% perl Makefile.PL The version is libcurl 7.58.0 Found curl.h in /usr/local/Cellar/curl/7.58.0/include/curl/curl.h In file included from /usr/local/Cellar/curl/7.58.0/include/curl/curl. +h:38: In file included from /usr/local/Cellar/curl/7.58.0/include/curl/syste +m.h:405: In file included from /usr/include/sys/socket.h:81: In file included from /usr/include/Availability.h:190: /usr/include/AvailabilityInternal.h:22938:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12 ^ /usr/include/AvailabilityInternal.h:22867:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_4 ^ /usr/include/AvailabilityInternal.h:22800:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_3 ^ /usr/include/AvailabilityInternal.h:22737:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11_2 ^ /usr/include/AvailabilityInternal.h:22678:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11 ^ /usr/include/AvailabilityInternal.h:22623:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10_3 ^ /usr/include/AvailabilityInternal.h:22572:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10_2 ^ /usr/include/AvailabilityInternal.h:22525:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 ^ /usr/include/AvailabilityInternal.h:22482:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 ^ /usr/include/AvailabilityInternal.h:22443:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 ^ /usr/include/AvailabilityInternal.h:22408:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_7 ^ /usr/include/AvailabilityInternal.h:22377:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 ^ /usr/include/AvailabilityInternal.h:22350:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_5 ^ /usr/include/AvailabilityInternal.h:22327:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_4 ^ /usr/include/AvailabilityInternal.h:22308:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_3 ^ /usr/include/AvailabilityInternal.h:22293:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_2 ^ /usr/include/AvailabilityInternal.h:22282:10: error: unterminated cond +itional directive #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_1 ^ /usr/include/AvailabilityInternal.h:30:2: error: unterminated conditio +nal directive #ifndef __AVAILABILITY_INTERNAL__ ^ In file included from /usr/local/Cellar/curl/7.58.0/include/curl/curl. +h:38: In file included from /usr/local/Cellar/curl/7.58.0/include/curl/syste +m.h:405: In file included from /usr/include/sys/socket.h:81: /usr/include/Availability.h:239:2: error: #else without #if #else ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. 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 Generating a Unix-style Makefile Writing Makefile for WWW::Curl Writing MYMETA.yml and MYMETA.json [ns3:~/src/WWW-Curl-4.17] administrator%
        From what I can tell, this is an issue with the compiler... the reported missing "unterminated conditional directive" is actually there, but indented (seriously?!?! that's a problem?!)
        I went ahead and tried a make, but failed there too:
        [ns3:~/src/WWW-Curl-4.17] administrator% make cp lib/WWW/Curl/Share.pm blib/lib/WWW/Curl/Share.pm cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm cp lib/WWW/Curl/Multi.pm blib/lib/WWW/Curl/Multi.pm cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.pm Running Mkbootstrap for WWW::Curl () chmod 644 "Curl.bs" "/Users/administrator/perl5/perlbrew/perls/perl-5.24.0/bin/perl" "-Iin +c" "/Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/ +ExtUtils/xsubpp" -typemap "/Users/administrator/perl5/perlbrew/perls +/perl-5.24.0/lib/5.24.0/ExtUtils/typemap" -typemap "typemap" Curl.xs + > Curl.xsc && mv Curl.xsc Curl.c cc -c -I/usr/local/Cellar/curl/7.58.0/include -fno-common -DPERL_DARW +IN -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/i +nclude -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"4.17\" -DXS_VERSION=\ +"4.17\" "-I/Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib +/5.24.0/darwin-2level/CORE" Curl.c In file included from Curl.xs:574: ./curlopt-constants.c:19:58: error: non-void function 'constant' shoul +d return a value [-Wreturn-type] if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_D +ID_MEMORY_FUNC_TYPEDEFS; ^ ./curlopt-constants.c:136:49: error: use of undeclared identifier 'CUR +L_STRICTER' if (strEQ(name, "STRICTER")) return CURL_STRICTER; ^ ./curlopt-constants.c:179:56: warning: implicit conversion from 'size_ +t' (aka 'unsigned long') to 'int' changes value from 1844674407370955 +1615 to -1 [-Wconstant-conversion] if (strEQ(name, "ZERO_TERMINATED")) return CURL_ZERO_TERMI +NATED; ~~~~~~ ^~~~~~~~~~~~~~~ +~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:1969:31: note: expan +ded from macro 'CURL_ZERO_TERMINATED' #define CURL_ZERO_TERMINATED ((size_t) -1) ^~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2145:44: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551599 to -17 [- +Wconstant-conversion] if (strEQ(name, "ANY")) return CURLAUTH_ANY; ~~~~~~ ^~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:708:32: note: expand +ed from macro 'CURLAUTH_ANY' #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) ^~~~~~~~~~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2146:48: warning: implicit conversion from 'unsi +gned long' to 'int' changes value from 18446744073709551598 to -18 [- +Wconstant-conversion] if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE; ~~~~~~ ^~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:709:32: note: expand +ed from macro 'CURLAUTH_ANYSAFE' #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Curl.xs:1100:26: warning: implicit conversion from enumeration type 'C +URLINFO' to different enumeration type 'CURLoption' [-Wenum-conversio +n] curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.58.0/include/curl/curl.h:2744:68: note: expan +ded from macro 'curl_easy_setopt' #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt +,param) ~~~~~~~~~~~~~~~~ ^~~ 4 warnings and 2 errors generated. make: *** [Curl.o] Error 1 [ns3:~/src/WWW-Curl-4.17] administrator%
        I'm completely dead in the water here. I've been trying to pull this off for over a year.

        FYI, I checked my versions of curl and perl, and verified that they are the ones I expected:
        [ns3:~/src/WWW-Curl-4.17] administrator% which curl /usr/local/opt/curl/bin/curl [ns3:~/src/WWW-Curl-4.17] administrator% /usr/local/opt/curl/bin/curl +--version curl 7.58.0 (x86_64-apple-darwin16.7.0) libcurl/7.58.0 SecureTransport + zlib/1.2.8 Release-Date: 2018-01-24 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps +pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets [ns3:~/src/WWW-Curl-4.17] administrator% which perl /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/bin/perl [ns3:~/src/WWW-Curl-4.17] administrator%