Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am installing a software I need for my research (and because of which I am learning Linux). I am doing it with a script done for someone else for RED HAT. Now corrected for Ubuntu, it still fails installing the JASON-XS module with cpanm. The log file says:

Building and testing JSON-XS-2.33
cp XS/Boolean.pm blib/lib/JSON/XS/Boolean.pm
cp XS.pm blib/lib/JSON/XS.pm
/usr/bin/perl /usr/share/perl/5.18/ExtUtils/xsubpp  -typemap /usr/share/perl/5.18/ExtUtils/typemap -typemap typemap  XS.xs > XS.xsc && mv XS.xsc XS.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"2.33\" -DXS_VERSION=\"2.33\" -fPIC "-I/usr/lib/perl/5.18/CORE"   XS.c
In file included from /usr/lib/perl/5.18/CORE/perl.h:38:0,
                 from XS.xs:2:
XS.xs: In function ‘encode_sv’:
/usr/lib/perl/5.18/CORE/config.h:1419:31: warning: ignoring return value of ‘gcvt’, declared with attribute warn_unused_result [-Wunused-result]
 #define Gconvert(x,n,t,b) gcvt((x),(n),(b))
                               ^
XS.xs:789:7: note: in expansion of macro ‘Gconvert’
       Gconvert (SvNVX (sv), NV_DIG, 0, enc->cur);
       ^
Running Mkbootstrap for JSON::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/JSON/XS/XS.so
cc  -shared -L/usr/local/lib -fstack-protector XS.o  -o blib/arch/auto/JSON/XS/XS.so    \
            \

chmod 755 blib/arch/auto/JSON/XS/XS.so
cp XS.bs blib/arch/auto/JSON/XS/XS.bs
chmod 644 blib/arch/auto/JSON/XS/XS.bs
cp bin/json_xs blib/script/json_xs
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/json_xs
Manifying blib/man1/json_xs.1p
Manifying blib/man3/JSON::XS::Boolean.3pm
Manifying blib/man3/JSON::XS.3pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ............. ok
t/01_utf8.t ............. ok
t/02_error.t ............ ok
t/03_types.t ............ ok
t/04_dwiw_encode.t ...... ok
t/05_dwiw_decode.t ...... ok
t/06_pc_pretty.t ........ ok
t/07_pc_esc.t ........... ok
t/08_pc_base.t .......... ok
t/09_pc_extra_number.t .. ok
t/10_pc_keysort.t ....... ok
t/11_pc_expo.t .......... ok
t/12_blessed.t .......... ok
t/13_limit.t ............ ok
t/14_latin1.t ........... ok
t/15_prefix.t ........... ok
t/16_tied.t ............. ok
t/17_relaxed.t .......... ok
t/18_json_checker.t ..... ok

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.

#   Failed test 'data'
#   at t/19_incr.t line 22.
# Looks like you failed 49 tests of 697.
t/19_incr.t ............. 
Dubious, test returned 49 (wstat 12544, 0x3100)
Failed 49/697 subtests 
t/20_faihu.t ............ ok
t/21_evans.t ............ ok
t/22_comment_at_eof.t ... ok
t/99_binary.t ........... ok

Test Summary Report
-------------------
t/19_incr.t           (Wstat: 12544 Tests: 697 Failed: 49)
  Failed tests:  2, 5, 8, 11, 14, 17, 20, 23, 29, 41, 44
                47, 53, 62, 68, 86, 92, 95, 101, 104, 107
                110, 113, 116, 119, 122, 128, 149, 152
                155, 161, 173, 176, 179, 188, 191, 194
                197, 200, 215, 218, 224, 230, 248, 251
                260, 263, 269, 296
  Non-zero exit status: 49
Files=24, Tests=25564,  1 wallclock secs ( 0.71 usr  0.02 sys +  1.09 cusr  0.05 csys =  1.87 CPU)
Result: FAIL

The bug is the #84151 in rt.cpan.org, and there they wrote this patch:

--- t/19_incr.old   2008-06-22 08:05:49.000000000 -0400
+++ t/19_incr.t 2013-03-22 16:24:42.000000000 -0400
@@ -24,10 +24,10 @@
    }
 }

-splitter +JSON::XS->new              , '  ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]';
-splitter +JSON::XS->new              , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] ';
-splitter +JSON::XS->new->allow_nonref, '"test"';
-splitter +JSON::XS->new->allow_nonref, ' "5" ';
+splitter +JSON::XS->new->canonical   , '  ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]';
+splitter +JSON::XS->new->canonical   , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] ';
+splitter +JSON::XS->new->allow_nonref->canonical, '"test"';
+splitter +JSON::XS->new->allow_nonref->canonical, ' "5" ';

 {
    my $text = '[5],{"":1} , [ 1,2, 3], {"3":null}';

Yet, since I am new at this, I have no idea of how to use the patch. Could you help me to fix the bug?

Thanks in advance.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.