Skip Menu |

This queue is for tickets about the WWW-Curl CPAN distribution.

Report information
The Basics
Id: 117793
Status: open
Priority: 0/
Queue: WWW-Curl

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 4.17
Fixed in: (no value)



Subject: 'CURL_STRICTER' undeclared with curl-7.50.2
Building WWW-Curl-4.17 against curl-7.50.2 fails like this: Found curl.h in /usr/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 [...] 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 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib/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:128:49: error: 'CURL_STRICTER' undeclared (first use in this function) if (strEQ(name, "STRICTER")) return CURL_STRICTER; ^~~~~~~~~~~~~ This is caused by upgrading curl from 7.50.1 to 7.50.2 that added this into curl.h: +#ifdef CURL_NO_OLDIES +#define CURL_STRICTER +#endif + It looks like the curlopt-constants.c generators thinks CURL_STRICTER is a new constant.
From: ppisar [...] redhat.com
I believe the CURL_STRICTER should not be available from the Perl binding as this as preprocessor macro without a value. Attached patch removes it from the curl-constants.c.
Subject: WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch
From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Mon, 12 Sep 2016 14:40:44 +0200 Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CURL_STRICTER leaked into curl-constants.c when building against curl-7.50.2. This is a preprocessor only macro without a value. CPAN RT#117793 Signed-off-by: Petr Písař <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|_LASTENTRY\z)/) { next; } my ($group) = $e =~ m/^([^_]+_)/; -- 2.7.4
Another stray symbol needs to be excluded for curl-7.52.1: CURL_DID_MEMORY_FUNC_TYPEDEFS
On 2017-04-09 11:39:20, https://me.yahoo.com/howdidwegetherereally#f714d wrote: Show quoted text
> Another stray symbol needs to be excluded for curl-7.52.1: > CURL_DID_MEMORY_FUNC_TYPEDEFS
This is now part of a revised patch: http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/WWW-Curl-4.17-RT117793.patch
On Mon Sep 12 08:05:17 2016, ppisar wrote: Show quoted text
> Building WWW-Curl-4.17 against curl-7.50.2 fails like this: > > Found curl.h in /usr/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 > [...] > 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 -m32 > -march=i686 -mtune=atom -fasynchronous-unwind-tables -fwrapv -fno- > strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 > -mtune=atom -fasynchronous-unwind-tables -DVERSION=\"4.17\" > -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib/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:128:49: error: 'CURL_STRICTER' undeclared (first > use in this function) > if (strEQ(name, "STRICTER")) return CURL_STRICTER; > ^~~~~~~~~~~~~ > > This is caused by upgrading curl from 7.50.1 to 7.50.2 that added this > into curl.h: > > +#ifdef CURL_NO_OLDIES > +#define CURL_STRICTER > +#endif > + > > It looks like the curlopt-constants.c generators thinks CURL_STRICTER > is a new constant.
This is still present. Here is a log of an attempt to install this distribution via 'cpanm' on FreeBSD-11.0 against perl-5.27.10 and curl 7.57.0, compiling with clang 3.8.0: ##### { author => "SZBALINT", dist => "WWW-Curl", distname => "WWW-Curl-4.17", distversion => 4.17, grade => "FAIL", prereqs => undef, test_output => [ "Building and testing WWW-Curl-4.17", "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.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 ()", "chmod 644 \"Curl.bs\"", "\"/usr/home/jkeenan/prep528/testing/perl-5.27.10/bin/perl\" \"-Iinc\" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644", "\"/usr/home/jkeenan/prep528/testing/perl-5.27.10/bin/perl\" \"-Iinc\" \"/home/jkeenan/prep528/testing/perl-5.27.10/lib/5.27.10/ExtUtils/xsubpp\" -typemap '/home/jkeenan/prep528/testing/perl-5.27.10/lib/5.27.10/ExtUtils/typemap' -typemap '/usr/home/jkeenan/prep528/testing/perl-5.27.10/.cpanm/work/1521735236.757/WWW-Curl-4.17/typemap' Curl.xs > Curl.xsc", "mv Curl.xsc Curl.c", "cc -c -I/usr/local/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing -DVERSION=\\\"4.17\\\" -DXS_VERSION=\\\"4.17\\\" -DPIC -fPIC \"-I/home/jkeenan/prep528/testing/perl-5.27.10/lib/5.27.10/amd64-freebsd-thread-multi/CORE\" Curl.c", "In file included from Curl.xs:574:", "./curlopt-constants.c:19:58: error: non-void function 'constant' should return a value [-Wreturn-type]", " if (strEQ(name, \"DID_MEMORY_FUNC_TYPEDEFS\")) return CURL_DID_MEMORY_FUNC_TYPEDEFS;", " ^", "./curlopt-constants.c:136:49: error: use of undeclared identifier 'CURL_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 18446744073709551615 to -1 [-Wconstant-conversion]", " if (strEQ(name, \"ZERO_TERMINATED\")) return CURL_ZERO_TERMINATED;", " ~~~~~~ ^~~~~~~~~~~~~~~~~~~~", "/usr/local/include/curl/curl.h:1966:31: note: expanded from macro 'CURL_ZERO_TERMINATED'", "#define CURL_ZERO_TERMINATED ((size_t) -1)", " ^~~~~~~~~~~", "In file included from Curl.xs:574:", "./curlopt-constants.c:2141:44: warning: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551599 to -17 [-Wconstant-conversion]", " if (strEQ(name, \"ANY\")) return CURLAUTH_ANY;", " ~~~~~~ ^~~~~~~~~~~~", "/usr/local/include/curl/curl.h:708:32: note: expanded from macro 'CURLAUTH_ANY'", "#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)", " ^~~~~~~~~~~~~~~~~~~", "In file included from Curl.xs:574:", "./curlopt-constants.c:2142:48: warning: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551598 to -18 [-Wconstant-conversion]", " if (strEQ(name, \"ANYSAFE\")) return CURLAUTH_ANYSAFE;", " ~~~~~~ ^~~~~~~~~~~~~~~~", "/usr/local/include/curl/curl.h:709:32: note: expanded from macro 'CURLAUTH_ANYSAFE'", "#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))", " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "Curl.xs:1100:26: warning: implicit conversion from enumeration type 'CURLINFO' to different enumeration type 'CURLoption' [-Wenum-conversion]", " curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL);", " ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~", "/usr/local/include/curl/curl.h:2741:68: note: expanded from macro 'curl_easy_setopt'", "#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)", " ~~~~~~~~~~~~~~~~ ^~~", "4 warnings and 2 errors generated.", "*** Error code 1", "", "Stop.", "make: stopped in /testing/perl-5.27.10/.cpanm/work/1521735236.757/WWW-Curl-4.17", "-> FAIL Installing WWW::Curl failed. See /testing/perl-5.27.10/.cpanm/work/1521735236.757/build.log for details. Retry with --force to force install it.", ], via => "App::cpanminus::reporter 0.17 (1.7043)", } ##### Thank you very much. Jim Keenan
On Mon Sep 12 08:05:17 2016, ppisar wrote: Show quoted text
> Building WWW-Curl-4.17 against curl-7.50.2 fails like this: > > Found curl.h in /usr/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 > [...] > 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 -m32 > -march=i686 -mtune=atom -fasynchronous-unwind-tables -fwrapv -fno- > strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 > -mtune=atom -fasynchronous-unwind-tables -DVERSION=\"4.17\" > -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib/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:128:49: error: 'CURL_STRICTER' undeclared (first > use in this function) > if (strEQ(name, "STRICTER")) return CURL_STRICTER; > ^~~~~~~~~~~~~ > > This is caused by upgrading curl from 7.50.1 to 7.50.2 that added this > into curl.h: > > +#ifdef CURL_NO_OLDIES > +#define CURL_STRICTER > +#endif > + > > It looks like the curlopt-constants.c generators thinks CURL_STRICTER > is a new constant.
I observe similar error output today while attempting to install WWW::Curl against perl-5.27.11 on FreeBSD-11.1: ##### $ cat build.log cpanm (App::cpanminus) 1.7044 on perl 5.027011 built for amd64-freebsd Work directory is /usr/home/jkeenan/var/tad/testing/perl-5.27.11/.cpanm/work/1526750173.4924 You have make /usr/bin/make You have LWP 6.33 You have /usr/bin/tar: bsdtar 3.3.1 - libarchive 3.3.1 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 You have /usr/bin/unzip Searching WWW::Curl () on cpanmetadb ... --> Working on WWW::Curl Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz -> OK Unpacking WWW-Curl-4.17.tar.gz Entering WWW-Curl-4.17 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34) Configuring WWW-Curl-4.17 Running Makefile.PL Locating required external dependency bin:curl-config... found at /usr/local/bin/curl-config. The version is libcurl 7.59.0 Found curl.h in /usr/local/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 Generating a Unix-style Makefile Writing Makefile for WWW::Curl Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34) Building and testing WWW-Curl-4.17 cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.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/Multi.pm blib/lib/WWW/Curl/Multi.pm Running Mkbootstrap for Curl () chmod 644 "Curl.bs" "/usr/home/jkeenan/var/tad/testing/perl-5.27.11/bin/perl5.27.11" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644 "/usr/home/jkeenan/var/tad/testing/perl-5.27.11/bin/perl5.27.11" "-Iinc" "/usr/home/jkeenan/var/tad/testing/perl-5.27.11/lib/5.27.11/ExtUtils/xsubpp" -typemap '/usr/home/jkeenan/var/tad/testing/perl-5.27.11/lib/5.27.11/ExtUtils/typemap' -typemap '/usr/home/jkeenan/var/tad/testing/perl-5.27.11/.cpanm/work/1526750173.4924/WWW-Curl-4.17/typemap' Curl.xs > Curl.xsc mv Curl.xsc Curl.c cc -c -I/usr/local/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -DPIC -fPIC "-I/usr/home/jkeenan/var/tad/testing/perl-5.27.11/lib/5.27.11/amd64-freebsd/CORE" Curl.c In file included from Curl.xs:574: ./curlopt-constants.c:19:58: error: non-void function 'constant' should return a value [-Wreturn-type] if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_DID_MEMORY_FUNC_TYPEDEFS; ^ ./curlopt-constants.c:137:49: error: use of undeclared identifier 'CURL_STRICTER' if (strEQ(name, "STRICTER")) return CURL_STRICTER; ^ ./curlopt-constants.c:180:56: warning: implicit conversion from 'size_t' (aka 'unsigned long') to 'int' changes value from 18446744073709551615 to -1 [-Wconstant-conversion] if (strEQ(name, "ZERO_TERMINATED")) return CURL_ZERO_TERMINATED; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~ /usr/local/include/curl/curl.h:1991:31: note: expanded from macro 'CURL_ZERO_TERMINATED' #define CURL_ZERO_TERMINATED ((size_t) -1) ^~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2154:44: warning: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551599 to -17 [-Wconstant-conversion] if (strEQ(name, "ANY")) return CURLAUTH_ANY; ~~~~~~ ^~~~~~~~~~~~ /usr/local/include/curl/curl.h:712:32: note: expanded from macro 'CURLAUTH_ANY' #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) ^~~~~~~~~~~~~~~~~~~ In file included from Curl.xs:574: ./curlopt-constants.c:2155:48: warning: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551598 to -18 [-Wconstant-conversion] if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE; ~~~~~~ ^~~~~~~~~~~~~~~~ /usr/local/include/curl/curl.h:713:32: note: expanded from macro 'CURLAUTH_ANYSAFE' #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Curl.xs:1100:26: warning: implicit conversion from enumeration type 'CURLINFO' to different enumeration type 'CURLoption' [-Wenum-conversion] curl_easy_setopt(easy, CURLINFO_PRIVATE, NULL); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/curl/curl.h:2767:68: note: expanded from macro 'curl_easy_setopt' #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) ~~~~~~~~~~~~~~~~ ^~~ 4 warnings and 2 errors generated. *** Error code 1 Stop. make: stopped in /usr/home/jkeenan/var/tad/testing/perl-5.27.11/.cpanm/work/1526750173.4924/WWW-Curl-4.17 -> FAIL Installing WWW::Curl failed. ##### Thank you very much. Jim Keenan
On 2017-04-16 16:26:25, SREZIC wrote: Show quoted text
> On 2017-04-09 11:39:20, > https://me.yahoo.com/howdidwegetherereally#f714d wrote:
> > Another stray symbol needs to be excluded for curl-7.52.1: > > CURL_DID_MEMORY_FUNC_TYPEDEFS
> > This is now part of a revised patch: > http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/WWW-Curl- > 4.17-RT117793.patch
This patch also works on osx (currently at curl 7.54.0).