虽然这适用于 debian,但 alpine 拒绝编译 ( perl 5.20.3 && plenv
)。
已安装模块 =>
apk update && apk upgrade
apk add bash wget curl perl make g++ libev-dev patch git openssl-dev openssl
如何解释 cpanm 日志中的相关错误?
Running Mkbootstrap for EV ()
chmod 644 EV.bs
/root/.plenv/versions/5.20.3/bin/perl5.20.3 /root/.plenv/versions/5.20.3/lib/perl5/5.20.3/ExtUtils/xsubpp -typemap /root/.plenv/versions/5.20.3/lib/perl5/5.
20.3/ExtUtils/typemap -typemap typemap EV.xs > EV.xsc && mv EV.xsc EV.c
cc -c -Ilibev -fwrapv -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"4.22\" -DXS_VERSION=\"4.22\"
-fPIC "-I/root/.plenv/versions/5.20.3/lib/perl5/5.20.3/x86_64-linux/CORE" -DEV_USE_REALTIME=0 -DEV_USE_SELECT=1 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_USE_K
QUEUE=0 -DEV_USE_PORT=0 -DEV_USE_INOTIFY=1 -DEV_USE_EVENTFD=1 -DEV_USE_SIGNALFD=1 EV.c
rm -f blib/arch/auto/EV/EV.so
cc -shared -O2 -L/usr/local/lib -fstack-protector EV.o -o blib/arch/auto/EV/EV.so \
\
chmod 755 blib/arch/auto/EV/EV.so
/root/.plenv/versions/5.20.3/bin/perl5.20.3 -MExtUtils::Command::MM -e 'cp_nonempty' -- EV.bs blib/arch/auto/EV/EV.bs 644
Manifying blib/man3/EV.0
Manifying blib/man3/EV::MakeMaker.0
Manifying blib/man3/EV::libev.0
Running Mkbootstrap for EV ()
chmod 644 EV.bs
PERL_DL_NONLAZY=1 /root/.plenv/versions/5.20.3/bin/perl5.20.3 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(
0, 'blib/lib', 'blib/arch')" t/*.t
syntax error at t/00_load.t line 10, near "EV::idle sub "
syntax error at t/00_load.t line 10, near "->stop }"
syntax error at t/00_load.t line 16, near "EV::idle sub "
syntax error at t/00_load.t line 16, near "->stop }"
Execution of t/00_load.t aborted due to compilation errors.
t/00_load.t ........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 4/5 subtests
Can't load '/root/.cpanm/work/1471788690.18875/EV-4.22/blib/arch/auto/EV/EV.so' for module EV: Error relocating /root/.cpanm/work/1471788690.18875/EV-4.22/bl
ib/arch/auto/EV/EV.so: __register_atfork: symbol not found at /root/.plenv/versions/5.20.3/lib/perl5/5.20.3/x86_64-linux/DynaLoader.pm line 193.
at /root/.cpanm/work/1471788690.18875/EV-4.22/blib/lib/EV.pm line 128.
BEGIN failed--compilation aborted at /root/.cpanm/work/1471788690.18875/EV-4.22/blib/lib/EV.pm line 128.
Compilation failed in require at t/01_timer.t line 15.
BEGIN failed--compilation aborted at t/01_timer.t line 15.
t/01_timer.t .......
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 6002/6002 subtests