EV module test failure in 04_stat.t

cnhack TNT cnhacktnt at gmail.com
Tue Dec 29 08:00:05 CET 2009


Dear libev list,

I have exactly the same problem mentioned by *Zsbán Ambrus(* ambrus at
math.bme.hu<libev%40lists.schmorp.de?Subject=Re%3A%20EV%20module%20test%20failure%20in%2004_stat.t&In-Reply-To=%3C25d4951c0911170412l565d4745ufdec6c12d822dc4f%40mail.gmail.com%3E>)
earlier.
I use a real machine with Ubuntu 9.10,  and installed both perl 5.11.2 and
perl 5.10.0, I tried to install module EV(3.8) via CPAN with both bleadperl
and the stable one, but all ended with test failure in 04_stat.t.
I will attach all the details in case you need them:
===========================
On Perl 5.10.0:

$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.24-23-server,
archname=i486-linux-gnu-thread-multi
    uname='linux vernadsky 2.6.24-23-server #1 smp wed apr 1 22:22:14 utc
2009 i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0
-Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm
-DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0
-Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe
-I/usr/local/include'
    ccversion='', gccversion='4.4.1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.10.1.so, so=so, useshrplib=true,
libperl=libperl.so.5.10.0
    gnulibc_version='2.10.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS
                        USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Oct  1 2009 22:19:26
  @INC:
    /etc/perl
    /usr/local/lib/perl/5.10.0
    /usr/local/share/perl/5.10.0
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.10
    /usr/share/perl/5.10
    /usr/local/lib/site_perl
--------------------------------------------
$ sudo cpan EV
CPAN: Storable loaded ok (v2.18)
Going to read /home/cnhacktnt/.cpan/Metadata
  Database was generated on Tue, 29 Dec 2009 05:38:02 GMT
CPAN: YAML loaded ok (v0.68)
Going to read /home/cnhacktnt/.cpan/build/
............................................................................DONE
Found 6 old builds, restored the state of 6
Running test for module 'EV'
Running make for M/ML/MLEHMANN/EV-3.8.tar.gz
CPAN: LWP::UserAgent loaded ok (v5.833)
CPAN: Time::HiRes loaded ok (v1.9711)
Fetching with LWP:
  http://www.perl.org/CPAN/authors/id/M/ML/MLEHMANN/EV-3.8.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
Fetching with LWP:
  http://www.perl.org/CPAN/authors/id/M/ML/MLEHMANN/CHECKSUMS
Checksum for
/home/cnhacktnt/.cpan/sources/authors/id/M/ML/MLEHMANN/EV-3.8.tar.gz ok
Scanning cache /home/cnhacktnt/.cpan/build for sizes
............................................................................DONE
EV-3.8/
EV-3.8/t/
EV-3.8/t/11_signal.t
EV-3.8/t/08_async.t
EV-3.8/t/06_loop_once.t
EV-3.8/t/03_keepalive.t
EV-3.8/t/04_stat.t
EV-3.8/t/09_brandon.t
EV-3.8/t/05_priority.t
EV-3.8/t/01_timer.t
EV-3.8/t/02_once.t
EV-3.8/t/07_loop_timer.t
EV-3.8/t/00_load.t
EV-3.8/libev/
EV-3.8/libev/ev_port.c
EV-3.8/libev/README
EV-3.8/libev/ev_select.c
EV-3.8/libev/ev_wrap.h
EV-3.8/libev/ev.h
EV-3.8/libev/ev_vars.h
EV-3.8/libev/LICENSE
EV-3.8/libev/Changes
EV-3.8/libev/ev_poll.c
EV-3.8/libev/ev_kqueue.c
EV-3.8/libev/ev_win32.c
EV-3.8/libev/ev_epoll.c
EV-3.8/libev/ev.c
EV-3.8/libev/ev.pod
EV-3.8/COPYING
EV-3.8/Changes
EV-3.8/MANIFEST
EV-3.8/typemap
EV-3.8/schmorp.h
EV-3.8/EV/
EV-3.8/EV/EVAPI.h
EV-3.8/EV/MakeMaker.pm
EV-3.8/EV.xs
EV-3.8/EV.pm
EV-3.8/README
EV-3.8/Makefile.PL
EV-3.8/META.yml
CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build M/ML/MLEHMANN/EV-3.8.tar.gz


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Welcome to EV configuration. If you are in a hurry, just press return here
and hope for the best. The defaults should usually do.

