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

I've just replaced my laptop. I've gone from Kubuntu 14.04 with perl 5.18 to Kubuntu 17.04 with perl 5.24. I had a script that I'd been using without problems fer several years, but now I can't get the packages it depends on to compile. The script itself can be seen here.

I've just set this machine up from a blank hard drive and an ISO yesterday, and one of the first things I did was to install all the modules being used, but there seem to be problems with cURL and XML that I can't get to the bottom of. When I run it, I see this:

$ ./scripts/podcasts/podcasts.pl Can't locate Net/Curl/Easy.pm in @INC (you may need to install the Net +::Curl::Easy module) (@INC contains: /etc/perl /usr/local/lib/x86_64- +linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-li +nux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5. +24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linu +x-gnu/perl-base) at ./scripts/podcasts/podcasts.pl line 11. BEGIN failed--compilation aborted at ./scripts/podcasts/podcasts.pl li +ne 11.

If I comment out Net::Curl::Easy and replace it with WWW::Curl::Easy, I get this:

$ ./scripts/podcasts/podcast.pl Use of uninitialized value in subroutine entry at /usr/local/share/per +l/5.24.1/Role/Tiny.pm line 461. Can't call method "_attrs" on an undefined value at /usr/local/share/p +erl/5.24.1/Specio/OO.pm line 168. Compilation failed in require at /usr/local/share/perl/5.24.1/Specio/D +eclare.pm line 11. BEGIN failed--compilation aborted at /usr/local/share/perl/5.24.1/Spec +io/Declare.pm line 11. Compilation failed in require at /usr/local/lib/x86_64-linux-gnu/perl/ +5.24.1/DateTime/Types.pm line 12. BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/p +erl/5.24.1/DateTime/Types.pm line 12. Compilation failed in require at /usr/local/lib/x86_64-linux-gnu/perl/ +5.24.1/DateTime/Duration.pm line 12. BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/p +erl/5.24.1/DateTime/Duration.pm line 12. Compilation failed in require at /usr/local/lib/x86_64-linux-gnu/perl/ +5.24.1/DateTime.pm line 14. BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/p +erl/5.24.1/DateTime.pm line 14. Compilation failed in require at /usr/local/share/perl/5.24.1/DateTime +/Format/Mail.pm line 7. BEGIN failed--compilation aborted at /usr/local/share/perl/5.24.1/Date +Time/Format/Mail.pm line 7. Compilation failed in require at /usr/local/share/perl/5.24.1/XML/RSS/ +Private/Output/Base.pm line 9. BEGIN failed--compilation aborted at /usr/local/share/perl/5.24.1/XML/ +RSS/Private/Output/Base.pm line 9. Compilation failed in require at /usr/local/share/perl/5.24.1/XML/RSS. +pm line 9. BEGIN failed--compilation aborted at /usr/local/share/perl/5.24.1/XML/ +RSS.pm line 9. Compilation failed in require at ./scripts/podcasts/podcasts.pl line 1 +8. BEGIN failed--compilation aborted at ./scripts/podcasts/podcasts.pl li +ne 18.

Trying to install the packages, I see:

