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
>>>
>
>