New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile failure with recent >=curl-7.50.2 #18

Closed
ferki opened this Issue Oct 20, 2016 · 7 comments

Comments

Projects
None yet
6 participants
@ferki
Copy link
Contributor

ferki commented Oct 20, 2016

cpanm Net::Curl::Easyfails with:

cc -c   -Wall  -O2   -DVERSION=\"0.37\" -DXS_VERSION=\"0.37\" -fPIC "-I/home/ferki/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/CORE"   Curl.c
Curl.xs: In function ‘perl_curl_constant_add’:
Curl.xs:387:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #pragma clang diagnostic push
 ^
Curl.xs:388:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #pragma clang diagnostic ignored "-Wunused-value"
 ^
Curl.xs:390:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #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:2195:24: error: ‘CURL_STRICTER’ undeclared (first use in this function)
 # define CURL_STRICTER CURL_STRICTER
                        ^
./const-easy-xs.inc:654:27: note: in expansion of macro ‘CURL_STRICTER’
    { "CURL_STRICTER", 13, CURL_STRICTER },
                           ^
const-defenums-h.inc:2195:24: note: each undeclared identifier is reported only once for each function it appears in
 # define CURL_STRICTER CURL_STRICTER
                        ^
./const-easy-xs.inc:654:27: note: in expansion of macro ‘CURL_STRICTER’
    { "CURL_STRICTER", 13, CURL_STRICTER },
                           ^
Makefile:360: recipe for target 'Curl.o' failed
make: *** [Curl.o] Error 1

I have curl-7.50.3 installed and CURL_STRICTER seems to have been removed added in 7.50.2.

@Tux

This comment has been minimized.

Copy link
Contributor

Tux commented Oct 23, 2016

A quick fix

--- Makefile.PL.org 2016-10-23 12:35:14.505862918 +0200
+++ Makefile.PL     2016-10-23 12:35:17.153874373 +0200
@@ -310,6 +310,7 @@ sub get_constants_headers
                }
                close H;
        }
+       delete $syms{CURL_STRICTER};

        my @out;
        foreach my $e (sort keys %syms) {

That helped with my environment

curl-7.50.3-1.1.x86_64
libcurl-devel-7.50.3-1.1.x86_64
@ferki

This comment has been minimized.

Copy link
Contributor Author

ferki commented Oct 23, 2016

Credit time! \o/

Thanks for the tip @Tux! @roa also suggested a similar approach. Based on those info, and the Gentoo patch for WWW::Curl by @trofi, I could come up with a PR that tries to help avoiding similar issues in the future (I believe :).

@david-geiger

This comment has been minimized.

Copy link

david-geiger commented Jan 18, 2017

Another quick fix is to simply defined the missing CURL_STRICTER:

--- a/Curl.xs	2015-02-01 10:20:35.000000000 +0100
+++ b/Curl.xs	2016-09-13 20:25:55.817079943 +0200
@@ -13,6 +13,7 @@
  * the MIT/X-derivate licenses. You may pick one of these licenses.
  */
 #define PERL_NO_GET_CONTEXT
+#define CURL_STRICTER
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
@gypark

This comment has been minimized.

Copy link

gypark commented May 18, 2017

I wish new version of Net::Curl containing this fix be released on CPAN...

Of course I can install by running cpan program, applying patch and then building. But I'm using carton to build modules for my project and I could not find a way to patch manually with carton.

@oschwald

This comment has been minimized.

Copy link

oschwald commented Jul 24, 2017

@sparky, would you be willing to give someone else co-maint on this so that they could do a release with the fix?

@creaktive creaktive closed this in c25ffe2 Jul 25, 2017

creaktive added a commit that referenced this issue Jul 25, 2017

Merge pull request #19 from ferki/constants_without_values
Fix handling of constants without values (fix #18)
@creaktive

This comment has been minimized.

Copy link
Collaborator

creaktive commented Jul 26, 2017

@oschwald @gypark oh wait, I am a co-maint! Sorry for long negligence, release done!

@oschwald

This comment has been minimized.

Copy link

oschwald commented Jul 26, 2017

@creaktive, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment