Skip Menu |

This queue is for tickets about the Clone CPAN distribution.

Report information
The Basics
Id: 91203
Status: resolved
Priority: 0/
Queue: Clone

People
Owner: Nobody in particular
Requestors: GAAS [...] cpan.org
Cc:
AdminCc:

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



Subject: AIX compiler aborts with "Clone.xs", line 139.3: 1506-275 (S) Unexpected text 'int' encountered.
I upgraded from Clone 0.34 to 0.35 and now our AIX builds (with perl-5.18) fails with:
>>> cd Clone && /tmp/perl/bin/perl Makefile.PL INSTALLDIRS=perl
Checking if your kit is complete...
Looks good
Writing Makefile for Clone
Writing MYMETA.yml and MYMETA.json
>>> cd Clone && make POD2HTML='$(NOOP)'
cp Clone.pm blib/lib/Clone.pm
AutoSplitting blib/lib/Clone.pm (blib/lib/auto/Clone)
/tmp/perl/bin/perl -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "Clone", "DL_FUNCS" => {  }, "FUNCLIST" => [], "DL_VARS" => []);'
/tmp/perl/bin/perl /tmp/perl/lib/ExtUtils/xsubpp  -typemap /tmp/perl/lib/ExtUtils/typemap  Clone.xs > Clone.xsc && mv Clone.xsc Clone.c
cc_r -q32 -c   -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DUSE_SITECUSTOMIZE -DPERL_RELOCATABLE_INCPUSH -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -O3   -DVERSION=\"0.35\" -DXS_VERSION=\"0.35\"  "-I/tmp/perl/lib/CORE"   Clone.c
1506-173 (W) Option langlvl=extc99 is not valid.  Enter xlc for list of valid options.
"Clone.xs", line 139.3: 1506-275 (S) Unexpected text 'int' encountered.
"Clone.xs", line 139.7: 1506-045 (S) Undeclared identifier magic_ref.
make: *** [Clone.o] Error 1
Command exits with 2:
  cd Clone && make POD2HTML='$(NOOP)'
  stopped at /home/gecko/lib/ActivePerl/Build/Build.pm line 912

I think this compiler isn't happy with variable declarations after regular statements has been encountered.
I quite sure the following patch will do.  Will know tomorrow when our buildbots have gotten around to retrying the AIX builds.
Subject: Clone-aix.patch
From b970941b14cfdea7fe9d078e2a378276022a48d6 Mon Sep 17 00:00:00 2001 From: Gisle Aas <gisle@activestate.com> Date: Thu, 5 Dec 2013 14:02:05 -0800 Subject: [PATCH] AIX compiler needs declaration ahead of statements --- Clone.xs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Clone.xs b/Clone.xs index 7f9bbb6..ab6ffee 100755 --- a/Clone.xs +++ b/Clone.xs @@ -122,6 +122,7 @@ sv_clone (SV * ref, HV* hseen, int depth) SV *clone = ref; SV **seen = NULL; UV visible; + int magic_ref = 0; if (!ref) { @@ -136,7 +137,6 @@ sv_clone (SV * ref, HV* hseen, int depth) #else visible = (SvREFCNT(ref) > 1) || (SvMAGICAL(ref) && mg_find(ref, '<')); #endif - int magic_ref = 0; TRACEME(("ref = 0x%x(%d)\n", ref, SvREFCNT(ref))); -- 1.7.0.5
On Thu Dec 05 17:12:49 2013, GAAS wrote: Show quoted text
> I quite sure the following patch will do. Will know tomorrow when our > buildbots > have gotten around to retrying the AIX builds.
Hi Gisle! Thanks for the report and the patch - 0.36 was just released to CPAN. Please let us know if you find anything else, ok? Cheers!