$ cpan install Net::Curl::Easy Reading '/home/ross/.cpan/Metadata' Database was generated on Wed, 19 Apr 2017 22:53:51 GMT Running install for module 'Net::Curl::Easy' Running make for S/SY/SYP/Net-Curl-0.37.tar.gz Checksum for /home/ross/.cpan/sources/authors/id/S/SY/SYP/Net-Curl-0.3 +7.tar.gz ok CPAN.pm: Building S/SY/SYP/Net-Curl-0.37.tar.gz Found libcurl version 7.52.1 Reading /usr/include/x86_64-linux-gnu/curl/curl.h (cc -E -I/usr/includ +e/x86_64-linux-gnu /usr/include/x86_64-linux-gnu/curl/curl.h) Reading /usr/include/x86_64-linux-gnu/curl/multi.h (cc -E -I/usr/inclu +de/x86_64-linux-gnu /usr/include/x86_64-linux-gnu/curl/multi.h) CURLE_HTTP2_STREAM unexpected CURLE_SSL_INVALIDCERTSTATUS unexpected CURLE_WEIRD_SERVER_REPLY unexpected CURLFORM_CONTENTLEN unexpected CURLINFO_ACTIVESOCKET unexpected CURLINFO_HTTP_VERSION unexpected CURLINFO_PROTOCOL unexpected CURLINFO_PROXY_SSL_VERIFYRESULT unexpected CURLINFO_SCHEME unexpected CURLINFO_SOCKET unexpected CURLINFO_TLS_SSL_PTR unexpected CURLMOPT_PUSHDATA unexpected CURLMOPT_PUSHFUNCTION unexpected CURLOPTTYPE_STRINGPOINT unexpected CURLOPT_CONNECT_TO unexpected CURLOPT_DEFAULT_PROTOCOL unexpected CURLOPT_KEEP_SENDING_ON_ERROR unexpected CURLOPT_PATH_AS_IS unexpected CURLOPT_PIPEWAIT unexpected CURLOPT_PRE_PROXY unexpected CURLOPT_PROXY_CAINFO unexpected CURLOPT_PROXY_CAPATH unexpected CURLOPT_PROXY_CRLFILE unexpected CURLOPT_PROXY_KEYPASSWD unexpected CURLOPT_PROXY_PINNEDPUBLICKEY unexpected CURLOPT_PROXY_SERVICE_NAME unexpected CURLOPT_PROXY_SSLCERT unexpected CURLOPT_PROXY_SSLCERTTYPE unexpected CURLOPT_PROXY_SSLKEY unexpected CURLOPT_PROXY_SSLKEYTYPE unexpected CURLOPT_PROXY_SSLVERSION unexpected CURLOPT_PROXY_SSL_CIPHER_LIST unexpected CURLOPT_PROXY_SSL_OPTIONS unexpected CURLOPT_PROXY_SSL_VERIFYHOST unexpected CURLOPT_PROXY_SSL_VERIFYPEER unexpected CURLOPT_PROXY_TLSAUTH_PASSWORD unexpected CURLOPT_PROXY_TLSAUTH_TYPE unexpected CURLOPT_PROXY_TLSAUTH_USERNAME unexpected CURLOPT_SERVICE_NAME unexpected CURLOPT_SSL_FALSESTART unexpected CURLOPT_SSL_VERIFYSTATUS unexpected CURLOPT_STREAM_DEPENDS unexpected CURLOPT_STREAM_DEPENDS_E unexpected CURLOPT_STREAM_WEIGHT unexpected CURLOPT_TCP_FASTOPEN unexpected CURLOPT_TFTP_NO_OPTIONS unexpected CURLPIPE_HTTP1 unexpected CURLPIPE_MULTIPLEX unexpected CURLPIPE_NOTHING unexpected CURLPROXY_HTTPS unexpected CURLSSLBACKEND_BORINGSSL unexpected CURLSSLBACKEND_LIBRESSL unexpected CURLSSLBACKEND_MBEDTLS unexpected CURLSSLBACKEND_WOLFSSL unexpected CURLSSLOPT_NO_REVOKE unexpected CURL_DID_MEMORY_FUNC_TYPEDEFS unexpected CURL_HTTPPOST_BUFFER unexpected CURL_HTTPPOST_CALLBACK unexpected CURL_HTTPPOST_FILENAME unexpected CURL_HTTPPOST_LARGE unexpected CURL_HTTPPOST_PTRBUFFER unexpected CURL_HTTPPOST_PTRCONTENTS unexpected CURL_HTTPPOST_PTRNAME unexpected CURL_HTTPPOST_READFILE unexpected CURL_HTTP_VERSION_2 unexpected CURL_HTTP_VERSION_2TLS unexpected CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE unexpected CURL_PUSH_DENY unexpected CURL_PUSH_OK unexpected CURL_SSLVERSION_TLSv1_3 unexpected CURL_STRICTER unexpected CURL_VERSION_HTTPS_PROXY unexpected CURL_VERSION_PSL unexpected -> found 788 constants (should be 715) Writing const-defenums-h.inc Writing const-curl-xs.inc Writing const-easy-xs.inc Writing const-form-xs.inc Writing const-multi-xs.inc Writing const-share-xs.inc Writing curl-Easy-c.inc Writing curl-Easy-xs.inc Writing curl-Form-c.inc Writing curl-Form-xs.inc Writing curl-Multi-c.inc Writing curl-Multi-xs.inc Writing curl-Share-c.inc Writing curl-Share-xs.inc Writing lib/Net/Curl/examples.pod <- examples/01-curl-transport.pl <- examples/02-multi-simple.pl <- examples/03-multi-event.pl <- examples/04-share-threads.pl <- examples/05-irssi-downloader.pl Writing lib/Net/Curl/Compat.pm Checking if your kit is complete... Looks good Writing Makefile for Net::Curl Wide character in print at /home/ross/perl5/perlbrew/perls/perl-5.18.4 +/lib/5.18.4/ExtUtils/MakeMaker.pm line 1034. Wide character in print at /home/ross/perl5/perlbrew/perls/perl-5.18.4 +/lib/5.18.4/ExtUtils/MakeMaker.pm line 1034. Wide character in print at /home/ross/perl5/perlbrew/perls/perl-5.18.4 +/lib/5.18.4/ExtUtils/MakeMaker.pm line 1034. Wide character in print at /home/ross/perl5/perlbrew/perls/perl-5.18.4 +/lib/5.18.4/ExtUtils/MakeMaker.pm line 1034. Writing MYMETA.yml and MYMETA.json cp lib/Net/Curl/Easy.pm blib/lib/Net/Curl/Easy.pm cp lib/Net/Curl/Share.pm blib/lib/Net/Curl/Share.pm cp lib/Net/Curl/Form.pm blib/lib/Net/Curl/Form.pm cp lib/Net/Curl/Compat.pm blib/lib/Net/Curl/Compat.pm cp lib/Net/Curl/Multi.pm blib/lib/Net/Curl/Multi.pm cp lib/Net/Curl.pm blib/lib/Net/Curl.pm cp lib/Net/Curl/examples.pod blib/lib/Net/Curl/examples.pod /home/ross/perl5/perlbrew/perls/perl-5.18.4/bin/perl /home/ross/perl5/ +perlbrew/perls/perl-5.18.4/lib/5.18.4/ExtUtils/xsubpp -typemap /home +/ross/perl5/perlbrew/perls/perl-5.18.4/lib/5.18.4/ExtUtils/typemap -t +ypemap typemap Curl.xs > Curl.xsc && mv Curl.xsc Curl.c cc -c -Wall -I/usr/include/x86_64-linux-gnu -O2 -DVERSION=\"0.37\" + -DXS_VERSION=\"0.37\" -fPIC "-I/home/ross/perl5/perlbrew/perls/perl- +5.18.4/lib/5.18.4/x86_64-linux/CORE" Curl.c Curl.xs: In function ‘perl_curl_constant_add’: Curl.xs:387:0: warning: ignoring #pragma clang diagnostic [-Wunknown-p +ragmas] #pragma clang diagnostic push Curl.xs:388:0: warning: ignoring #pragma clang diagnostic [-Wunknown-p +ragmas] #pragma clang diagnostic ignored "-Wunused-value" Curl.xs:390:0: warning: ignoring #pragma clang diagnostic [-Wunknown-p +ragmas] #pragma clang diagnostic pop In file included from Curl.xs:23:0: ./const-easy-xs.inc: In function ‘boot_Net__Curl’: const-defenums-h.inc:2267:24: error: ‘CURL_STRICTER’ undeclared (first + use in this function) # define CURL_STRICTER CURL_STRICTER ^ ./const-easy-xs.inc:678:27: note: in expansion of macro ‘CURL_STRICTER +’ { "CURL_STRICTER", 13, CURL_STRICTER }, ^~~~~~~~~~~~~ const-defenums-h.inc:2267:24: note: each undeclared identifier is repo +rted only once for each function it appears in # define CURL_STRICTER CURL_STRICTER ^ ./const-easy-xs.inc:678:27: note: in expansion of macro ‘CURL_STRICTER +’ { "CURL_STRICTER", 13, CURL_STRICTER }, ^~~~~~~~~~~~~ Makefile:369: recipe for target 'Curl.o' failed make: *** [Curl.o] Error 1 SYP/Net-Curl-0.37.tar.gz /usr/bin/make -- NOT OK 'YAML' not installed, will not store persistent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible
$ cpan install WWW::Curl::Easy Reading '/home/ross/.cpan/Metadata' Database was generated on Wed, 19 Apr 2017 22:53:51 GMT Running install for module 'WWW::Curl::Easy' Running make for S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz Checksum for /home/ross/.cpan/sources/authors/id/S/SZ/SZBALINT/WWW-Cur +l-4.17.tar.gz ok CPAN.pm: Building S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz Locating required external dependency bin:curl-config... found at /usr +/bin/curl-config. The version is libcurl 7.52.1 Cannot find curl.h - cannot build constants files - see Makefile.PL a +t Makefile.PL line 96. Warning: No success on command[/home/ross/perl5/perlbrew/perls/perl-5. +18.4/bin/perl Makefile.PL INSTALLDIRS=site] SZBALINT/WWW-Curl-4.17.tar.gz /home/ross/perl5/perlbrew/perls/perl-5.18.4/bin/perl Makefile.PL INS +TALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determi +ne prerequisites
$ cpan install XML::RSS Reading '/home/ross/.cpan/Metadata' Database was generated on Wed, 19 Apr 2017 22:53:51 GMT XML::RSS is up to date (1.59).
$ cpan install Role::Tiny Reading '/home/ross/.cpan/Metadata' Database was generated on Wed, 19 Apr 2017 22:53:51 GMT Role::Tiny is up to date (2.000005).
$ sudo apt-get install libwww-curl-perl Reading package lists... Done Building dependency tree Reading state information... Done libwww-curl-perl is already the newest version (4.17-4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get install libnet-curl-perl Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libnet-curl-perl

I've seen very few references to these online, but there have been a couple of patches described that sound like they ought to work, but I tried them and they didn't work. Which might say more about my not knowing what I'm doing than anything else.

Anyway, does anyknow know how I can get this working? I really don't know what else I can try. Thanks.

Replies are listed 'Best First'.
Re: cURL And XML breaking the install of a previosuly fine script
by marto (Cardinal) on Apr 20, 2017 at 13:20 UTC

      Yes, I found that, and I tried to follow it, adding the delete line into Makefile.PL, and then making based on that, but I saw no change in results, so either that doesn't work or I'm doing something wrong; I'm going to guess it's the latter. I can't find Curl.xs to try that fix.

      Also, if this was known and a patch written 6 months ago, why is the patch not in the release by now? I can't be the only person struggling with this...

        Curl.xs is contained in the distribution directory, see here. You should find it when you unpack the distribution tarball.

        I'm sure that if you review your SLA you have with the module author that you will find there the terms for approriate inclusion of patches. Most likely, you will also find there where and how to reach the authors hotline where you get support appropriate to your level of SLA.

        Maybe you're unaware that most of CPANs authors work on a voluntary basis and don't get paid, so your expectation that some fix be released within some specified frame of time seems a bit unreasonable. Usually, authors are receptive to some kind words though, so maybe you can ask the author how you could help them, or submit the changes as described in prose in the ticket as a pull request.

        Curl.xs is in the root directory of the distribution:

        marto:~$ cpanm --look Net::Curl::Easy <cpanm does stuff here....> marto:~/.cpanm/work/1492695425.31742/Net-Curl-0.37$ ls -al Curl.xs -rw-r--r-- 1 marto marto 12240 Feb 1 2015 Curl.xs
Re: cURL And XML breaking the install of a previosuly fine script
by Corion (Patriarch) on Apr 20, 2017 at 13:19 UTC

    Neither module installs for you, and they both seem to fail at the C compilation stage or the Makefile.PL stage. Maybe you can find something in the bug reports for each module (https://github.com/sparky/perl-Net-Curl/issues).

    If you're using Perlbrew, then installing Perl packages via your OS package manager will not help with your perlbrewed Perl.

      I was using perlbrew at one point; I brought it up as one of the things I'd tried in my search, but when I couldn't get any improvement out of it, I switched back to the stock perl.

Re: cURL And XML breaking the install of a previosuly fine script
by wintermute115 (Acolyte) on Apr 20, 2017 at 12:49 UTC

    To add, I installed perlbrew so I could run it under 5.18, but it didn't help.