Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 113180
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: davem [...] iabyn.com
Cc:
AdminCc:

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



Subject: Scalar-List-Utils 1.44 won't build on blead
Date: Sat, 19 Mar 2016 13:29:16 +0000
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 3.1k
I Just tried pulling 1.44 into blead and it failed to compile under blead's fairly fascist compiler options. The attached patch fixes the couple of trivial issues. Here's the original warnings and errors: In file included from ../../perl.h:5609:0, from ListUtil.xs:7: ListUtil.xs: In function ‘XS_List__Util_uniq’: ../../embed.h:222:36: warning: request for implicit conversion from ‘void *’ to ‘HE * {aka struct he *}’ not permitted in C++ [-Wc++-compat] #define hv_common(a,b,c,d,e,f,g,h) Perl_hv_common(aTHX_ a,b,c,d,e,f,g,h) ^ ListUtil.xs:1046:22: note: in expansion of macro ‘hv_common’ HE* he = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ ListUtil.xs:1046:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] HE* he = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ In file included from ../../perl.h:5609:0, from ListUtil.xs:7: ../../embed.h:222:36: warning: request for implicit conversion from ‘void *’ to ‘HE * {aka struct he *}’ not permitted in C++ [-Wc++-compat] #define hv_common(a,b,c,d,e,f,g,h) Perl_hv_common(aTHX_ a,b,c,d,e,f,g,h) ^ ListUtil.xs:1066:22: note: in expansion of macro ‘hv_common’ HE* he = hv_common(seen, args[index], NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ cc1: some warnings being treated as errors make[1]: *** [ListUtil.o] Error 1 Processing hints file hints/linux.pl Processing hints file hints/linux.pl In file included from ../../perl.h:5609:0, from ListUtil.xs:7: ListUtil.xs: In function ‘XS_List__Util_uniq’: ../../embed.h:222:36: warning: request for implicit conversion from ‘void *’ to ‘HE * {aka struct he *}’ not permitted in C++ [-Wc++-compat] #define hv_common(a,b,c,d,e,f,g,h) Perl_hv_common(aTHX_ a,b,c,d,e,f,g,h) ^ ListUtil.xs:1046:22: note: in expansion of macro ‘hv_common’ HE* he = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ ListUtil.xs:1046:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] HE* he = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ In file included from ../../perl.h:5609:0, from ListUtil.xs:7: ../../embed.h:222:36: warning: request for implicit conversion from ‘void *’ to ‘HE * {aka struct he *}’ not permitted in C++ [-Wc++-compat] #define hv_common(a,b,c,d,e,f,g,h) Perl_hv_common(aTHX_ a,b,c,d,e,f,g,h) ^ ListUtil.xs:1066:22: note: in expansion of macro ‘hv_common’ HE* he = hv_common(seen, args[index], NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); ^ -- Standards (n). Battle insignia or tribal totems.
Download slu.diff
text/x-diff 1.7k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 598b
On Sat Mar 19 09:29:34 2016, davem@iabyn.com wrote: Show quoted text
> I Just tried pulling 1.44 into blead and it failed to compile under > blead's fairly fascist compiler options.
OK I'll take a look. One thing though - I didn't think it was still possible to pull CPAN modules into core now, because of the 5.24 freeze? S-L-U 1.44 isn't suitable for core as it turns out, because of issues with the new uniq() function; I'm hoping to get a 1.45 out soon to fix that anyway. So thanks for the bug report and I'll be sure to fix it, but it would be best if you didn't pull S-L-U 1.44 into core. -- Paul Evans
Subject: Re: [rt.cpan.org #113180] Scalar-List-Utils 1.44 won't build on blead
Date: Sat, 19 Mar 2016 15:03:01 +0000
To: Paul Evans via RT <bug-Scalar-List-Utils [...] rt.cpan.org>
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 1018b
On Sat, Mar 19, 2016 at 10:09:36AM -0400, Paul Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=113180 > > > On Sat Mar 19 09:29:34 2016, davem@iabyn.com wrote:
> > I Just tried pulling 1.44 into blead and it failed to compile under > > blead's fairly fascist compiler options.
> > OK I'll take a look. > > One thing though - I didn't think it was still possible to pull CPAN modules into core now, because of the 5.24 freeze? S-L-U 1.44 isn't suitable for core as it turns out, because of issues with the new uniq() function; I'm hoping to get a 1.45 out soon to fix that anyway. > > So thanks for the bug report and I'll be sure to fix it, but it would be > best if you didn't pull S-L-U 1.44 into core.
Well, core is currently a bit unsatisfactory too, since it has a couple of point patches, is at unofficial version 1.42_02, and produces a number of compiler warnings during build. -- It's not that I'm afraid to die, I just don't want to be there when it happens. -- Woody Allen
Download (untitled) / with headers
text/plain 341b
On Sat Mar 19 11:03:14 2016, davem@iabyn.com wrote: Show quoted text
> Well, core is currently a bit unsatisfactory too, since it has a > couple > of point patches, is at unofficial version 1.42_02, and produces a > number > of compiler warnings during build.
Hmm. Is stock CPAN 1.43 suitable? Still later than 1.42_02 but predates the uniq -- Paul Evans
Subject: Re: [rt.cpan.org #113180] Scalar-List-Utils 1.44 won't build on blead
Date: Sat, 19 Mar 2016 15:28:17 +0000
To: Paul Evans via RT <bug-Scalar-List-Utils [...] rt.cpan.org>
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 739b
On Sat, Mar 19, 2016 at 11:17:02AM -0400, Paul Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=113180 > > > On Sat Mar 19 11:03:14 2016, davem@iabyn.com wrote:
> > Well, core is currently a bit unsatisfactory too, since it has a > > couple > > of point patches, is at unofficial version 1.42_02, and produces a > > number > > of compiler warnings during build.
> > Hmm. Is stock CPAN 1.43 suitable? Still later than 1.42_02 but predates the uniq
No, it has all the PERL_UNUSED_VAR(newsp);, which are now a comple error under blead :-( -- The crew of the Enterprise encounter an alien life form which is surprisingly neither humanoid nor made from pure energy. -- Things That Never Happen in "Star Trek" #22
Download (untitled) / with headers
text/plain 319b
On Sat Mar 19 09:29:34 2016, davem@iabyn.com wrote: Show quoted text
> I Just tried pulling 1.44 into blead and it failed to compile under > blead's fairly fascist compiler options.
Those fascist compiler options make sense. The first error prevents C++ compilers from compiling, the second MSVC Attached is my patch -- Reini Urban
Subject: Scalar-List-Utils-blead.patch
diff --git cpan/Scalar-List-Utils/ListUtil.xs cpan/Scalar-List-Utils/ListUtil.xs index 9b0384a..bce9933 100644 --- cpan/Scalar-List-Utils/ListUtil.xs +++ cpan/Scalar-List-Utils/ListUtil.xs @@ -1049,11 +1049,14 @@ CODE: else sv_setpvf(keysv, "%"NVgf, SvNV(arg)); #ifdef HV_FETCH_EMPTY_HE - HE* he = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); - if (HeVAL(he)) + { + void *ptr = hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, + HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); + HE* he = INT2PTR(HE*, ptr); + if (HeVAL(he)) continue; - - HeVAL(he) = &PL_sv_undef; + HeVAL(he) = &PL_sv_undef; + } #else if(hv_exists(seen, SvPVX(keysv), SvCUR(keysv))) continue; @@ -1090,11 +1093,14 @@ CODE: continue; } #ifdef HV_FETCH_EMPTY_HE - HE* he = hv_common(seen, arg, NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); - if (HeVAL(he)) + { + void *ptr = hv_common(seen, arg, NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0); + HE* he = INT2PTR(HE*, ptr); + if (HeVAL(he)) continue; - HeVAL(he) = &PL_sv_undef; + HeVAL(he) = &PL_sv_undef; + } #else if (hv_exists_ent(seen, arg, 0)) continue;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.