Skip further questions and use defaults (y/n)? [y]

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


POSIX optionally offers support for a monotonic clock source. EV
can take advantage of this clock source to detect time jumps
reliably. Unfortunately, some systems are bound to be broken, so you can
disable this here: you can completely disable the detection and use of
the monotonic clock by answering 'n' here. Support for this clock type
will otherwise be autodetected at both compile- and runtime. (this setting
currently affects the use of nanosleep over select as well).

Enable optional support for CLOCK_MONOTONIC (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


POSIX optionally offers support for a (potentially) high-resolution
realtime clock interface. In a good implementation, using it is faster
than the normal method of using gettimeofday. Unfortunately, this option
is also bound to be broken on some systems, and current EV versions do not
actually call C<gettimeofday> very often, so ti defaults to no.

Prefer clock_gettime (CLOCK_REALTIME) over gettimeofday (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


EV can use various backends with various portability issue. The select
backend is the most portable and makes for a good fallback, but it can be
limited to a low number of file descriptors and/or might not compile. If
you have problems with compiling ev_select.c, you might try to play around
with disabling it here, or forcing it to use the fd_set provided by your
OS, via the next question. I highly recommend keeping it in.

Enable select backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


The select backend can operate in two modes. One uses the system-provided
fd_set and is usually limited to 1024 file descriptors (64 on windows),
the other requires your header files to define NFDBITS and declare a
suitable fd_mask type. If you run into problems compiling ev_select.c, you
can try forcing the use of the system fd_set here.

Force use of system fd_set for select backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


The second very portable backend is poll(2). It does not exist on windows
and various versions of Mac OS X (and on the other versions it simply
doesn't work), but works basically everywhere else. It is recommended to use
the default here unless you run into compile problems in ev_poll.c.

Enable poll backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Select and poll make it hard to write efficient servers, especially if the
number of active connections is much lower than the watched ones. GNU/Linux
systems have a more scalable method called "epoll", which EV can use. For
this to work, both your kernel and glibc have to support epoll, but if you
can compile it, the detection will be done at runtime, and EV will safely
fall back to using select when epoll isn't available. If unsure, accept
the default.

Enable epoll backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Similarly to the epoll backend above, EV can take advantage of kqueue on
many BSD systems. Support for kqueue will be detected at runtime, with a
safe fallback to other methods when it cannot be used.

Note that kqueue is broken on most operating systems, so by default it
won't be used on many platforms, but you can still create your own event
loop with kqueue backend if you ask specifically for it.

Here is what we know:

NetBSD:  partially working in at least 3.1. Yeah! :)
FreeBSD: broken on at least 6.2-STABLE,
         sockets *likely* work, ptys definitely don't.
OpenBSD: reports indicate that it likely doesn't work
         (similar problems as on FreeBSD).
OS X:    completely, utterly broken on at least < 10.5.

Enable kqueue backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Similarly to the kqueue backend above, EV can take advantage of the
solaris 10 event port interface. Support for event ports will be detected
at runtime, with a safe fallback to other methods when it cannot be used.

Enable event port backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


EV needs the functions pthread_atfork and clock_gettime. On most systems
you need some special libraries for this (such as -lrt and -lpthread). You
can specify additional libraries to provide these calls (and any other
required by EV) now, or accept the default.

Extra libraries for pthread_atfork and clock_gettime? [-lpthread ] -lpthread


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


A backend of a different kind is the Linux inotify(7) interface, which can
be used to speed up (and reduce resource consumption) of stat watchers. If
you have the include file and libc support for it, it is usually a good
idea to enable it, as kernel availability is detected at runtime.

Enable inotify support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Another useful bit of functionality is the Linux eventfd, which is useful
for faster signal handling (don't care) and intra-thread communications
(more relevant). Kernel support for this will be probed at runtime, but
your libc must contain the necessary wrapper. Glibc 2.7 and later should
have this wrapper.

Enable linux eventfd support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Another sometimes useful bit of functionality is the Linux signalfd, which
is useful for faster signal handling (don't care). Kernel support for
this will be probed at runtime, but your libc must contain the necessary
wrapper and include files. Glibc 2.9 and later should have this wrapper.

Enable linux signalfd support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Checking if your kit is complete...
Looks good
Writing Makefile for EV
Could not read '/home/cnhacktnt/.cpan/build/EV-3.8-GILYJq/META.yml'. Falling
back to other methods to determine prerequisites
cp EV/MakeMaker.pm blib/lib/EV/MakeMaker.pm
cp libev/ev.pod blib/lib/EV/libev.pod
cp EV/EVAPI.h blib/lib/EV/EVAPI.h
cp EV.pm blib/lib/EV.pm
cp libev/ev.h blib/lib/EV/ev.h
/usr/bin/perl /usr/share/perl/5.10/ExtUtils/xsubpp  -typemap
/usr/share/perl/5.10/ExtUtils/typemap -typemap typemap  EV.xs > EV.xsc && mv
EV.xsc EV.c
cc -c  -Ilibev -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-g   -DVERSION=\"3.8\" -DXS_VERSION=\"3.8\" -fPIC
"-I/usr/lib/perl/5.10/CORE"  -DEV_USE_MONOTONIC=1 -DEV_USE_REALTIME=0
-DEV_USE_SELECT=1 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_USE_KQUEUE=0
-DEV_USE_PORT=0 -DEV_USE_INOTIFY=1 -DEV_USE_EVENTFD=1 -DEV_USE_SIGNALFD=1
EV.c
In file included from EV.xs:9:
schmorp.h: In function ‘s_epipe_signal’:
schmorp.h:414: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
schmorp.h: In function ‘s_epipe_drain’:
schmorp.h:427: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
In file included from EV.xs:30:
libev/ev.c: In function ‘evpipe_write’:
libev/ev.c:1205: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
libev/ev.c:1209: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
libev/ev.c: In function ‘pipecb’:
libev/ev.c:1226: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
libev/ev.c:1232: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
Running Mkbootstrap for EV ()
chmod 644 EV.bs
rm -f blib/arch/auto/EV/EV.so
cc  -shared -O2 -g -L/usr/local/lib EV.o  -o blib/arch/auto/EV/EV.so     \
       -lpthread      \

chmod 755 blib/arch/auto/EV/EV.so
cp EV.bs blib/arch/auto/EV/EV.bs
chmod 644 blib/arch/auto/EV/EV.bs
Manifying blib/man3/EV::MakeMaker.3pm
Manifying blib/man3/EV::libev.3pm
Manifying blib/man3/EV.3pm
  MLEHMANN/EV-3.8.tar.gz
  /usr/bin/make -- OK
Running make test
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_timer.t ....... ok
t/02_once.t ........ ok
t/03_keepalive.t ... ok
t/04_stat.t ........ Failed 3/14 subtests
t/05_priority.t .... ok
t/06_loop_once.t ... ok
t/07_loop_timer.t .. ok
t/08_async.t ....... ok
t/09_brandon.t ..... ok
t/11_signal.t ...... ok

Test Summary Report
-------------------
t/04_stat.t      (Wstat: 0 Tests: 14 Failed: 3)
  Failed tests:  6-7, 9
Files=11, Tests=6875,  6 wallclock secs ( 1.32 usr  0.02 sys +  0.49 cusr
0.09 csys =  1.92 CPU)
Result: FAIL
Failed 1/11 test programs. 3/6875 subtests failed.
make: *** [test_dynamic] Error 255
  MLEHMANN/EV-3.8.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MLEHMANN/EV-3.8.tar.gz
Failed during this command:
 MLEHMANN/EV-3.8.tar.gz                       : make_test NO


*=========================================*
On Perl 5.11.2:

$ perl -V
Summary of my perl5 (revision 5 version 11 subversion 2) configuration:

  Platform:
    osname=linux, osvers=2.6.31-15-generic, archname=i686-linux
    uname='linux reborn 2.6.31-15-generic #50-ubuntu smp tue nov 10 14:54:29
utc 2009 i686 gnulinux '
    config_args='-Dusedevel -Dprefix=/home/cnhacktnt/perl -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
    ccversion='', gccversion='4.4.1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.10.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_USE_DEVEL
                        USE_LARGE_FILES USE_PERLIO
  Built under linux
  Compiled at Dec  3 2009 14:50:59
  @INC:
    /home/cnhacktnt/perl/lib/site_perl/5.11.2/i686-linux
    /home/cnhacktnt/perl/lib/site_perl/5.11.2
    /home/cnhacktnt/perl/lib/5.11.2/i686-linux
    /home/cnhacktnt/perl/lib/5.11.2
-------------------------------------------------------------------------------------------
$ cpan EV

CPAN: Storable loaded ok (v2.22)
Going to read '/home/cnhacktnt/.mycpan/Metadata'
  Database was generated on Tue, 29 Dec 2009 00:34:22 GMT
Running install for module 'EV'
CPAN: YAML loaded ok (v0.70)
Running make for M/ML/MLEHMANN/EV-3.8.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.023)
Checksum for
/home/cnhacktnt/.mycpan/sources/authors/id/M/ML/MLEHMANN/EV-3.8.tar.gz ok
Scanning cache /home/cnhacktnt/.mycpan/build for sizes
............................................................................DONE
CPAN: Archive::Tar loaded ok (v1.54)
EV-3.8/
EV-3.8/t/
EV-3.8/t/11_signal.t
EV-3.8/t/08_async.t
EV-3.8/t/06_loop_once.t
EV-3.8/t/03_keepalive.t
EV-3.8/t/04_stat.t
EV-3.8/t/09_brandon.t
EV-3.8/t/05_priority.t
EV-3.8/t/01_timer.t
EV-3.8/t/02_once.t
EV-3.8/t/07_loop_timer.t
EV-3.8/t/00_load.t
EV-3.8/libev/
EV-3.8/libev/ev_port.c
EV-3.8/libev/README
EV-3.8/libev/ev_select.c
EV-3.8/libev/ev_wrap.h
EV-3.8/libev/ev.h
EV-3.8/libev/ev_vars.h
EV-3.8/libev/LICENSE
EV-3.8/libev/Changes
EV-3.8/libev/ev_poll.c
EV-3.8/libev/ev_kqueue.c
EV-3.8/libev/ev_win32.c
EV-3.8/libev/ev_epoll.c
EV-3.8/libev/ev.c
EV-3.8/libev/ev.pod
EV-3.8/COPYING
EV-3.8/Changes
EV-3.8/MANIFEST
EV-3.8/typemap
EV-3.8/schmorp.h
EV-3.8/EV/
EV-3.8/EV/EVAPI.h
EV-3.8/EV/MakeMaker.pm
EV-3.8/EV.xs
EV-3.8/EV.pm
EV-3.8/README
EV-3.8/Makefile.PL
EV-3.8/META.yml
CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build M/ML/MLEHMANN/EV-3.8.tar.gz


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Welcome to EV configuration. If you are in a hurry, just press return here
and hope for the best. The defaults should usually do.

Skip further questions and use defaults (y/n)? [y]

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


POSIX optionally offers support for a monotonic clock source. EV
can take advantage of this clock source to detect time jumps
reliably. Unfortunately, some systems are bound to be broken, so you can
disable this here: you can completely disable the detection and use of
the monotonic clock by answering 'n' here. Support for this clock type
will otherwise be autodetected at both compile- and runtime. (this setting
currently affects the use of nanosleep over select as well).

Enable optional support for CLOCK_MONOTONIC (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


POSIX optionally offers support for a (potentially) high-resolution
realtime clock interface. In a good implementation, using it is faster
than the normal method of using gettimeofday. Unfortunately, this option
is also bound to be broken on some systems, and current EV versions do not
actually call C<gettimeofday> very often, so ti defaults to no.

Prefer clock_gettime (CLOCK_REALTIME) over gettimeofday (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


EV can use various backends with various portability issue. The select
backend is the most portable and makes for a good fallback, but it can be
limited to a low number of file descriptors and/or might not compile. If
you have problems with compiling ev_select.c, you might try to play around
with disabling it here, or forcing it to use the fd_set provided by your
OS, via the next question. I highly recommend keeping it in.

Enable select backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


The select backend can operate in two modes. One uses the system-provided
fd_set and is usually limited to 1024 file descriptors (64 on windows),
the other requires your header files to define NFDBITS and declare a
suitable fd_mask type. If you run into problems compiling ev_select.c, you
can try forcing the use of the system fd_set here.

Force use of system fd_set for select backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


The second very portable backend is poll(2). It does not exist on windows
and various versions of Mac OS X (and on the other versions it simply
doesn't work), but works basically everywhere else. It is recommended to use
the default here unless you run into compile problems in ev_poll.c.

Enable poll backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Select and poll make it hard to write efficient servers, especially if the
number of active connections is much lower than the watched ones. GNU/Linux
systems have a more scalable method called "epoll", which EV can use. For
this to work, both your kernel and glibc have to support epoll, but if you
can compile it, the detection will be done at runtime, and EV will safely
fall back to using select when epoll isn't available. If unsure, accept
the default.

Enable epoll backend (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Similarly to the epoll backend above, EV can take advantage of kqueue on
many BSD systems. Support for kqueue will be detected at runtime, with a
safe fallback to other methods when it cannot be used.

Note that kqueue is broken on most operating systems, so by default it
won't be used on many platforms, but you can still create your own event
loop with kqueue backend if you ask specifically for it.

Here is what we know:

NetBSD:  partially working in at least 3.1. Yeah! :)
FreeBSD: broken on at least 6.2-STABLE,
         sockets *likely* work, ptys definitely don't.
OpenBSD: reports indicate that it likely doesn't work
         (similar problems as on FreeBSD).
OS X:    completely, utterly broken on at least < 10.5.

Enable kqueue backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Similarly to the kqueue backend above, EV can take advantage of the
solaris 10 event port interface. Support for event ports will be detected
at runtime, with a safe fallback to other methods when it cannot be used.

Enable event port backend (y/n)? [n] n

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


EV needs the functions pthread_atfork and clock_gettime. On most systems
you need some special libraries for this (such as -lrt and -lpthread). You
can specify additional libraries to provide these calls (and any other
required by EV) now, or accept the default.

Extra libraries for pthread_atfork and clock_gettime? [-lpthread ] -lpthread


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


A backend of a different kind is the Linux inotify(7) interface, which can
be used to speed up (and reduce resource consumption) of stat watchers. If
you have the include file and libc support for it, it is usually a good
idea to enable it, as kernel availability is detected at runtime.

Enable inotify support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Another useful bit of functionality is the Linux eventfd, which is useful
for faster signal handling (don't care) and intra-thread communications
(more relevant). Kernel support for this will be probed at runtime, but
your libc must contain the necessary wrapper. Glibc 2.7 and later should
have this wrapper.

Enable linux eventfd support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Another sometimes useful bit of functionality is the Linux signalfd, which
is useful for faster signal handling (don't care). Kernel support for
this will be probed at runtime, but your libc must contain the necessary
wrapper and include files. Glibc 2.9 and later should have this wrapper.

Enable linux signalfd support (y/n)? [y] y

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Checking if your kit is complete...
Looks good
Writing Makefile for EV
Could not read '/home/cnhacktnt/.mycpan/build/EV-3.8-rJIZhz/META.yml'.
Falling back to other methods to determine prerequisites
cp EV/MakeMaker.pm blib/lib/EV/MakeMaker.pm
cp libev/ev.pod blib/lib/EV/libev.pod
cp EV/EVAPI.h blib/lib/EV/EVAPI.h
cp EV.pm blib/lib/EV.pm
cp libev/ev.h blib/lib/EV/ev.h
/home/cnhacktnt/perl/bin/perl5.11.2
/home/cnhacktnt/perl/lib/5.11.2/ExtUtils/xsubpp  -typemap
/home/cnhacktnt/perl/lib/5.11.2/ExtUtils/typemap -typemap typemap  EV.xs >
EV.xsc && mv EV.xsc EV.c
cc -c  -Ilibev -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"3.8\" -DXS_VERSION=\"3.8\" -fPIC
"-I/home/cnhacktnt/perl/lib/5.11.2/i686-linux/CORE"  -DEV_USE_MONOTONIC=1
-DEV_USE_REALTIME=0 -DEV_USE_SELECT=1 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1
-DEV_USE_KQUEUE=0 -DEV_USE_PORT=0 -DEV_USE_INOTIFY=1 -DEV_USE_EVENTFD=1
-DEV_USE_SIGNALFD=1 EV.c
In file included from EV.xs:9:
schmorp.h: In function ‘s_epipe_signal’:
schmorp.h:414: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
schmorp.h: In function ‘s_epipe_drain’:
schmorp.h:427: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
In file included from EV.xs:30:
libev/ev.c: In function ‘evpipe_write’:
libev/ev.c:1205: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
libev/ev.c:1209: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result
libev/ev.c: In function ‘pipecb’:
libev/ev.c:1226: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
libev/ev.c:1232: warning: ignoring return value of ‘read’, declared with
attribute warn_unused_result
Running Mkbootstrap for EV ()
chmod 644 EV.bs
rm -f blib/arch/auto/EV/EV.so
LD_RUN_PATH="/lib" cc  -shared -O2 -L/usr/local/lib -fstack-protector EV.o
-o blib/arch/auto/EV/EV.so     \
       -lpthread      \

chmod 755 blib/arch/auto/EV/EV.so
cp EV.bs blib/arch/auto/EV/EV.bs
chmod 644 blib/arch/auto/EV/EV.bs
Manifying blib/man3/EV::MakeMaker.3
Manifying blib/man3/EV::libev.3
Manifying blib/man3/EV.3
  MLEHMANN/EV-3.8.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /home/cnhacktnt/perl/bin/perl5.11.2
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')"
t/*.t
t/00_load.t ........ ok
t/01_timer.t ....... ok
t/02_once.t ........ ok
t/03_keepalive.t ... ok
t/04_stat.t ........ Failed 3/14 subtests
t/05_priority.t .... ok
t/06_loop_once.t ... ok
t/07_loop_timer.t .. ok
t/08_async.t ....... ok
t/09_brandon.t ..... ok
t/11_signal.t ...... ok

Test Summary Report
-------------------
t/04_stat.t      (Wstat: 0 Tests: 14 Failed: 3)
  Failed tests:  6-7, 9
Files=11, Tests=6875,  6 wallclock secs ( 1.18 usr  0.03 sys +  0.50 cusr
0.08 csys =  1.79 CPU)
Result: FAIL
Failed 1/11 test programs. 3/6875 subtests failed.
make: *** [test_dynamic] Error 255
  MLEHMANN/EV-3.8.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MLEHMANN/EV-3.8.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 MLEHMANN/EV-3.8.tar.gz                       : make_test NO

======================= END =================================

While use "prove -bv t/04_stat.t", I got:
-----

$ prove -bv t/04_stat.t
t/04_stat.t ..
1..14
ok 1
ok 2
ok 3
ok 4
ok 5
not ok 6
not ok 7
ok 8
not ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
Failed 3/14 subtests

Test Summary Report
-------------------
t/04_stat.t (Wstat: 0 Tests: 14 Failed: 3)
  Failed tests:  6-7, 9
Files=1, Tests=14,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.08 cusr  0.00
csys =  0.13 CPU)
Result: FAIL

============

I also noticed that there is a same bug reported on rt.cpan.org(
http://rt.cpan.org/Public/Bug/Display.html?id=51172)

Could you take a look into this?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20091229/bf225f8c/attachment-0001.html>


More information about the libev mailing list