Minimum version of JSON::PP needs to be specified in Makefile.PL PREREQ_PM #2

Closed
finn opened this Issue Dec 5, 2011 · 2 comments

1 participant

@finn

I tried to install App::pmuninstall using cpanm on a custom compiled version of perl 5.10.1.

Install failed because it found JSON::PP, but the version (0.97) was older than the one it needed.

When I upgraded JSON::PP by hand and then tried again,, App::pmuninstall installed fine.

This line in Makefile.PL:

'JSON::PP' => 0,

Should be changed to indicate the minimum version required. I'm guessing it's something in 1.x or 2.x? It specifically failed when it could not find the decode_json export from the module.

Here's the verbose cpanm run where installation failed:

cpanm -v App::pmuninstall
cpanm (App::cpanminus) 1.5006 on perl 5.010001 built for darwin-2level
Work directory is /Users/finn/.cpanm/work/1323112154.19227
You have make /usr/bin/make
You have LWP 6.03
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching App::pmuninstall on cpanmetadb ...
--> Working on App::pmuninstall
Fetching http://search.cpan.org/CPAN/authors/id/X/XA/XAICRON/App-pmuninstall-0.27.tar.gz ... OK
Unpacking App-pmuninstall-0.27.tar.gz
x App-pmuninstall-0.27/
x App-pmuninstall-0.27/README
x App-pmuninstall-0.27/Makefile.PL
x App-pmuninstall-0.27/xt/
x App-pmuninstall-0.27/xt/02_perlcritic.t
x App-pmuninstall-0.27/xt/01_podspell.t
x App-pmuninstall-0.27/xt/perlcriticrc
x App-pmuninstall-0.27/xt/03_pod.t
x App-pmuninstall-0.27/MANIFEST
x App-pmuninstall-0.27/META.json
x App-pmuninstall-0.27/Changes
x App-pmuninstall-0.27/META.yml
x App-pmuninstall-0.27/lib/
x App-pmuninstall-0.27/lib/App/
x App-pmuninstall-0.27/lib/App/pmuninstall.pm
x App-pmuninstall-0.27/t/
x App-pmuninstall-0.27/t/happy_cpantesters.t
x App-pmuninstall-0.27/bin/
x App-pmuninstall-0.27/bin/pm-uninstall
x App-pmuninstall-0.27/.gitignore
Entering App-pmuninstall-0.27
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.62)
Configuring App-pmuninstall-0.27 ... Running Makefile.PL
Checking if your kit is complete...
Looks good
JSON::PP 2.27103 is not available
 at /bf/perl-5.10.1/lib/site_perl/5.10.1/CPAN/Meta/Converter.pm line 22
 at /bf/perl-5.10.1/lib/5.10.1/ExtUtils/MM_Any.pm line 767
Writing Makefile for App::pmuninstall
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.62)
Checking if you have YAML 0 ... Yes (0.77)
Checking if you have version 0 ... Yes (0.95)
Checking if you have ExtUtils::MakeMaker 6.3 ... Yes (6.62)
Checking if you have ExtUtils::Install 1.43 ... Yes (1.54)
Checking if you have CPAN::DistnameInfo 0 ... Yes (0.12)
Checking if you have JSON::PP 0 ... Yes (0.97)
Checking if you have HTTP::Tiny 0.012 ... Yes (0.016)
Checking if you have Module::CoreList 0 ... Yes (2.18)
Building and testing App-pmuninstall-0.27 ... cp lib/App/pmuninstall.pm blib/lib/App/pmuninstall.pm
cp bin/pm-uninstall blib/script/pm-uninstall
/bf/perl-5.10.1/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pm-uninstall
Manifying blib/man1/pm-uninstall.1
Manifying blib/man3/App::pmuninstall.3
PERL_DL_NONLAZY=1 /bf/perl-5.10.1/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/happy_cpantesters.t .. 1/1 
#   Failed test 'require App::pmuninstall;'
#   at t/happy_cpantesters.t line 5.
#     Tried to require 'App::pmuninstall'.
#     Error:  "decode_json" is not exported by the JSON::PP module
# Can't continue after import errors at /Users/finn/.cpanm/work/1323112154.19227/App-pmuninstall-0.27/blib/lib/App/pmuninstall.pm line 14
# BEGIN failed--compilation aborted at /Users/finn/.cpanm/work/1323112154.19227/App-pmuninstall-0.27/blib/lib/App/pmuninstall.pm line 14.
# Compilation failed in require at (eval 4) line 2.
Use of uninitialized value $App::pmuninstall::VERSION in concatenation (.) or string at t/happy_cpantesters.t line 7.
# App::pmuninstall/
# Looks like you failed 1 test of 1.
t/happy_cpantesters.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Test Summary Report
-------------------
t/happy_cpantesters.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.06 cusr  0.00 csys =  0.09 CPU)
Result: FAIL
Failed 1/1 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 1
FAIL
! Installing App::pmuninstall failed. See /Users/finn/.cpanm/build.log for details.
@finn

It looks like decode_json first appeared in version 2.01 of JSON::PP. From the CHANGES file:

    [JSON::PP] (2.01 from 0.97)
        - updated JSON::PP for compatible to JSON::XS 2.01
        - renamed from_json and to_json to decode_json and encode_json
@finn

Pull request to resolve this in issue #3. Closing in favor of that issue.

@finn finn closed this Dec 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment