環境
Perl5.8.8でテスト通りませんでした。念のため、環境。# perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.18-53.el5, archname=x86_64-linux-thread-multi uname='linux builder10.centos.org 2.6.18-53.el5 #1 smp mon nov 12 02:14:55 est 2007 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.8 -Dsitelib=/usr/lib/perl5/site_perl/5.8.8 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.8 -Darchlib=/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi -Darchname=x86_64-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='4.1.2 20071124 (Red Hat 4.1.2-42)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags ='' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'手っ取り早く言うならば、Cent5.3の標準Perlですね。
0.19をテスト
まずは、現時点で最新バージョンである0.19から。# cpanm Cache::Memcached::Fast Fetching http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.19.tar.gz ... OK Configuring Cache-Memcached-Fast-0.19 ... OK Building and testing Cache-Memcached-Fast-0.19 for Cache::Memcached::Fast ... FAIL ! Installing Cache::Memcached::Fast failed. See /root/.cpanm/build.log for details.build.logを見てみます。
# Testing Cache::Memcached::Fast 0.19, Perl 5.008008, /usr/bin/perl t/00-load.t ....... ok # Connected to 2 memcached servers, lowest version 1.4.5 t/01-connect.t .... ok t/02-isa.t ........ ok t/big_value.t ..... ok t/commands.t ...... ok t/key_ref.t ....... ok # Failed test at t/magic.t line 52. # Failed test at t/magic.t line 53. # Looks like you failed 2 tests of 9. t/magic.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/9 subtests (less 3 skipped subtests: 4 okay) t/namespace.t ..... ok t/noreply.t ....... ok t/nowait.t ........ ok t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.08 required for testing POD coverage t/pod.t ........... ok t/serialize.t ..... ok t/threads.t ....... ok t/utf8.t .......... ok Test Summary Report ------------------- t/magic.t (Wstat: 512 Tests: 9 Failed: 2) Failed tests: 5-6 Non-zero exit status: 2 Files=15, Tests=133, 7 wallclock secs ( 0.30 usr 0.06 sys + 5.13 cusr 0.77 csys = 6.26 CPU) Result: FAIL Failed 1/15 test programs. 2/133 subtests failed.t/magic.tがこけてます。
0.18ならどうだ
こちらも試します。# cpanm K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz Fetching http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz ... OK Configuring Cache-Memcached-Fast-0.18 ... OK Building and testing Cache-Memcached-Fast-0.18 for K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz ... FAIL ! Installing K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz failed. See /root/.cpanm/build.log for details.やはりダメ。build.logの中身はこんな感じ。
# Testing Cache::Memcached::Fast 0.18, Perl 5.008008, /usr/bin/perl t/00-load.t ....... ok # Connected to 2 memcached servers, lowest version 1.4.5 t/01-connect.t .... ok t/02-isa.t ........ ok t/big_value.t ..... ok t/commands.t ...... ok t/key_ref.t ....... ok # Failed test at t/magic.t line 52. # Failed test at t/magic.t line 53. # Looks like you failed 2 tests of 9. t/magic.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/9 subtests (less 3 skipped subtests: 4 okay) t/namespace.t ..... ok t/noreply.t ....... ok t/nowait.t ........ ok t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.08 required for testing POD coverage t/pod.t ........... ok t/serialize.t ..... ok t/threads.t ....... ok t/utf8.t .......... ok Test Summary Report ------------------- t/magic.t (Wstat: 512 Tests: 9 Failed: 2) Failed tests: 5-6 Non-zero exit status: 2 Files=15, Tests=133, 6 wallclock secs ( 0.30 usr 0.05 sys + 5.16 cusr 0.76 csys = 6.27 CPU) Result: FAIL Failed 1/15 test programs. 2/133 subtests failed. make: *** [test_dynamic] エラー 255 -> FAIL Installing K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz failed. See /root/.cpanm/build.log for details.一部違わず同じ箇所でこけてますねえ。
0.17なら無事入りました
0.17も試して見たところ、こちらは無事にインストール出来ました。問題のmagic.tとは?
しかし、magic.tのテスト内容が気になる所。とりあえず問題の箇所をクローズアップしてみます。package MyScalar;
use base 'Tie::StdScalar';
sub FETCH {
"Другой.ключ"
}
package main;
tie my $scalar2, 'MyScalar';
ok($memd->set($scalar2, $scalar2));
ok(exists $memd->get_multi($scalar2)->{$scalar2});
SKIP: {
eval { require Readonly };
skip "Skipping Readonly tests because the module is not present", 3
if $@;
# 'require Readonly' as above can be used to test if the module is
どうやら、tie関連のテストのようです。0.18以降でこのテストが追加されているのを見ると、おそらくChangesにも何かしら記載があるはずです。
では、Changesを見てみます。
0.18 2010-04-06
- make module thread-safe, and fix several bugs. No need to
upgrade unless you experienced limitations mentioned below.
Changes since 0.17:
Fix RT#56142: handle Perl magic. Tied scalars, arrays and
hashes are supported now, as well as Readonly variables and
other magic stuff.
Fix t/command.t failure on some Solaris distributions.
Make module thread-safe with Perl >= 5.7.2.
僕のグダグダ英語スキルによると、以下のように理解できます。「Perl magicに対応。tieされたスカラや配列、ハッシュは、従来どおり、読み取り専用変数やその他のmagic同様にサポートされるようになった。」
どうやらこれは、RT上でチケットが発行されていた問題らしく、こちらでそのやりとりを確認できます。
今回の問題もRTで既にチケット発行済だった
そして今回の問題も、RT#57150としてチケットが発行されており、既にステータスが「着手」となっておりました。さすが。おそらく、次期リリースのタイミングでこの問題は解消することでしょう。それまでは、特段差し支え無ければ0.17を使うなり、0.19をforceインストールしたりして凌ぐことになります。
2010-9-22 追記
現在進行形で現象が発生しています。
# cpanm Cache::Memcached::Fast Fetching http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.19.tar.gz ... OK Configuring Cache-Memcached-Fast-0.19 ... OK Building and testing Cache-Memcached-Fast-0.19 for Cache::Memcached::Fast ... FAIL ! Installing Cache::Memcached::Fast failed. See /root/.cpanm/build.log for details. # cpanm K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz Fetching http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz ... OK Configuring Cache-Memcached-Fast-0.18 ... OK Building and testing Cache-Memcached-Fast-0.18 for K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz ... FAIL ! Installing K/KR/KROKI/Cache-Memcached-Fast-0.18.tar.gz failed. See /root/.cpanm/build.log for details. # cpanm K/KR/KROKI/Cache-Memcached-Fast-0.17.tar.gz Fetching http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.17.tar.gz ... OK Configuring Cache-Memcached-Fast-0.17 ... OK Building and testing Cache-Memcached-Fast-0.17 for K/KR/KROKI/Cache-Memcached-Fast-0.17.tar.gz ... OK Successfully installed Cache-Memcached-Fast-0.17