安装
[root@localhost svnsoft]# tar xvf Module-Build-0.36_11.tar.gz
[root@localhost svnsoft]# cd Module-Build-0.36_11
[root@localhost Module-Build-0.36_11]# perl Build.PL
Checking optional features...
license_creation........disabled
requires:
! Software::License is not installed
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'Module-Build' version '0.36_11'
执行步骤如下:
[root@localhost Module-Build-0.36_11]# perl Build --makefile_env_macros 1 test
t/00-compile.t ................. ok
t/PL_files.t ................... ok
t/actions/installdeps.t ........ ok
t/actions/manifest_skip.t ...... ok
t/add_property.t ............... ok
t/basic.t ...................... ok
t/bundle_inc.t ................. skipped: $ENV{MB_TEST_EXPERIMENTAL} is not set
t/compat.t ..................... ok
t/compat/exit.t ................ ok
t/debug.t ...................... ok
t/destinations.t ............... ok
t/ext.t ........................ ok
t/extend.t ..................... ok
t/files.t ...................... ok
t/help.t ....................... ok
t/install.t .................... ok
t/install_extra_target.t ....... ok
t/manifypods.t ................. ok
t/metadata.t ................... ok
t/metadata2.t .................. ok
t/moduleinfo.t ................. ok
t/mymeta.t ..................... ok
t/new_from_context.t ........... ok
t/notes.t ...................... ok
t/par.t ........................ ok
t/parents.t .................... ok
t/perl_mb_opt.t ................ ok
t/pod_parser.t ................. ok
t/ppm.t ........................ ok
t/properties/module_name.t ..... ok
t/properties/needs_compiler.t .. ok
t/properties/share_dir.t ....... ok
t/resume.t ..................... ok
t/runthrough.t ................. ok
t/sample.t ..................... ok
t/script_dist.t ................ ok
t/signature.t .................. skipped: $ENV{TEST_SIGNATURE} is not set
t/test_file_exts.t ............. ok
t/test_type.t .................. ok
t/test_types.t ................. ok
t/tilde.t ...................... ok
t/use_tap_harness.t ............ ok
t/versions.t ................... ok
t/write_default_maniskip.t ..... ok
t/xs.t ......................... ok
All tests successful.
Files=45, Tests=1171, 79 wallclock secs ( 0.43 usr 0.13 sys + 54.02 cusr 11.87 csys = 66.45 CPU)
Result: PASS
结果是PASS,表示没有问题,我们之前产生的错误可能就是少执行了这一步。
然后:
[root@localhost Module-Build-0.36_11]# ./Build test
t/00-compile.t ................. ok
t/PL_files.t ................... ok
t/actions/installdeps.t ........ ok
t/actions/manifest_skip.t ...... ok
t/add_property.t ............... ok
t/basic.t ...................... ok
t/bundle_inc.t ................. skipped: $ENV{MB_TEST_EXPERIMENTAL} is not set
t/compat.t ..................... ok
t/compat/exit.t ................ ok
t/debug.t ...................... ok
t/destinations.t ............... ok
t/ext.t ........................ ok
t/extend.t ..................... ok
t/files.t ...................... ok
t/help.t ....................... ok
t/install.t .................... ok
t/install_extra_target.t ....... ok
t/manifypods.t ................. ok
t/metadata.t ................... ok
t/metadata2.t .................. ok
t/moduleinfo.t ................. ok
t/mymeta.t ..................... ok
t/new_from_context.t ........... ok
t/notes.t ...................... ok
t/par.t ........................ ok
t/parents.t .................... ok
t/perl_mb_opt.t ................ ok
t/pod_parser.t ................. ok
t/ppm.t ........................ ok
t/properties/module_name.t ..... ok
t/properties/needs_compiler.t .. ok
t/properties/share_dir.t ....... ok
t/resume.t ..................... ok
t/runthrough.t ................. ok
t/sample.t ..................... ok
t/script_dist.t ................ ok
t/signature.t .................. skipped: $ENV{TEST_SIGNATURE} is not set
t/test_file_exts.t ............. ok
t/test_type.t .................. ok
t/test_types.t ................. ok
t/tilde.t ...................... ok
t/use_tap_harness.t ............ ok
t/versions.t ................... ok
t/write_default_maniskip.t ..... ok
t/xs.t ......................... ok
All tests successful.
Files=45, Tests=1171, 67 wallclock secs ( 0.44 usr 0.14 sys + 54.03 cusr 11.69 csys = 66.30 CPU)
Result: PASS
接着执行安装:
[root@localhost Module-Build-0.36_11]# ./Build install
Building Module-Build
Installing /usr/share/man/man1/config_data.1
Installing /usr/share/perl5/Module/Build.pm
Installing /usr/share/perl5/Module/Build/Cookbook.pm
Installing /usr/share/perl5/Module/Build/YAML.pm
Installing /usr/share/perl5/Module/Build/ModuleInfo.pm
Installing /usr/share/perl5/Module/Build/Compat.pm
Installing /usr/share/perl5/Module/Build/PPMMaker.pm
Installing /usr/share/perl5/Module/Build/ConfigData.pm
Installing /usr/share/perl5/Module/Build/Config.pm
Installing /usr/share/perl5/Module/Build/Dumper.pm
Installing /usr/share/perl5/Module/Build/Base.pm
Installing /usr/share/perl5/Module/Build/PodParser.pm
Installing /usr/share/perl5/Module/Build/Notes.pm
Installing /usr/share/perl5/Module/Build/API.pod
Installing /usr/share/perl5/Module/Build/Version.pm
Installing /usr/share/perl5/Module/Build/Bundling.pod
Installing /usr/share/perl5/Module/Build/Platform/aix.pm
Installing /usr/share/perl5/Module/Build/Platform/cygwin.pm
Installing /usr/share/perl5/Module/Build/Platform/os2.pm
Installing /usr/share/perl5/Module/Build/Platform/darwin.pm
Installing /usr/share/perl5/Module/Build/Platform/Windows.pm
Installing /usr/share/perl5/Module/Build/Platform/VOS.pm
Installing /usr/share/perl5/Module/Build/Platform/Amiga.pm
Installing /usr/share/perl5/Module/Build/Platform/MacOS.pm
Installing /usr/share/perl5/Module/Build/Platform/VMS.pm
Installing /usr/share/perl5/Module/Build/Platform/Default.pm
Installing /usr/share/perl5/Module/Build/Platform/MPEiX.pm
Installing /usr/share/perl5/Module/Build/Platform/RiscOS.pm
Installing /usr/share/perl5/Module/Build/Platform/EBCDIC.pm
Installing /usr/share/perl5/Module/Build/Platform/Unix.pm
Installing /usr/share/perl5/inc/latest.pm
Installing /usr/share/perl5/inc/latest/private.pm
Installing /usr/share/man/man3/Module::Build::Platform::RiscOS.3pm
Installing /usr/share/man/man3/Module::Build::ModuleInfo.3pm
Installing /usr/share/man/man3/Module::Build::Compat.3pm
Installing /usr/share/man/man3/Module::Build::Platform::VOS.3pm
Installing /usr/share/man/man3/Module::Build::Platform::os2.3pm
Installing /usr/share/man/man3/Module::Build::Notes.3pm
Installing /usr/share/man/man3/Module::Build::Platform::cygwin.3pm
Installing /usr/share/man/man3/Module::Build::ConfigData.3pm
Installing /usr/share/man/man3/Module::Build::Platform::Amiga.3pm
Installing /usr/share/man/man3/Module::Build::PPMMaker.3pm
Installing /usr/share/man/man3/Module::Build::Platform::EBCDIC.3pm
Installing /usr/share/man/man3/Module::Build::Platform::Unix.3pm
Installing /usr/share/man/man3/Module::Build::Platform::Windows.3pm
Installing /usr/share/man/man3/Module::Build::API.3pm
Installing /usr/share/man/man3/Module::Build::Platform::Default.3pm
Installing /usr/share/man/man3/Module::Build::Platform::VMS.3pm
Installing /usr/share/man/man3/Module::Build::Platform::MPEiX.3pm
Installing /usr/share/man/man3/Module::Build::Platform::darwin.3pm
Installing /usr/share/man/man3/Module::Build::Authoring.3pm
Installing /usr/share/man/man3/Module::Build::Base.3pm
Installing /usr/share/man/man3/Module::Build::Platform::aix.3pm
Installing /usr/share/man/man3/Module::Build::Platform::MacOS.3pm
Installing /usr/share/man/man3/Module::Build::Bundling.3pm
Installing /usr/share/man/man3/Module::Build.3pm
Installing /usr/share/man/man3/inc::latest.3pm
Installing /usr/share/man/man3/Module::Build::Cookbook.3pm
Installing /usr/bin/config_data
这样就安装成功了,但是我在查找相关文献时,发现了这样一个编译检测不通过的的案例,可以参考一下,我并没有遇到这个问题:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
华丽分割线
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
First, about me:
==> perl -v <==
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
==> cat /etc/lsb-release <==
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"
==> getent passwd foo <==
foo:x:1025:1025:Foo Bar:/u/foo:/bin/zsh
==> getent passwd zooble || echo $? <==
2
Now... while using local::lib and trying to install Module::Build, the
t/tilde.t test fails, as seen below:
Running [/usr/bin/perl /usr/bin/cpanp-run-perl
/u/username/.cpanplus/5.10.1/build/Module-Build-0.3607/Makefile.PL
INSTALLDIRS=site]...
# running Build.PL --installdirs site
Checking optional features...
license_creation........disabled
requires:
! Software::License is not installed
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'Module-Build' version '0.3607'
Running [/usr/bin/make test]...
make[1]: Entering directory
`/u/username/.cpanplus/5.10.1/build/Module-Build-0.3607'
/usr/bin/perl Build --makefile_env_macros 1 test
t/00-compile.t ................. ok
t/PL_files.t ................... ok
t/actions/installdeps.t ........ ok
t/add_property.t ............... ok
t/basic.t ...................... ok
t/bundle_inc.t ................. skipped: $ENV{MB_TEST_EXPERIMENTAL} is
not set
t/compat.t ..................... ok
t/compat/exit.t ................ ok
t/debug.t ...................... ok
t/destinations.t ............... ok
t/ext.t ........................ ok
t/extend.t ..................... ok
t/files.t ...................... ok
t/help.t ....................... ok
t/install.t .................... ok
t/install_extra_target.t ....... ok
t/manifypods.t ................. ok
t/metadata.t ................... ok
t/metadata2.t .................. ok
t/moduleinfo.t ................. ok
t/mymeta.t ..................... ok
t/new_from_context.t ........... ok
t/notes.t ...................... ok
t/par.t ........................ ok
t/parents.t .................... ok
t/perl_mb_opt.t ................ ok
t/pod_parser.t ................. ok
t/ppm.t ........................ ok
t/properties/module_name.t ..... ok
t/properties/needs_compiler.t .. ok
t/properties/share_dir.t ....... ok
t/resume.t ..................... ok
t/runthrough.t ................. ok
t/sample.t ..................... ok
t/script_dist.t ................ ok
t/signature.t .................. skipped: $ENV{TEST_SIGNATURE} is not set
t/test_file_exts.t ............. ok
t/test_type.t .................. ok
t/test_types.t ................. ok
# Failed test at t/tilde.t line 92.
# got: '/u/foo'
# expected: '~ foo'
# Looks like you failed 1 test of 16.
t/tilde.t ......................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/16 subtests
t/use_tap_harness.t ............ ok
t/versions.t ................... ok
t/write_default_maniskip.t ..... ok
t/xs.t ......................... ok
Test Summary Report
-------------------
t/tilde.t (Wstat: 256 Tests: 16 Failed: 1)
Failed test: 15
Non-zero exit status: 1
Files=44, Tests=1164, 63 wallclock secs ( 0.36 usr 0.06 sys + 44.79 cusr
12.66 csys = 57.87 CPU)
Result: FAIL
Failed 1/44 test programs. 1/1164 subtests failed.
make[1]: Leaving directory
`/u/username/.cpanplus/5.10.1/build/Module-Build-0.3607'
make[1]: *** [test] Error 255
[ERROR] MAKE TEST failed: Bad file descriptor make[1]: Entering directory
`/u/username/.cpanplus/5.10.1/build/Module-Build-0.3607'
I tweaked t/tilde.t a little bit, to replace 'foo' with a non-existant user:
==> diff -u tilde.t.orig tilde.t <==
--- tilde.t.orig 2010-09-30 02:53:28.630397909 -0000
+++ tilde.t 2010-09-30 02:53:42.660469441 -0000
@@ -89,7 +89,7 @@
skip "On OS/2 EMX all users are equal", 2 if $^O eq 'os2';
is( run_sample( $p => '~~' )->$p(), '~~' );
- is( run_sample( $p => '~ foo' )->$p(), '~ foo' );
+ is( run_sample( $p => '~ zooble' )->$p(), '~ zooble' );
}
# Again, with named users
And now Module::Build installs just fine:
Restored the state of none (in 0.0031 secs)
Running install for module 'Module::Build'
Running Build for D/DA/DAGOLDEN/Module-Build-0.3607.tar.gz
Has already been unwrapped into directory
/u/username/path/to/cpan-cache/build/Module-Build-0.3607-K86OwJ
Has already been made
Running Build test
t/00-compile.t ................. ok
t/PL_files.t ................... ok
t/actions/installdeps.t ........ ok
t/add_property.t ............... ok
t/basic.t ...................... ok
t/bundle_inc.t ................. skipped: $ENV{MB_TEST_EXPERIMENTAL} is
not set
t/compat.t ..................... ok
t/compat/exit.t ................ ok
t/debug.t ...................... ok
t/destinations.t ............... ok
t/ext.t ........................ ok
t/extend.t ..................... ok
t/files.t ...................... ok
t/help.t ....................... ok
t/install.t .................... ok
t/install_extra_target.t ....... ok
t/manifypods.t ................. ok
t/metadata.t ................... ok
t/metadata2.t .................. ok
t/moduleinfo.t ................. ok
t/mymeta.t ..................... ok
t/new_from_context.t ........... ok
t/notes.t ...................... ok
t/par.t ........................ ok
t/parents.t .................... ok
t/perl_mb_opt.t ................ ok
t/pod_parser.t ................. ok
t/ppm.t ........................ ok
t/properties/module_name.t ..... ok
t/properties/needs_compiler.t .. ok
t/properties/share_dir.t ....... ok
t/resume.t ..................... ok
t/runthrough.t ................. ok
t/sample.t ..................... ok
t/script_dist.t ................ ok
t/signature.t .................. skipped: $ENV{TEST_SIGNATURE} is not set
t/test_file_exts.t ............. ok
t/test_type.t .................. ok
t/test_types.t ................. ok
t/tilde.t ...................... ok
t/use_tap_harness.t ............ ok
t/versions.t ................... ok
t/write_default_maniskip.t ..... ok
t/xs.t ......................... ok
All tests successful.
Files=44, Tests=1164, 63 wallclock secs ( 0.42 usr 0.13 sys + 46.39 cusr
11.93 csys = 58.87 CPU)
Result: PASS
DAGOLDEN/Module-Build-0.3607.tar.gz
./Build test -- OK
Running Build install
Prepending
/u/username/path/to/cpan-cache/build/Module-Build-0.3607-K86OwJ/blib/arch
/u/username/path/to/cpan-cache/build/Module-Build-0.3607-K86OwJ/blib/lib
to PERL5LIB for 'install'
Building Module-Build
Installing /u/username/path/to/man/man1/config_data.1p
Installing /u/username/path/to/lib/perl5/Module/Build.pm
Installing /u/username/path/to/lib/perl5/Module/Build/PodParser.pm
Installing /u/username/path/to/lib/perl5/Module/Build/YAML.pm
Installing /u/username/path/to/lib/perl5/Module/Build/ModuleInfo.pm
Installing /u/username/path/to/lib/perl5/Module/Build/ConfigData.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Version.pm
Installing /u/username/path/to/lib/perl5/Module/Build/PPMMaker.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Bundling.pod
Installing /u/username/path/to/lib/perl5/Module/Build/Authoring.pod
Installing /u/username/path/to/lib/perl5/Module/Build/Cookbook.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Config.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Compat.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Notes.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Dumper.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Base.pm
Installing /u/username/path/to/lib/perl5/Module/Build/API.pod
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/Windows.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/Amiga.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/VOS.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/Unix.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/MPEiX.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/darwin.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/MacOS.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/Default.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/os2.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/RiscOS.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/VMS.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/aix.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/EBCDIC.pm
Installing /u/username/path/to/lib/perl5/Module/Build/Platform/cygwin.pm
Installing /u/username/path/to/lib/perl5/inc/latest.pm
Installing /u/username/path/to/lib/perl5/inc/latest/private.pm
Installing /u/username/path/to/man/man3/Module::Build::Compat.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::Unix.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::Windows.3pm
Installing /u/username/path/to/man/man3/Module::Build::ConfigData.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::VOS.3pm
Installing /u/username/path/to/man/man3/Module::Build::API.3pm
Installing /u/username/path/to/man/man3/Module::Build::PPMMaker.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::Default.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::cygwin.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::darwin.3pm
Installing /u/username/path/to/man/man3/Module::Build::Base.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::EBCDIC.3pm
Installing /u/username/path/to/man/man3/Module::Build::Notes.3pm
Installing /u/username/path/to/man/man3/Module::Build::Authoring.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::MPEiX.3pm
Installing /u/username/path/to/man/man3/Module::Build::ModuleInfo.3pm
Installing /u/username/path/to/man/man3/inc::latest.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::MacOS.3pm
Installing /u/username/path/to/man/man3/Module::Build::Cookbook.3pm
Installing /u/username/path/to/man/man3/Module::Build::Bundling.3pm
Installing /u/username/path/to/man/man3/Module::Build.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::RiscOS.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::VMS.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::os2.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::aix.3pm
Installing /u/username/path/to/man/man3/Module::Build::Platform::Amiga.3pm
Installing /u/username/path/to/bin/config_data
DAGOLDEN/Module-Build-0.3607.tar.gz
./Build install -- OK
So, maybe Module::Build is assuming the user 'foo' doesn't exist, and this
is a bad assumption?