Description
Description
Hi All, I want to make a perl binary and run on Android OS 5.0+.
As I checked on README.android, this is very outdated I guest, so I do it by self.
I have to download the source code of Perl as of version perl-5.30.0.tar.gz
then unzip into storage.
All right, this is my steps just I do.
- Unzip perl source.
- Config the EVN and cd to that folder.
# For Perl Build
export TARGETDIR=/data/local/tmp/perl
export TARGET_ARCH=i686-linux-android
export HOST_TAG=darwin-x86_64
export TOOLCHAIN=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$HOST_TAG
export SYSROOT=/Users/mbp0015/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-x86
export AR=$TOOLCHAIN/bin/$TARGET_ARCH-ar
export AS=$TOOLCHAIN/bin/$TARGET_ARCH-as
export CC=$TOOLCHAIN/bin/${TARGET_ARCH}21-clang
export CXX=$TOOLCHAIN/bin/${TARGET_ARCH}21-clang++
export LD=$TOOLCHAIN/bin/$TARGET_ARCH-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET_ARCH-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET_ARCH-strip
export PATH=$PATH:$TOOLCHAIN/bin
# move to that folder
cd perl-5.30.0
# Create AVD with x86 architect, also create folder of TARGETDIR on that device based `adb` shell
# Run Configuration
./Configure -des -Dusecrosscompile -Dtargetarch=$TARGET_ARCH -Dtargetrun=adb -Dcc=$CC -Dranlib=$RANLIB -Dsysroot=$SYSROOT -Dtargetdir=$TARGETDIR -Dtargethost=emulator-5554
The configuration is built successfully as expected results, the config.sh
also make file
is generated.
So, I ran the make
command and got some problems that I didn't know why
/Users/mbp0015/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android21-clang -c -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" -DXS_VERSION=\"1.76\" -fPIC --sysroot=/Users/mbp0015/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-x86 "-I../.." B.c
Putting child 0x7ffe1fd12dd0 (B.o) PID 14533 on the chain.
Live child 0x7ffe1fd12dd0 (B.o) PID 14533
In file included from B.xs:13:
../../perl.h:697:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
Reaping losing child 0x7ffe1fd12dd0 PID 14533
make[1]: *** [B.o] Error 1
Removing child 0x7ffe1fd12dd0 PID 14533 from chain.
Unsuccessful make(ext/B): code=512 at make_ext.pl line 570.
Reaping losing child 0x7ff49642a990 PID 14349
make: *** [lib/auto/B/B.so] Error 25
Removing child 0x7ff49642a990 PID 14349 from chain.
Full log
λ mbp0015 [~/Desktop/perl-5.30.0] → make
/bin/ln -s /Users/mbp0015/Desktop/perl-5.30.0/host/generate_uudmap generate_uudmap
./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/Attribute-Handlers/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Attribute-Handlers directly
./miniperl -Ilib make_ext.pl cpan/AutoLoader/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/AutoLoader directly
./miniperl -Ilib make_ext.pl cpan/CPAN/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/CPAN-Meta/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/CPAN-Meta-Requirements/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/CPAN-Meta-Requirements directly
./miniperl -Ilib make_ext.pl cpan/CPAN-Meta-YAML/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/CPAN-Meta-YAML directly
./miniperl -Ilib make_ext.pl dist/Carp/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Carp directly
./miniperl -Ilib make_ext.pl cpan/Config-Perl-V/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Config-Perl-V directly
./miniperl -Ilib make_ext.pl dist/Devel-SelfStubber/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Devel-SelfStubber directly
./miniperl -Ilib make_ext.pl cpan/Digest/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Digest directly
./miniperl -Ilib make_ext.pl dist/Dumpvalue/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Dumpvalue directly
./miniperl -Ilib make_ext.pl dist/Env/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Env directly
./miniperl -Ilib make_ext.pl ext/Errno/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/Exporter/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Exporter directly
./miniperl -Ilib make_ext.pl dist/ExtUtils-CBuilder/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/ExtUtils-CBuilder directly
./miniperl -Ilib make_ext.pl cpan/ExtUtils-Constant/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/ExtUtils-Constant directly
./miniperl -Ilib make_ext.pl cpan/ExtUtils-Install/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/ExtUtils-Install directly
./miniperl -Ilib make_ext.pl cpan/ExtUtils-MakeMaker/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/ExtUtils-Manifest/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl ext/ExtUtils-Miniperl/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for ext/ExtUtils-Miniperl directly
./miniperl -Ilib make_ext.pl dist/ExtUtils-ParseXS/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/File-Fetch/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/File-Fetch directly
./miniperl -Ilib make_ext.pl ext/File-Find/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for ext/File-Find directly
./miniperl -Ilib make_ext.pl cpan/File-Path/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/File-Path directly
./miniperl -Ilib make_ext.pl cpan/File-Temp/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/File-Temp directly
./miniperl -Ilib make_ext.pl ext/FileCache/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for ext/FileCache directly
./miniperl -Ilib make_ext.pl dist/Filter-Simple/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Filter-Simple directly
./miniperl -Ilib make_ext.pl cpan/Getopt-Long/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Getopt-Long directly
./miniperl -Ilib make_ext.pl cpan/HTTP-Tiny/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/I18N-Collate/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/I18N-Collate directly
./miniperl -Ilib make_ext.pl dist/I18N-LangTags/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/I18N-LangTags directly
./miniperl -Ilib make_ext.pl dist/lib/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/IO-Compress/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/IO-Socket-IP/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/IO-Socket-IP directly
./miniperl -Ilib make_ext.pl cpan/IO-Zlib/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/IO-Zlib directly
./miniperl -Ilib make_ext.pl cpan/IPC-Cmd/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/IPC-Cmd directly
./miniperl -Ilib make_ext.pl ext/IPC-Open3/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for ext/IPC-Open3 directly
./miniperl -Ilib make_ext.pl cpan/JSON-PP/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/Locale-Maketext/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Locale-Maketext directly
./miniperl -Ilib make_ext.pl cpan/Locale-Maketext-Simple/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Locale-Maketext-Simple directly
./miniperl -Ilib make_ext.pl cpan/Math-BigInt/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Math-BigInt directly
./miniperl -Ilib make_ext.pl cpan/Math-BigRat/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Math-BigRat directly
./miniperl -Ilib make_ext.pl cpan/Math-Complex/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Math-Complex directly
./miniperl -Ilib make_ext.pl cpan/Memoize/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Memoize directly
./miniperl -Ilib make_ext.pl dist/Module-CoreList/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Module-Load/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Module-Load directly
./miniperl -Ilib make_ext.pl cpan/Module-Load-Conditional/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Module-Load-Conditional directly
./miniperl -Ilib make_ext.pl cpan/Module-Loaded/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Module-Loaded directly
./miniperl -Ilib make_ext.pl cpan/Module-Metadata/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/NEXT/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/NEXT directly
./miniperl -Ilib make_ext.pl dist/Net-Ping/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Net-Ping directly
./miniperl -Ilib make_ext.pl cpan/Params-Check/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Params-Check directly
./miniperl -Ilib make_ext.pl cpan/Perl-OSType/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Perl-OSType directly
./miniperl -Ilib make_ext.pl cpan/PerlIO-via-QuotedPrint/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/PerlIO-via-QuotedPrint directly
./miniperl -Ilib make_ext.pl cpan/Pod-Checker/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Pod-Escapes/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Pod-Escapes directly
./miniperl -Ilib make_ext.pl cpan/Pod-Simple/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Pod-Simple directly
./miniperl -Ilib make_ext.pl ext/Pod-Functions/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl ext/Pod-Html/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Pod-Parser/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Pod-Perldoc/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Pod-Usage/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/Safe/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Safe directly
./miniperl -Ilib make_ext.pl dist/Search-Dict/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Search-Dict directly
./miniperl -Ilib make_ext.pl dist/SelfLoader/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/SelfLoader directly
./miniperl -Ilib make_ext.pl cpan/Term-ANSIColor/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Term-ANSIColor directly
./miniperl -Ilib make_ext.pl cpan/Term-Cap/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl dist/Term-Complete/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Term-Complete directly
./miniperl -Ilib make_ext.pl dist/Term-ReadLine/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Term-ReadLine directly
./miniperl -Ilib make_ext.pl dist/Test/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Test directly
./miniperl -Ilib make_ext.pl cpan/Test-Harness/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/Test-Simple/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Test-Simple directly
./miniperl -Ilib make_ext.pl dist/Text-Abbrev/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Text-Abbrev directly
./miniperl -Ilib make_ext.pl cpan/Text-Balanced/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Text-Balanced directly
./miniperl -Ilib make_ext.pl cpan/Text-ParseWords/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Text-ParseWords directly
./miniperl -Ilib make_ext.pl cpan/Text-Tabs/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Text-Tabs directly
./miniperl -Ilib make_ext.pl dist/Thread-Queue/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Thread-Queue directly
./miniperl -Ilib make_ext.pl dist/Thread-Semaphore/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Thread-Semaphore directly
./miniperl -Ilib make_ext.pl dist/Tie-File/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/Tie-File directly
./miniperl -Ilib make_ext.pl ext/Tie-Memoize/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for ext/Tie-Memoize directly
./miniperl -Ilib make_ext.pl cpan/Tie-RefHash/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Tie-RefHash directly
./miniperl -Ilib make_ext.pl cpan/Time-Local/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/Time-Local directly
./miniperl -Ilib make_ext.pl dist/XSLoader/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/autodie/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/autodie directly
./miniperl -Ilib make_ext.pl dist/autouse/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/autouse directly
./miniperl -Ilib make_ext.pl dist/base/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/bignum/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/bignum directly
./miniperl -Ilib make_ext.pl dist/constant/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/constant directly
./miniperl -Ilib make_ext.pl dist/encoding-warnings/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for dist/encoding-warnings directly
./miniperl -Ilib make_ext.pl cpan/experimental/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/experimental directly
./miniperl -Ilib make_ext.pl dist/if/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/libnet/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
./miniperl -Ilib make_ext.pl cpan/parent/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/parent directly
./miniperl -Ilib make_ext.pl cpan/perlfaq/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/perlfaq directly
./miniperl -Ilib make_ext.pl cpan/podlators/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Manifying 2 pod documents
./miniperl -Ilib make_ext.pl cpan/version/pm_to_blib MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a
Running pm_to_blib for cpan/version directly
./miniperl -Ilib lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
lib/unicore/mktables: Files seem to be ok, not bothering to rebuild. Add '-w' option to force build
./miniperl -Ilib make_ext.pl DynaLoader.o MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a LINKTYPE=static CCCDLFLAGS=
./miniperl -Ilib mkppport
running "/Users/mbp0015/Desktop/perl-5.30.0/host/miniperl" -I../../lib PPPort_pm.PL
mysterious name [ENTER_with_name(name)] in parts/apidoc.fnc, line 161
mysterious name [LEAVE_with_name(name)] in parts/apidoc.fnc, line 164
including ppphdoc
including ppphbin
including version
including threads
including limits
including misc
including warn
including uv
including memory
including magic_defs
including mess
including variables
including mPUSH
including call
including newRV
including newCONSTSUB
including MY_CXT
including format
including SvREFCNT
including newSV_type
including newSVpv
including SvPV
including Sv_set
including sv_xpvf
including shared_pv
including HvNAME
including gv
including pvs
including magic
including cop
including grok
including snprintf
including sprintf
including exception
including strlfuncs
including pv_tools
parts/inc/misc provides av_tindex, which is still marked todo for 5.17.9
parts/inc/misc provides av_top_index, which is still marked todo for 5.17.9
parts/inc/misc provides isALPHANUMERIC, which is still marked todo for 5.17.8
parts/inc/misc provides isIDCONT, which is still marked todo for 5.17.8
parts/inc/misc provides isOCTAL, which is still marked todo for 5.13.5
parts/inc/misc provides isWORDCHAR, which is still marked todo for 5.13.6
parts/inc/uv provides utf8_to_uvchr_buf, which is still marked todo for 5.15.9
parts/inc/mess provides vmess, which is still marked todo for 5.6.0
running "/Users/mbp0015/Desktop/perl-5.30.0/host/miniperl" -I../../lib ppport_h.PL
ppport.h in cpan/DB_File is up-to-date
ppport.h in cpan/IPC-SysV is up-to-date
ppport.h in cpan/Win32API-File is up-to-date
ppport.h in dist/IO is up-to-date
ppport.h in dist/Storable is up-to-date
removing temporary file PPPort.pm
removing temporary file ppport.h
./miniperl -Ilib make_ext.pl lib/auto/B/B.so MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a LINKTYPE=dynamic
/Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../host/miniperl "-I/Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- B.bs /Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../lib/auto/B/B.bs 644
/Users/mbp0015/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android21-clang -c -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" -DXS_VERSION=\"1.76\" -fPIC --sysroot=/Users/mbp0015/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-x86 "-I../.." B.c
In file included from B.xs:13:
../../perl.h:697:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
make[1]: *** [B.o] Error 1
/Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../host/miniperl "-I/Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- B.bs /Users/mbp0015/Desktop/perl-5.30.0/ext/B/../../lib/auto/B/B.bs 644
/Users/mbp0015/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android21-clang -c -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" -DXS_VERSION=\"1.76\" -fPIC --sysroot=/Users/mbp0015/Library/Android/sdk/ndk-bundle/platforms/android-21/arch-x86 "-I../.." B.c
In file included from B.xs:13:
../../perl.h:697:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
make[1]: *** [B.o] Error 1
Unsuccessful make(ext/B): code=512 at make_ext.pl line 570.
make: *** [lib/auto/B/B.so] Error 2
Expected behavior
make file successfully and got the perl
binary-based android architect.
Perl configuration
NDK version: latest version on Google r20
https://developer.android.com/ndk/downloads
ToolChain:
From r19, Google officially make a Tool Chain are standalone toolchains
Warning: If using r19 or newer, follow the Other Build Systems document for instructions on using the NDK toolchains with arbitrary build systems. As of r19, the NDK's default toolchains are standalone toolchains, which renders this process unnecessary.
So I didn't run a standalone toolchain script. See the EVN of TOOLCHAIN
SYSROOT
Attached config.sh and MakeFile as bellow
OS: Mac OS Catalina
version 10.15.1