1

While this works on debian, alpine refuses to compile (perl 5.20.3 && plenv).

Modules instaled =>

apk update && apk upgrade
apk add bash wget curl perl make g++ libev-dev patch git openssl-dev openssl

How to explain relevant error from cpanm log?

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
mpapec
  • 50,217
  • 8
  • 67
  • 127
  • I'm sorry to tell you that EV is unlikely to work with many perl builds, and please don't take my word for this please read some recent reviews (http://cpanratings.perl.org/dist/EV) and do some further research on p5p – Dr.Avalanche Aug 21 '16 at 18:37
  • @Dr.Avalanche note that on debian it works with the same perl build. – mpapec Aug 21 '16 at 18:43
  • @Сухой27 Do you have perl-dev installed? – Jakub Jirutka Aug 23 '16 at 21:51
  • @JakubJirutka no, I'm using my own perl built from source under my home dir. (https://github.com/tokuhirom/plenv similar to perlbrew) – mpapec Aug 24 '16 at 06:15

1 Answers1

2

So musl-libc which is used in alpine linux instead of glibc, doesn't implement __register_atfork which is part of the linux standard base

If you're absolutely sure you can live without non-working fork detection, you can install EV by instructing it to skip that feature,

export EV_EXTRA_DEFS="-DEV_NO_ATFORK"
cpanm EV
mpapec
  • 50,217
  • 8
  • 67
  • 127