Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: installing WWW::Curl::Easy perl module in OS X 10.12.6

by igods (Novice)
on Feb 09, 2018 at 19:14 UTC ( #1208853=note: print w/replies, xml ) Need Help??


in reply to Re: installing WWW::Curl::Easy perl module in OS X 10.12.6
in thread installing WWW::Curl::Easy perl module in OS X 10.12.6

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

Replies are listed 'Best First'.
Re^3: installing WWW::Curl::Easy perl module in OS X 10.12.6
by igods (Novice) on Feb 10, 2018 at 17:44 UTC
    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%
      ./curlopt-constants.c:19:58: error: non-void function 'constant' should return a value [-Wreturn-type]

      Interesting ... when I build WWW-Curl on windows, I get something similar:
      In file included from Curl.xs:581:0: curlopt-constants.c: In function 'constant': curlopt-constants.c:19:58: warning: 'return' with no value, in functio +n returning non-void if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_ +DID_MEMORY_FUNC_TYPEDEFS;
      But, of course, it's only a warning for me - and this allows the build to complete successfully.

      I *think* this warning is telling me that, although CURL_DID_MEMORY_FUNC_TYPEDEFS is defined, it hasn't been assigned a value.
      In Curl.xs, try replacing:
      #include "curlopt-constants.c"
      with:
      #undef CURL_DID_MEMORY_FUNC_TYPEDEFS #define CURL_DID_MEMORY_FUNC_TYPEDEFS 0 #include "curlopt-constants.c"
      That avoids the warning for me, and will hopefully avoid the error for you.

      Cheers,
      Rob
        Thank you, Rob, I almost missed the one issue that got fixed: I no longer get:
        ./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;
        I applied this patch to Makefile.PL:

        ref: https://rt.cpan.org/Public/Bug/Display.html?id=117793
        ref: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch
        CPAN RT#117793 Signed-off-by: Petr Písa&#345; <ppisar@redhat.com> --- Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index f9170bb..ad2bd3d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -127,7 +127,7 @@ if (!defined($curl_h)) { close H; for my $e (sort @syms) { - if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) { + if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LAS +TENTRY\z)/) { next; } my ($group) = $e =~ m/^([^_]+_)/; -- 2.7.4
        That got me past an error free make and make install, yay! (Oddly, implementing the patch by hand did not work, but I wanted to learn how to automatically apply them, so I researched that.) When I patched the code with:
        patch -b < WWW-Curl-4.17-RT117793.patch
        ... I was able to successfully make install the code.

        I *am* still getting 4 warnings during my make (make test), I am not sure if those are of concern or not:
        [ns3:~/src/WWW-Curl-4.17] administrator% sudo make Skip blib/lib/WWW/Curl.pm (unchanged) Skip blib/lib/WWW/Curl/Form.pm (unchanged) Skip blib/lib/WWW/Curl/Share.pm (unchanged) Skip blib/lib/WWW/Curl/Multi.pm (unchanged) Skip blib/lib/WWW/Curl/Easy.pm (unchanged) 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:176: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:2142: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:2143: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 generated. rm -f blib/arch/auto/WWW/Curl/Curl.bundle LD_RUN_PATH="/usr/local/Cellar/curl/7.58.0/lib:/usr/lib" env MACOSX_DE +PLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/loc +al/lib -fstack-protector-strong Curl.o -o blib/arch/auto/WWW/Curl/Cu +rl.bundle \ -L/usr/local/Cellar/curl/7.58.0/lib -lcurl -lldap -lz \ ld: warning: object file (Curl.o) was built for newer OSX version (10. +12) than being linked (10.4) chmod 755 blib/arch/auto/WWW/Curl/Curl.bundle "/Users/administrator/perl5/perlbrew/perls/perl-5.24.0/bin/perl" "-Iin +c" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto +/WWW/Curl/Curl.bs 644 Manifying 1 pod document [ns3:~/src/WWW-Curl-4.17] administrator% sudo make install Running Mkbootstrap for WWW::Curl () chmod 644 "Curl.bs" Manifying 1 pod document Files found in blib/arch: installing files in blib/lib into architectu +re dependent library tree Appending installation info to /Users/administrator/perl5/perlbrew/per +ls/perl-5.24.0/lib/5.24.0/darwin-2level/perllocal.pod [ns3:~/src/WWW-Curl-4.17] administrator%
        (note: I reversed your earlier recommendation for the Curl.xs change, and am still able to compile without the CURL_DID_MEMORY_FUNC_TYPEDEFS error.)

        Unfortunately as you can see, an old glitch in Makefile.PL seems to have come back to haunt me... I am getting a linking error in the make install that the Curl.o object file was built for a newer OS (10.12, the server OS) than being linked (10.4, which I guess is the lowest common denominator selected, or it could be due to my perl version, see below).
        LD_RUN_PATH="/usr/local/Cellar/curl/7.58.0/lib:/usr/lib" env MACOSX_DE +PLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/loc +al/lib -fstack-protector-strong Curl.o -o blib/arch/auto/WWW/Curl/Cu +rl.bundle \ -L/usr/local/Cellar/curl/7.58.0/lib -lcurl -lldap -lz \ ld: warning: object file (Curl.o) was built for newer OSX version (10. +12) than being linked (10.4)
        I believe this results from when I tripped over the error: unterminated conditional directive during my initial perl Makerfile.PL call:
        /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 ^
        I guess I cannot ignore those error after all. From what I researched, the preprocessor is tripping over indented conditional if/ifndef/etc directives, likely due to its duties testing off-side languages like Python. I hear that using gcc instead can fix the problem, but I have no idea how to encourage Perl Makefile.PL to use gcc instead (which I do have installed).

        I thought I might experiment by removing all the leading whitespace on each line of /usr/include/AvailabilityInternal.h , but boy, the OS will NOT let me change that file in any way. Not even via su or sudo.

        Even the binary that I did manage to make install has problems running:
        #! /usr/bin/perl # linkrabbit.pl use strict; use warnings; # use lib "/Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/s +ite_perl/5.24.0/darwin-2level/"; use lib "/Users/administrator/src/WWW-Curl-4.17/lib/"; 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; [ns3:~/linkrabbit] administrator% ./linkrabbit.pl -s iq Can't find 'boot_WWW__Curl' symbol in /usr/lib/libCurl.dylib at /Users/administrator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm line 9 +. Compilation failed in require at /Users/administrator/src/WWW-Curl-4.1 +7/lib/WWW/Curl/Easy.pm line 9. BEGIN failed--compilation aborted at /Users/administrator/src/WWW-Curl +-4.17/lib/WWW/Curl/Easy.pm line 9. Compilation failed in require at ./linkrabbit.pl line 38. BEGIN failed--compilation aborted at ./linkrabbit.pl line 38. Undefined subroutine &WWW::Curl::_global_cleanup called at /Users/admi +nistrator/src/WWW-Curl-4.17/lib/WWW/Curl.pm line 11. END failed--call queue aborted at ./linkrabbit.pl line 38. [ns3:~/linkrabbit] administrator%
        These exciting new errors definitely show progress... I am thinking it might be related to ancient 10.4 code running on 10.12. I am thinking I need to fix those OS X version tests in Makefile.PL.

        I was able to eliminate the 2nd error (Undefined subroutine &WWW::Curl::_global_cleanup) simply by deleting the reference in Curl.pm, as I read it was not needed, but still cannot eliminate (or even find reference to) Can't find 'boot_WWW__Curl' symbol in /usr/lib/libCurl.dylib

        FYI, I located the new code path, and forced it via the use lib directive above. The make install did not include it in per @inc (I should probably install it elsewhere, but where...? There seem to be multiple choices, will the real @INC please stand up):
        [ns3:~] administrator% locate WWW/Curl/Easy <snip> /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5. +24.0/darwin-2level/WWW/Curl/Easy.pm /Users/administrator/src/WWW-Curl-4.17/blib/lib/WWW/Curl/Easy.pm /Users/administrator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm [ns3:~] administrator% perl -e 'print join "\n", @INC, ""' /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5. +24.0/darwin-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5. +24.0 /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/darwi +n-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0 . [ns3:~] administrator%
        I am confused why the 2 Easy.pm files (in /Users/administrator/src/WWW-Curl-4.17) are more up to date than the file supposedly installed with my make install (Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/darwin-2level/WWW/Curl.pm):
        [ns3:~/src/WWW-Curl-4.17] administrator% sudo make install Skip blib/lib/WWW/Curl/Easy.pm (unchanged) cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm Skip blib/lib/WWW/Curl/Share.pm (unchanged) Skip blib/lib/WWW/Curl/Multi.pm (unchanged) Skip blib/lib/WWW/Curl/Form.pm (unchanged) Manifying 1 pod document Files found in blib/arch: installing files in blib/lib into architectu +re dependent library tree Installing /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/s +ite_perl/5.24.0/darwin-2level/WWW/Curl.pm Installing /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/man/m +an3/WWW::Curl.3 Appending installation info to /Users/administrator/perl5/perlbrew/per +ls/perl-5.24.0/lib/5.24.0/darwin-2level/perllocal.pod [ns3:~/src/WWW-Curl-4.17] administrator% [ns3:~/linkrabbit] administrator% ls /Users/administrator/perl5/perlbr +ew/perls/perl-5.24.0/lib/site_perl/5.24.0/darwin-2level/WWW/Curl/Easy +.pm /Users/administrator/src/WWW-Curl-4.17/blib/lib/WWW/Curl/Easy.pm +/Users/administrator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm -r--r--r-- 1 root staff 18K 11 Feb 10:21 /Users/administ +rator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/darwin-2l +evel/WWW/Curl/Easy.pm -r--r--r-- 1 administrator staff 18K 11 Feb 12:06 /Users/administ +rator/src/WWW-Curl-4.17/blib/lib/WWW/Curl/Easy.pm -rw-r--r-- 1 administrator staff 18K 11 Feb 12:06 /Users/administ +rator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm
        My linkrabbit.pl code fails even worse if I point the use lib to /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/darwin-2level/

        Maybe I am chasing wild geese. Perhaps the problem is with my perl itself? I checked to see that I am using my perlbrew instance:
        [ns3:~/src/WWW-Curl-4.17] administrator% which perl /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/bin/perl
        The linker and libraries did not seem encouraging: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
        [ns3:~/src/WWW-Curl-4.17] administrator% perl -V Summary of my perl5 (revision 5 version 24 subversion 0) configuration +: Platform: osname=darwin, osvers=14.5.0, archname=darwin-2level uname='darwin ns3.igods.com 14.5.0 darwin kernel version 14.5.0: s +un sep 25 22:07:15 pdt 2016; root:xnu-2782.50.9~1release_x86_64 x86_6 +4 ' config_args='-de -Dprefix=/Users/administrator/perl5/perlbrew/perl +s/perl-5.24.0 -Aeval:scriptdir=/Users/administrator/perl5/perlbrew/pe +rls/perl-5.24.0/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing +-pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_P +UTENV', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fs +tack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.0.2 (clang +-700.1.81)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-prot +ector-strong -L/usr/local/lib' libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/Xcode +Default.xctoolchain/usr/bin/../lib/clang/7.0.2/lib /Applications/Xcod +e.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib +/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/ +Developer/SDKs/MacOSX10.11.sdk/usr/lib /usr/local/lib /usr/lib libs=-lpthread -ldbm -ldl -lm -lutil -lc perllibs=-lpthread -ldl -lm -lutil -lc libc=, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/u +sr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_ +WRAP PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: Devel::PatchPerl 1.38 Built under darwin Compiled at Dec 19 2016 14:26:21 %ENV: PERLBREW_HOME="/Users/administrator/.perlbrew" PERLBREW_MANPATH="/Users/administrator/perl5/perlbrew/perls/perl-5 +.24.0/man" PERLBREW_PATH="/Users/administrator/perl5/perlbrew/bin:/Users/admi +nistrator/perl5/perlbrew/perls/perl-5.24.0/bin" PERLBREW_PERL="perl-5.24.0" PERLBREW_ROOT="/Users/administrator/perl5/perlbrew" PERLBREW_SHELLRC_VERSION="0.82" PERLBREW_VERSION="0.82" @INC: /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_per +l/5.24.0/darwin-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/site_per +l/5.24.0 /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/d +arwin-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0 . [ns3:~/src/WWW-Curl-4.17] administrator%
        I installed the latest perl 5.24.3:
        sudo perlbrew install perl-5.24.3
        but see the same MACOSX_DEPLOYMENT_TARGET=10.3 cc:
        [ns3:~/src/WWW-Curl-4.17] root# perlbrew list * perl-5.24.3 (installed on Sun Feb 11 +13:34:22 2018) perl-5.24.0 (installed on Mon Dec 19 +15:15:33 2016) system (5.18.2) (installed on Tue Feb 6 +12:07:11 2018) [ns3:~/src/WWW-Curl-4.17] root# perl -V Summary of my perl5 (revision 5 version 24 subversion 3) configuration +: Platform: osname=darwin, osvers=16.7.0, archname=darwin-thread-multi-2level uname='darwin ns3.igods.com 16.7.0 darwin kernel version 16.7.0: t +hu jan 11 22:59:40 pst 2018; root:xnu-3789.73.8~1release_x86_64 x86_6 +4 ' config_args='-de -Dprefix=/Users/administrator/perl5/perlbrew/perl +s/perl-5.24.3 -Dusethreads -Aeval:scriptdir=/Users/administrator/perl +5/perlbrew/perls/perl-5.24.3/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing +-pipe -fstack-protector-strong -I/usr/local/include', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fs +tack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 9.0.0 (clang +-900.0.39.2)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-prot +ector-strong -L/usr/local/lib' libpth=/usr/local/lib /Applications/Xcode.app/Contents/Developer/T +oolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib /Applicati +ons/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ +usr/lib /usr/lib libs=-lpthread -ldbm -ldl -lm -lutil -lc perllibs=-lpthread -ldl -lm -lutil -lc libc=, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/u +sr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_I +NT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Locally applied patches: Devel::PatchPerl 1.38 Built under darwin Compiled at Feb 11 2018 13:17:46 %ENV: PERL5LIB="" PERLBREW_LIB="" PERLBREW_MANPATH="/Users/administrator/perl5/perlbrew/perls/perl-5 +.24.3/man" PERLBREW_PATH="/Users/administrator/perl5/perlbrew/bin:/Users/admi +nistrator/perl5/perlbrew/perls/perl-5.24.3/bin" PERLBREW_PERL="perl-5.24.3" PERLBREW_ROOT="/Users/administrator/perl5/perlbrew" PERLBREW_SKIP_INIT="1" PERLBREW_VERSION="0.78" PERL_LOCAL_LIB_ROOT="" @INC: /Users/administrator/perl5/perlbrew/perls/perl-5.24.3/lib/site_per +l/5.24.3/darwin-thread-multi-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.3/lib/site_per +l/5.24.3 /Users/administrator/perl5/perlbrew/perls/perl-5.24.3/lib/5.24.3/d +arwin-thread-multi-2level /Users/administrator/perl5/perlbrew/perls/perl-5.24.3/lib/5.24.3 . [ns3:~/src/WWW-Curl-4.17] root#
        I do not seem to be able to permanently switch my system over to 5.24.3 either, oddly... perlbrew switch runs exactly the same as perlbrew use, even when I sudo the command. That is an issue down the line, once I can get past my error: Can't find 'boot_WWW__Curl' symbol in /usr/lib/libCurl.dylib
        [ns3:~/linkrabbit] root# ./linkrabbit.pl -s iq Can't find 'boot_WWW__Curl' symbol in /usr/lib/libCurl.dylib at /Users/administrator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm line 9 +. Compilation failed in require at /Users/administrator/src/WWW-Curl-4.1 +7/lib/WWW/Curl/Easy.pm line 9. BEGIN failed--compilation aborted at /Users/administrator/src/WWW-Curl +-4.17/lib/WWW/Curl/Easy.pm line 9. Compilation failed in require at ./linkrabbit.pl line 38. BEGIN failed--compilation aborted at ./linkrabbit.pl line 38. [ns3:~/linkrabbit] root#
        Running perl 5.24.0, I see WWW::Curl installed, but not WWW::Curl::Easy:
        [ns3:~] administrator% perlbrew list-modules Algorithm::Diff App::cpanminus CPAN Config::Perl::V File::HomeDir File::Which Mac::SystemDirectory Perl Spiffy Test::Base Test::Deep Test::NoWarnings Test::YAML Text::Diff WWW::Curl YAML install [ns3:~] administrator%
        Switching (only temporarily!!) to perl 5.24.3, I see no perl modules installed (as I would expect, since this install is so fresh and new):
        [ns3:~] administrator% perlbrew switch perl-5.24.3 A sub-shell is launched with perl-5.24.3 as the activated perl. Run 'e +xit' to finish it. bash-3.2$ perlbrew list-modules Perl bash-3.2$
        Yet, when I run my perl program, I get the same error:
        bash-3.2$ ./linkrabbit.pl -s iq Can't find 'boot_WWW__Curl' symbol in /usr/lib/libCurl.dylib at /Users/administrator/src/WWW-Curl-4.17/lib/WWW/Curl/Easy.pm line 9 +. Compilation failed in require at /Users/administrator/src/WWW-Curl-4.1 +7/lib/WWW/Curl/Easy.pm line 9. BEGIN failed--compilation aborted at /Users/administrator/src/WWW-Curl +-4.17/lib/WWW/Curl/Easy.pm line 9. Compilation failed in require at ./linkrabbit.pl line 38. BEGIN failed--compilation aborted at ./linkrabbit.pl line 38.
        This leads me to conclude that even though I did a make install, the module is not accessible perl. I only know how to do install modules via cpan (which failed, forcing me into this manual install). Am I missing something fundamental here?

        This is one deep rabbit hole.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208853]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-05-27 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?