Skip Menu |
 

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

Report information
The Basics
Id: 104690
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: goochmi [...] gmail.com
Cc:
AdminCc:

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



Subject: trying to obtain List::MoreUtils via cpan results in compiler error
Date: Mon, 25 May 2015 13:37:54 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 1.5k
Running Mkbootstrap for List::MoreUtils () chmod 644 MoreUtils.bs /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/bin/perl /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/ExtUtils/xsubpp -typemap /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/ExtUtils/typemap MoreUtils.xs > MoreUtils.xsc && mv MoreUtils.xsc MoreUtils.c g++ -c -I. -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"0.412\" -DXS_VERSION=\"0.412\" -fPIC "-I/UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/x86_64-linux-thread-multi-ld/CORE" MoreUtils.c MoreUtils.xs: In function ‘void XS_List__MoreUtils_ea_DESTROY(PerlInterpreter*, CV*)’: MoreUtils.xs:330:41: error: invalid conversion from ‘void*’ to ‘arrayeach_args*’ [-fpermissive] arrayeach_args *args = CvXSUBANY(code).any_ptr; ^ MoreUtils.xs: In function ‘void XS_List__MoreUtils_na_DESTROY(PerlInterpreter*, CV*)’: MoreUtils.xs:350:40: error: invalid conversion from ‘void*’ to ‘natatime_args*’ [-fpermissive] natatime_args *args = CvXSUBANY(code).any_ptr; ^ MoreUtils.c: In function ‘void XS_List__MoreUtils__array_iterator(PerlInterpreter*, CV*)’: MoreUtils.c:1545:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] method = ""; ^ make: *** [MoreUtils.o] Error 1 REHSACK/List-MoreUtils-0.412.tar.gz /usr/bin/make -- NOT OK
Subject: trying to obtain List::MoreUtils via cpan results in compiler error
Date: Mon, 25 May 2015 14:25:36 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 1.8k
it seems perl thinks it was built using g++ as its C compiler, which is related to this issue. I am attempting to rectify that. Show quoted text
-------- Forwarded Message -------- Subject: trying to obtain List::MoreUtils via cpan results in compiler error Date: Mon, 25 May 2015 13:37:54 -0400 From: Michael Gooch <goochmi@gmail.com> To: bug-List-MoreUtils@rt.cpan.org Running Mkbootstrap for List::MoreUtils () chmod 644 MoreUtils.bs /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/bin/perl /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/ExtUtils/xsubpp -typemap /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/ExtUtils/typemap MoreUtils.xs > MoreUtils.xsc && mv MoreUtils.xsc MoreUtils.c g++ -c -I. -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -DVERSION=\"0.412\" -DXS_VERSION=\"0.412\" -fPIC "-I/UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib/5.20.2/x86_64-linux-thread-multi-ld/CORE" MoreUtils.c MoreUtils.xs: In function ‘void XS_List__MoreUtils_ea_DESTROY(PerlInterpreter*, CV*)’: MoreUtils.xs:330:41: error: invalid conversion from ‘void*’ to ‘arrayeach_args*’ [-fpermissive] arrayeach_args *args = CvXSUBANY(code).any_ptr; ^ MoreUtils.xs: In function ‘void XS_List__MoreUtils_na_DESTROY(PerlInterpreter*, CV*)’: MoreUtils.xs:350:40: error: invalid conversion from ‘void*’ to ‘natatime_args*’ [-fpermissive] natatime_args *args = CvXSUBANY(code).any_ptr; ^ MoreUtils.c: In function ‘void XS_List__MoreUtils__array_iterator(PerlInterpreter*, CV*)’: MoreUtils.c:1545:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] method = ""; ^ make: *** [MoreUtils.o] Error 1 REHSACK/List-MoreUtils-0.412.tar.gz /usr/bin/make -- NOT OK
Subject: Re: [rt.cpan.org #104690] AutoReply: trying to obtain List::MoreUtils via cpan results in compiler error
Date: Mon, 25 May 2015 15:33:21 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 244b
if perl is compiled with a C++ compiler, the module assumes it should use the same compiler as perl, but does not tell the C++ compiler to use an old standard C instead of C++, and has errors related to pointer assignment without typecasts.
Subject: Re: [rt.cpan.org #104690] AutoReply: trying to obtain List::MoreUtils via cpan results in compiler error
Date: Mon, 25 May 2015 21:36:54 +0200
To: bug-List-MoreUtils [...] rt.cpan.org
From: Jens Rehsack <rehsack [...] gmail.com>
Download (untitled) / with headers
text/plain 680b
Show quoted text
> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List-MoreUtils@rt.cpan.org>: > > Queue: List-MoreUtils > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > > if perl is compiled with a C++ compiler, the module assumes it should > use the same compiler as perl, but does not tell the C++ compiler to use > an old standard C instead of C++, and has errors related to pointer > assignment without typecasts.
Understood. But in C you're permitted to cast any pointer to void * and vice versa. Using a c++ compiler (which is wrong in many ways for other reasons) can be avoided to run $ CC=gcc make Cheers -- Jens Rehsack - rehsack@gmail.com
Subject: Re: [rt.cpan.org #104690] AutoReply: trying to obtain List::MoreUtils via cpan results in compiler error
Date: Mon, 25 May 2015 19:07:05 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 1.1k
agreed which is why I ended up recompiling perl using gcc instead of g++. However this is one of VERY few modules that ran into this problem. I figured it odd enough to warrant pointing it out. Perhaps something could be done in the module setup to detect the situation and use the proper flag to have it use the C89 or C99 standards (i'm not sure which standard you're assuming here) On 05/25/2015 03:37 PM, Jens Rehsack via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > >
>> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List-MoreUtils@rt.cpan.org>: >> >> Queue: List-MoreUtils >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >> >> if perl is compiled with a C++ compiler, the module assumes it should >> use the same compiler as perl, but does not tell the C++ compiler to use >> an old standard C instead of C++, and has errors related to pointer >> assignment without typecasts.
> Understood. But in C you're permitted to cast any pointer to void * and vice versa. > Using a c++ compiler (which is wrong in many ways for other reasons) can be avoided to run > $ CC=gcc make > > Cheers
Download (untitled) / with headers
text/plain 1.7k
On Mon May 25 19:07:22 2015, goochmi@gmail.com wrote: Show quoted text
> agreed which is why I ended up recompiling perl using gcc instead of > g++. > > However this is one of VERY few modules that ran into this problem. I > figured it odd enough to warrant pointing it out. > > Perhaps something could be done in the module setup to detect the > situation
This sounds reasonable. There is a long thread at https://github.com/perl5-utils/List-MoreUtils/issues/11 about compiler verification framework for CPAN modules. For This particular issue I can add some checks to have_compiler() in Config::AutoConf. Show quoted text
> and use the proper flag to have it use the C89 or C99 > standards (i'm not sure which standard you're assuming here)
This is compiler specific. I can bail out with error. I'm not sure whether it's sane to invoke g++ with -std=c89 - and it'll work for gcc only. cl, iCC, aCC, CC (SunPro, MIPSpro, ...), xlC etc. will heavily fail using -std=c89 ;) Show quoted text
> On 05/25/2015 03:37 PM, Jens Rehsack via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > > > >
> >> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List- > >> MoreUtils@rt.cpan.org>: > >> > >> Queue: List-MoreUtils > >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > >> > >> if perl is compiled with a C++ compiler, the module assumes it > >> should > >> use the same compiler as perl, but does not tell the C++ compiler to > >> use > >> an old standard C instead of C++, and has errors related to pointer > >> assignment without typecasts.
> > Understood. But in C you're permitted to cast any pointer to void * > > and vice versa. > > Using a c++ compiler (which is wrong in many ways for other reasons) > > can be avoided to run > > $ CC=gcc make > > > > Cheers
Subject: Re: [rt.cpan.org #104690] trying to obtain List::MoreUtils via cpan results in compiler error
Date: Tue, 26 May 2015 13:30:05 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 2.4k
well noted. At least you're aware of the possibility that this can happen. The perl devs did put in specific checks in the Configure script that check if your c compiler is a C++ compiler or not, so its clear that even if its not the desired or expected compiler, that the system is built to deal with it if one is given. It is entirely reasonable therefore to suspect that taking the suggested C compiler without testing for sanity could cause issues if your code is written for ansi C standards. (its a pebkac issue, but still one that could arise). On 05/26/2015 12:47 AM, Jens Rehsack via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > > On Mon May 25 19:07:22 2015, goochmi@gmail.com wrote:
>> agreed which is why I ended up recompiling perl using gcc instead of >> g++. >> >> However this is one of VERY few modules that ran into this problem. I >> figured it odd enough to warrant pointing it out. >> >> Perhaps something could be done in the module setup to detect the >> situation
> This sounds reasonable. There is a long thread at https://github.com/perl5-utils/List-MoreUtils/issues/11 about compiler verification framework for CPAN modules. > > For This particular issue I can add some checks to have_compiler() in Config::AutoConf. >
>> and use the proper flag to have it use the C89 or C99 >> standards (i'm not sure which standard you're assuming here)
> This is compiler specific. I can bail out with error. I'm not sure whether it's sane to invoke g++ with -std=c89 - and it'll work for gcc only. cl, iCC, aCC, CC (SunPro, MIPSpro, ...), xlC etc. will heavily fail using -std=c89 ;) >
>> On 05/25/2015 03:37 PM, Jens Rehsack via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >>> >>>
>>>> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List- >>>> MoreUtils@rt.cpan.org>: >>>> >>>> Queue: List-MoreUtils >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >>>> >>>> if perl is compiled with a C++ compiler, the module assumes it >>>> should >>>> use the same compiler as perl, but does not tell the C++ compiler to >>>> use >>>> an old standard C instead of C++, and has errors related to pointer >>>> assignment without typecasts.
>>> Understood. But in C you're permitted to cast any pointer to void * >>> and vice versa. >>> Using a c++ compiler (which is wrong in many ways for other reasons) >>> can be avoided to run >>> $ CC=gcc make >>> >>> Cheers
> >
Download (untitled) / with headers
text/plain 3.1k
On Tue May 26 13:30:17 2015, goochmi@gmail.com wrote: Show quoted text
> well noted. At least you're aware of the possibility that this can > happen.
I should have been earlier, but you remembered me ;) The primary question is - would it help you enough to fail when the compiler isn't suitable (I could imagine on non-gcc-linux systems very weird late issues due c++ linking relics). How many XS modules did you have in your environment built using c++ compiler (when there're many - adding explicit casts to LMU and a warning might be more reasonable)? Show quoted text
> The perl devs did put in specific checks in the Configure script that > check if your c compiler is a C++ compiler or not, so its clear that > even if its not the desired or expected compiler, that the system is > built to deal with it if one is given. It is entirely reasonable > therefore to suspect that taking the suggested C compiler without > testing for sanity could cause issues if your code is written for ansi > C standards. (its a pebkac issue, but still one that could arise).
I'm pretty sure that's limited to a handful of compilers ... Generally I prefer the "die early" philosophy, not "try to layaway from fix to fix until it horribly dies". Cheers, Jens Show quoted text
> On 05/26/2015 12:47 AM, Jens Rehsack via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > > > > On Mon May 25 19:07:22 2015, goochmi@gmail.com wrote:
> >> agreed which is why I ended up recompiling perl using gcc instead of > >> g++. > >> > >> However this is one of VERY few modules that ran into this problem. > >> I > >> figured it odd enough to warrant pointing it out. > >> > >> Perhaps something could be done in the module setup to detect the > >> situation
> > This sounds reasonable. There is a long thread at > > https://github.com/perl5-utils/List-MoreUtils/issues/11 about > > compiler verification framework for CPAN modules. > > > > For This particular issue I can add some checks to have_compiler() in > > Config::AutoConf. > >
> >> and use the proper flag to have it use the C89 or C99 > >> standards (i'm not sure which standard you're assuming here)
> > This is compiler specific. I can bail out with error. I'm not sure > > whether it's sane to invoke g++ with -std=c89 - and it'll work for > > gcc only. cl, iCC, aCC, CC (SunPro, MIPSpro, ...), xlC etc. will > > heavily fail using -std=c89 ;) > >
> >> On 05/25/2015 03:37 PM, Jens Rehsack via RT wrote:
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > >>> > >>>
> >>>> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List- > >>>> MoreUtils@rt.cpan.org>: > >>>> > >>>> Queue: List-MoreUtils > >>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > >>>> > >>>> if perl is compiled with a C++ compiler, the module assumes it > >>>> should > >>>> use the same compiler as perl, but does not tell the C++ compiler > >>>> to > >>>> use > >>>> an old standard C instead of C++, and has errors related to > >>>> pointer > >>>> assignment without typecasts.
> >>> Understood. But in C you're permitted to cast any pointer to void * > >>> and vice versa. > >>> Using a c++ compiler (which is wrong in many ways for other > >>> reasons) > >>> can be avoided to run > >>> $ CC=gcc make > >>> > >>> Cheers
> > > >
Subject: Re: [rt.cpan.org #104690] trying to obtain List::MoreUtils via cpan results in compiler error
Date: Tue, 26 May 2015 16:43:45 -0400
To: bug-List-MoreUtils [...] rt.cpan.org
From: Michael Gooch <goochmi [...] gmail.com>
Download (untitled) / with headers
text/plain 4.6k
it was a fresh install after building perl, so I didn't have that many other than a few other dependencies. Yours was one my own scripts were using. I did build a handful of other things, but I didn't track which. I probably would have run into problems with other modules in the future had I not gone and rebuilt perl. // I'm pretty sure that's limited to a handful of compilers ... Generally I prefer the "die early" philosophy, not "try to layaway from fix to fix until it horribly dies". // I would generally agree, but if their codebase for the interpreter works just fine with c++, modules should prepare for the possibility too, or at the very least look for a C compiler alternative if they really can't handle the c++ compiler. gnu is probably somewhat more forgiving in this than some of the other ones out there. Failing is definitely better than pretending all is well if its not. However, the interpreter does work with the c++ compiler, so until such time as they decide to fail perl compilation with such compilers, this is a potential problem that all modules may face at some low level of incidence. in my case it was easily fixed by rebuilding perl using gcc, as using g++ had been an error in my opinion in the first place, other cases might not be so easily dealt with if the users don't have control of the deployment, but may still have a local cpan. On 05/26/2015 01:44 PM, Jens Rehsack via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > > > On Tue May 26 13:30:17 2015, goochmi@gmail.com wrote:
>> well noted. At least you're aware of the possibility that this can >> happen.
> I should have been earlier, but you remembered me ;) > The primary question is - would it help you enough to fail when the compiler isn't suitable (I could imagine on non-gcc-linux systems very weird late issues due c++ linking relics). > > How many XS modules did you have in your environment built using c++ compiler (when there're many - adding explicit casts to LMU and a warning might be more reasonable)? >
>> The perl devs did put in specific checks in the Configure script that >> check if your c compiler is a C++ compiler or not, so its clear that >> even if its not the desired or expected compiler, that the system is >> built to deal with it if one is given. It is entirely reasonable >> therefore to suspect that taking the suggested C compiler without >> testing for sanity could cause issues if your code is written for ansi >> C standards. (its a pebkac issue, but still one that could arise).
> I'm pretty sure that's limited to a handful of compilers ... > Generally I prefer the "die early" philosophy, not "try to layaway from fix to fix until it horribly dies". > > Cheers, > Jens >
>> On 05/26/2015 12:47 AM, Jens Rehsack via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >>> >>> On Mon May 25 19:07:22 2015, goochmi@gmail.com wrote:
>>>> agreed which is why I ended up recompiling perl using gcc instead of >>>> g++. >>>> >>>> However this is one of VERY few modules that ran into this problem. >>>> I >>>> figured it odd enough to warrant pointing it out. >>>> >>>> Perhaps something could be done in the module setup to detect the >>>> situation
>>> This sounds reasonable. There is a long thread at >>> https://github.com/perl5-utils/List-MoreUtils/issues/11 about >>> compiler verification framework for CPAN modules. >>> >>> For This particular issue I can add some checks to have_compiler() in >>> Config::AutoConf. >>>
>>>> and use the proper flag to have it use the C89 or C99 >>>> standards (i'm not sure which standard you're assuming here)
>>> This is compiler specific. I can bail out with error. I'm not sure >>> whether it's sane to invoke g++ with -std=c89 - and it'll work for >>> gcc only. cl, iCC, aCC, CC (SunPro, MIPSpro, ...), xlC etc. will >>> heavily fail using -std=c89 ;) >>>
>>>> On 05/25/2015 03:37 PM, Jens Rehsack via RT wrote:
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >>>>> >>>>>
>>>>>> Am 25.05.2015 um 21:33 schrieb Michael Gooch via RT <bug-List- >>>>>> MoreUtils@rt.cpan.org>: >>>>>> >>>>>> Queue: List-MoreUtils >>>>>> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104690 > >>>>>> >>>>>> if perl is compiled with a C++ compiler, the module assumes it >>>>>> should >>>>>> use the same compiler as perl, but does not tell the C++ compiler >>>>>> to >>>>>> use >>>>>> an old standard C instead of C++, and has errors related to >>>>>> pointer >>>>>> assignment without typecasts.
>>>>> Understood. But in C you're permitted to cast any pointer to void * >>>>> and vice versa. >>>>> Using a c++ compiler (which is wrong in many ways for other >>>>> reasons) >>>>> can be avoided to run >>>>> $ CC=gcc make >>>>> >>>>> Cheers
>>>
> >


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.