无法在alpine linux上安装EV cpan模块

时间:2016-08-21 16:12:52

标签: linux perl alpine libev cpanm

虽然这适用于debian,但alpine拒绝编译(perl 5.20.3 && plenv)。

模块instaled =>

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

1 个答案:

答案 0 :(得分:2)

所以musl-libc用于alpine linux而不是glibc,不会实现__register_atfork

export EV_EXTRA_DEFS="-DEV_NO_ATFORK" cpanm EV

如果你绝对确定没有非工作分叉检测,你可以通过指示它跳过该功能来安装the linux standard base

trigger