Skip Menu |

This queue is for tickets about the Class-XSAccessor-Array CPAN distribution.

Report information
The Basics
Id: 41104
Status: resolved
Priority: 0/
Queue: Class-XSAccessor-Array

People
Owner: Nobody in particular
Requestors: matt [...] monki.org.uk
Cc:
AdminCc:

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



Subject: Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Thu, 20 Nov 2008 20:33:51 +0000
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: "Matt Willsher" <matt [...] monki.org.uk>
Hi, I've been trying to install 0.05 on OpenSolaris against the version of Perl supplied (v5.8.4 built for i86pc-solaris-64int). The error I get is given below and appears, to my untrained eyes, to be the same as that reported at: http://www.nntp.perl.org/group/perl.cpan.testers/2008/09/msg2124554.html I hope you are able to find the time to fix this, if it is indeed a problem with XSAccessor::Array rather than Sun's Perl. Thanks for your time, Matt /usr/bin/perl -MAutoXS::Header -e AutoXS::Header::WriteAutoXSHeader cc -c -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"0.05\" -DXS_VERSION=\"0.05\" -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE" Array.c "Array.xs", line 123: syntax error before or at: if "Array.xs", line 123: syntax error before or at: : "Array.xs", line 123: syntax error before or at: else "Array.xs", line 125: warning: syntax error: empty declaration "Array.xs", line 125: warning: syntax error: empty declaration "Array.c", line 196: warning: old-style declaration or incorrect type for: PL_stack_sp "Array.c", line 196: identifier redeclared: PL_stack_sp current : int previous: pointer to pointer to struct sv {pointer to void sv_any, unsigned long sv_refcnt, unsigned long sv_flags} : "/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE/thrdvar.h", line 34 "Array.c", line 196: undefined symbol: sp "Array.c", line 196: non-constant initializer: op "NAME" "Array.c", line 197: syntax error before or at: return "Array.c", line 197: warning: syntax error: empty declaration "Array.c", line 204: warning: improper pointer/integer combination: op "=" "Array.c", line 226: warning: improper pointer/integer combination: op "=" "Array.c", line 234: warning: improper pointer/integer combination: op "=" "Array.c", line 260: warning: improper pointer/integer combination: op "=" "Array.c", line 268: warning: improper pointer/integer combination: op "=" "Array.c", line 294: warning: improper pointer/integer combination: op "=" "Array.c", line 302: warning: improper pointer/integer combination: op "=" "Array.c", line 324: warning: improper pointer/integer combination: op "=" "Array.c", line 335: warning: improper pointer/integer combination: op "=" "Array.c", line 350: warning: improper pointer/integer combination: op "=" cc: acomp failed for Array.c *** Error code 2 make: Fatal error: Command failed for target `Array.o'
Subject: Re: [rt.cpan.org #41104] Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Fri, 21 Nov 2008 09:24:51 +0100
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi Matt, Matt Willsher via RT wrote: Show quoted text
> Queue: Class-XSAccessor-Array > Subject: Compilation issue on OpenSolaris 2008.11 against provided Perl
Show quoted text
> I've been trying to install 0.05 on OpenSolaris against the version of > Perl supplied (v5.8.4 built for i86pc-solaris-64int). The error I get > is given below and appears, to my untrained eyes, to be the same as > that reported at: > http://www.nntp.perl.org/group/perl.cpan.testers/2008/09/msg2124554.html > > I hope you are able to find the time to fix this, if it is indeed a > problem with XSAccessor::Array rather than Sun's Perl.
[...] Show quoted text
> /usr/bin/perl -MAutoXS::Header -e AutoXS::Header::WriteAutoXSHeader > cc -c -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO > -xO3 -xspace -xildoff -DVERSION=\"0.05\" -DXS_VERSION=\"0.05\" > -KPIC "-I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE" Array.c > "Array.xs", line 123: syntax error before or at: if > "Array.xs", line 123: syntax error before or at: : > "Array.xs", line 123: syntax error before or at: else
I'm sorry, but I have no idea. The line in question looks innocent enough and certainly not like a syntax error. Maybe looking at the corresponding line in the generated Array.c sheds some light, but I somewhat doubt it. Maybe this is an incompatibility with the ancient version of perl you're using? (I mean, seriously, these people ship 5.8.4 with a distribution that's supposed to be current? What a joke! Okay, sorry, not your fault.) Can you try compiling a modern perl yourself and checking whether the module works there? Sorry I can be of little help. Best regards, Steffen
Subject: Re: [rt.cpan.org #41104] Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Fri, 21 Nov 2008 09:35:42 +0100
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi Matt, seems I was a little too quick in pointing at the ancient perl. In some cases, newer perls also fail, so it can't be just that. http://www.nntp.perl.org/group/perl.cpan.testers/2008/09/msg2127765.html http://www.nntp.perl.org/group/perl.cpan.testers/2008/08/msg2119318.html Best regards, Steffen
Subject: Re: [rt.cpan.org #41104] Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Fri, 21 Nov 2008 10:04:35 +0100
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi Matt, me again! Could you try the distribution with a potential fix at http://steffen-mueller.net/tmp/Class-XSAccessor-Array-0.05_01.tar.gz? Best regards, Steffen
Subject: Re: [rt.cpan.org #41104] Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Fri, 21 Nov 2008 10:38:18 +0000
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: "Matt Willsher" <matt [...] monki.org.uk>
On Fri, Nov 21, 2008 at 8:25 AM, Steffen Mueller via RT <bug-Class-XSAccessor-Array@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=41104 > > I'm sorry, but I have no idea. The line in question looks innocent > enough and certainly not like a syntax error. Maybe looking at the > corresponding line in the generated Array.c sheds some light, but I > somewhat doubt it. > > Maybe this is an incompatibility with the ancient version of perl you're > using? (I mean, seriously, these people ship 5.8.4 with a distribution > that's supposed to be current? What a joke! Okay, sorry, not your > fault.) Can you try compiling a modern perl yourself and checking > whether the module works there? > > Sorry I can be of little help.
Hi Steffen, Thanks for the reply. After posting this problem I compiled 5.10 from source and I get the same problem when installing this module (same error with Class::XSAccessor). In all cases I'm using Sun's cc. As the error appeared on 123 I replaced it as follows: SvOK( elem[0] ) ? XSRETURN_YES : XSRETURN_NO; with if ( SvOK(elem[0]) ) { XSRETURN_YES; } else { XSRETURN_NO; } and lo and behold it compiles and tests ok. Looks odd to me that is works the second way (unless I've made a silly mistake - it's been many years since I did any C) Regards, Matt
Subject: Re: [rt.cpan.org #41104] Compilation issue on OpenSolaris 2008.11 against provided Perl
Date: Fri, 21 Nov 2008 12:14:27 +0100
To: bug-Class-XSAccessor-Array [...] rt.cpan.org
From: Steffen Mueller <smueller [...] cpan.org>
Hi Matt, Matt Willsher via RT wrote: Show quoted text
> Thanks for the reply. After posting this problem I compiled 5.10 from > source and I get the same problem when installing this module (same > error with Class::XSAccessor). In all cases I'm using Sun's cc.
Turns out Sun's cc is either stricter than gcc or has a deficiency in that it doesn't allow for return statements in ternary operators. Show quoted text
> As the error appeared on 123 I replaced it as follows: > > SvOK( elem[0] ) ? XSRETURN_YES : XSRETURN_NO; > > with > > if ( SvOK(elem[0]) ) { > XSRETURN_YES; > } else { > XSRETURN_NO; > } > > and lo and behold it compiles and tests ok. Looks odd to me that is > works the second way (unless I've made a silly mistake - it's been > many years since I did any C)
Yes, that's essentially what my proposed change does, too. I'll release a new version somewhen today. Thanks for bringing this to my attention, testing, and following up. Best regards, Steffen
The proposed fix seems to work, marking as resolved. Thanks for the bug report! If there's any further trouble, a reply to this will reopen the ticket.