develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #134043] Net-Ping tests fail on Android 8.1 (Oreo) becausegetprotobyname etc. aren't implemented

Thread Next
From:
Richard Leach
Date:
April 18, 2019 00:09
Subject:
[perl #134043] Net-Ping tests fail on Android 8.1 (Oreo) becausegetprotobyname etc. aren't implemented
Message ID:
rt-4.0.24-21602-1555546164-677.134043-75-0@perl.org
# New Ticket Created by  Richard Leach 
# Please include the string:  [perl #134043]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134043 >


Related to the efforts in RT#133787 to build Perl on Android 8.1
(Oreo) under the Termux app environment, Net-Ping tests fail under
"make test" because getprotobyname & co have not been implemented in
the Bionic libraries. (Empty stubs in [1].) Besides causing test
failures during build, presumably a lot of real network-related code
would also fail.

The common test behaviour is the failure to get (tcp|udp) protocol by name, e.g.

  $ ./perl -T -Ilib dist/Net-Ping/t/010_pingecho.t
  1..2
  ok 1 - use Net::Ping;
  Can't get tcp protocol by name at dist/Net-Ping/t/010_pingecho.t line 17.
  # Looks like your test exited with 255 just after 1.

For reference, the cross-compiled version of Perl that ships with
Termux also appears broken in this regard on Android:

  $ perl -MNet::Ping -e 'my $p = Net::Ping->new();'
  Can't get tcp protocol by name at -e line 1.

Some other interpreter projects/builds [2,3] have worked around this
situation by re-implementing the missing functionality. Is this
something that could feasibly be done for the perl interpreter?


[1] https://android.googlesource.com/platform/bionic/+/master/libc/bionic/netdb.cpp
[2] https://github.com/termux/termux-packages/issues/2387
[3] https://github.com/ageneau/ecl-android/blob/master/patches/ecl/0001-Fix-socket-implementation-on-android-getprotobyname-.patch


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About