Skip Menu |

This queue is for tickets about the Deep-Encode CPAN distribution.

Report information
The Basics
Id: 62190
Status: resolved
Priority: 0/
Queue: Deep-Encode

People
Owner: GRIAN [...] cpan.org
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

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



Subject: Encode.xs fails to build on older C compilers
CPAN: Storable loaded ok (v2.21)
Going to read /root/.cpan/Metadata
  Database was generated on Sat, 16 Oct 2010 05:31:01 GMT
Running install for module 'Deep::Encode'
Running make for G/GR/GRIAN/Deep-Encode-0.12.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: File::Which loaded ok (v1.09)
CPAN: Compress::Zlib loaded ok (v1.41)
Checksum for /root/.cpan/sources/authors/id/G/GR/GRIAN/Deep-Encode-0.12.tar.gz ok
Deep-Encode-0.12/
Deep-Encode-0.12/Changes
Deep-Encode-0.12/README
Deep-Encode-0.12/MANIFEST
Deep-Encode-0.12/t/
Deep-Encode-0.12/t/Deep-Encode-01.t
Deep-Encode-0.12/t/Deep-Encode-03.t
Deep-Encode-0.12/t/Deep-Encode-04.t
Deep-Encode-0.12/t/Deep-Encode-02.t
Deep-Encode-0.12/t/Deep-Encode-00.t
Deep-Encode-0.12/Encode.xs
Deep-Encode-0.12/META.yml
Deep-Encode-0.12/ppport.h
Deep-Encode-0.12/Makefile.PL
Deep-Encode-0.12/lib/
Deep-Encode-0.12/lib/Deep/
Deep-Encode-0.12/lib/Deep/Encode.pm
CPAN: File::Temp loaded ok (v0.22)
CPAN: YAML loaded ok (v0.71)

  CPAN.pm: Going to build G/GR/GRIAN/Deep-Encode-0.12.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Deep::Encode
cp lib/Deep/Encode.pm blib/lib/Deep/Encode.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.8.9/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.8.9/ExtUtils/typemap  Encode.xs > Encode.xsc && mv Encode.xsc Encode.c
cc -c  -I.  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O    -DVERSION=\"0.12\"  -DXS_VERSION=\"0.12\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.9/i386-freebsd/CORE"   Encode.c
Encode.xs: In function `_is_utf8':
Encode.xs:60: syntax error before `first'
Encode.xs:68: `first' undeclared (first use in this function)
Encode.xs:68: (Each undeclared identifier is reported only once
Encode.xs:68: for each function it appears in.)
*** Error code 1

Stop in /root/.cpan/build/Deep-Encode-0.12-AtZKFP.
  GRIAN/Deep-Encode-0.12.tar.gz
  make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

This is because 'first' in the function '_is_utf8' is declared in the middle of code, not at the beginning of the function, a patch simialr to this fixes it:

--- Encode.xs.orig      Sat Oct 16 04:30:27 2010
+++ Encode.xs   Sat Oct 16 04:30:08 2010
@@ -43,6 +43,7 @@
 bool
 _is_utf8( U8 * start, U8 *end ){
     STRLEN ucnt;
+    U8 first;
     ucnt = -1;
 
     START:
@@ -57,7 +58,7 @@
 
     ENC:
     ucnt = 0;
-    U8 first = *start;
+    first = *start;
     start++;
     while( start < end && (*start & 0xC0) == 0x80 ) ucnt++, start++;


Subject: Re: [rt.cpan.org #62190] Encode.xs fails to build on older C compilers
Date: Sun, 17 Oct 2010 18:48:58 +0400
To: <bug-Deep-Encode [...] rt.cpan.org>
From: "Grian" <0body1 [...] rambler.ru>
Thanks, I'll shall fix this in 0.13 version . Anatoliy.
CPAN uploaded.