Skip to content

Instantly share code, notes, and snippets.

@KoviRobi
Last active June 20, 2025 21:16
Show Gist options
  • Save KoviRobi/9361a808c5543e57b68d531553269dba to your computer and use it in GitHub Desktop.
Save KoviRobi/9361a808c5543e57b68d531553269dba to your computer and use it in GitHub Desktop.
OCaml on Android

Building OCaml on Android/termux

My system is an Android Android 11 aarch64/Lenovo L79031 (Legion Duel)

System details (neofetch)
u0_a345@localhost
-----------------
OS: Android 11 aarch64
Host: Lenovo Lenovo L79031
Kernel: 4.19.136-perf+
Uptime: 5 days, 10 hours, 33 mins
Packages: 464 (dpkg), 1 (pkg)
Shell: zsh 5.9
Resolution: 2192x996
WM: i3
Terminal: tmux
CPU: Qualcomm KONA (8) @ 1.804GHz
Memory: 9744MiB / 15733MiB
With escape codes
�[?25l�[?7l�[0m�[32m�[1m         -o          o-
          +hydNNNNdyh+
        +mMMMMMMMMMMMMm+
      `dMM�[37m�[0m�[1mm:�[0m�[32m�[1mNMMMMMMN�[37m�[0m�[1m:m�[0m�[32m�[1mMMd`
      hMMMMMMMMMMMMMMMMMMh
  ..  yyyyyyyyyyyyyyyyyyyy  ..
.mMMm`MMMMMMMMMMMMMMMMMMMM`mMMm.
:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
:MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM:
-MMMM-MMMMMMMMMMMMMMMMMMMM-MMMM-
 +yy+ MMMMMMMMMMMMMMMMMMMM +yy+
      mMMMMMMMMMMMMMMMMMMm
      `/++MMMMh++hMMMM++/`
          MMMMo  oMMMM
          MMMMo  oMMMM
          oNMm-  -mMNs�[0m
�[18A�[9999999D�[35C�[0m�[1m�[32m�[1mu0_a345�[0m@�[32m�[1mlocalhost�[0m
�[35C�[0m-----------------�[0m
�[35C�[0m�[32m�[1mOS�[0m�[0m:�[0m Android 11 aarch64�[0m
�[35C�[0m�[32m�[1mHost�[0m�[0m:�[0m Lenovo Lenovo L79031�[0m
�[35C�[0m�[32m�[1mKernel�[0m�[0m:�[0m 4.19.136-perf+�[0m
�[35C�[0m�[32m�[1mUptime�[0m�[0m:�[0m 5 days, 10 hours, 31 mins�[0m
�[35C�[0m�[32m�[1mPackages�[0m�[0m:�[0m 464 (dpkg), 1 (pkg)�[0m
�[35C�[0m�[32m�[1mShell�[0m�[0m:�[0m zsh 5.9�[0m
�[35C�[0m�[32m�[1mResolution�[0m�[0m:�[0m 2192x996�[0m
�[35C�[0m�[32m�[1mWM�[0m�[0m:�[0m i3�[0m
�[35C�[0m�[32m�[1mTerminal�[0m�[0m:�[0m tmux�[0m
�[35C�[0m�[32m�[1mCPU�[0m�[0m:�[0m Qualcomm KONA (8) @ 1.804GHz�[0m
�[35C�[0m�[32m�[1mMemory�[0m�[0m:�[0m 9741MiB / 15733MiB�[0m

�[35C�[30m�[40m   �[31m�[41m   �[32m�[42m   �[33m�[43m   �[34m�[44m   �[35m�[45m   �[36m�[46m   �[37m�[47m   �[m
�[35C�[38;5;8m�[48;5;8m   �[38;5;9m�[48;5;9m   �[38;5;10m�[48;5;10m   �[38;5;11m�[48;5;11m   �[38;5;12m�[48;5;12m   �[38;5;13m�[48;5;13m   �[38;5;14m�[48;5;14m   �[38;5;15m�[48;5;15m   �[m



�[?25h�[?7h

I am building OCaml 5.2 (5.3 fails)

Without `LDFLAGS=-landroid-shmem`
./configure --prefix=$HOME/pdev/ocaml/.install
configure: Configuring OCaml version 5.2.2+dev0-2024-11-18
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for csc... no
checking for ld... ld
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed
checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /data/data/com.termux/files/usr/bin/nm -B
checking the name lister (/data/data/com.termux/files/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /data/data/com.termux/files/usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /data/data/com.termux/files/usr/bin/dd
checking how to truncate binary pipes... /data/data/com.termux/files/usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C preprocessor... gcc -E
checking C compiler vendor... clang-19-1
checking whether host executables can be run in the build... yes
checking whether #! works in shell scripts... yes
checking whether C compiler accepts -Wold-style-declaration... no
checking for flexdll sources... checking for flexlink... no
checking for flexdll.h... no
checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
checking for library containing cos... -lm
checking for unistd.h... (cached) yes
checking for math.h... yes
checking for stdint.h... (cached) yes
checking for pthread_np.h... no
checking for dirent.h... yes
checking for sys/select.h... yes
checking for stdatomic.h... yes
checking for sys/mman.h... yes
checking for off_t... yes
checking size of int... 4
checking size of long... 8
checking size of long *... 8
checking size of short... 2
checking size of long long... 8
configure: Target is a 64 bits architecture
checking whether byte ordering is bigendian... no
checking alignment of double... 8
checking alignment of long... 8
checking alignment of long long... 8
checking whether the C compiler supports _Atomic types... yes
checking whether the C compiler supports __attribute__((aligned(n)))... yes
checking whether the C compiler supports __attribute__((optimize("tree-vectorize")))... no
checking for ld... ld
checking for rlwrap... rlwrap
configure: checking semantics of signal handlers
checking for sigaction... yes
checking for sigprocmask... yes
configure: POSIX signal handling found.
checking for expm1... yes
checking for log1p... yes
checking for hypot... yes
checking for fma... yes
checking for exp2... yes
checking for log2... yes
checking for cbrt... yes
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for erf... yes
checking for erfc... yes
checking for trunc... yes
checking for round... yes
checking for copysign... yes
checking whether round works... yes
checking whether fma works... yes
checking for gcc options needed to detect all undeclared functions... none needed
checking for unistd.h... (cached) yes
checking whether getentropy is declared... no
checking for getrusage... yes
checking for times... yes
checking for secure_getenv... no
checking for __secure_getenv... no
checking for issetugid... no
checking for library containing clock_gettime... none required
configure: not using thread sanitizer
checking for socket... yes
checking for socketpair... yes
checking for bind... yes
checking for listen... yes
checking for accept... yes
checking for connect... yes
checking for socklen_t... yes
checking for inet_aton... yes
checking for struct sockaddr_in6... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for inet_pton... yes
checking for inet_ntop... yes
checking for rewinddir... yes
checking for lockf... yes
checking for mkfifo... yes
checking for getcwd... yes
checking whether system is declared... yes
checking for sys/types.h... (cached) yes
checking for utime.h... yes
checking for utime... yes
checking for utimes... yes
checking for fchmod... yes
checking for fchown... yes
checking for truncate... yes
checking for ftruncate... yes
checking for select... yes
checking for fd_set... yes
checking for nanosleep... yes
checking for symlink... yes
checking for readlink... yes
checking for lstat... yes
checking for realpath... yes
checking for waitpid... yes
checking for wait4... yes
checking for getgroups... yes
checking for setgroups... yes
checking for initgroups... yes
checking for termios.h... yes
checking for tcgetattr... yes
checking for tcsetattr... yes
checking for tcsendbreak... yes
checking for tcflush... yes
checking for tcflow... yes
checking for setitimer... yes
checking for gethostname... yes
checking for sys/utsname.h... yes
checking for uname... yes
checking for gettimeofday... yes
checking for mktime... yes
checking for setsid... yes
checking for putenv... yes
checking for setenv... yes
checking for unsetenv... yes
checking for locale.h... yes
checking for newlocale... yes
checking for freelocale... yes
checking for uselocale... yes
checking for xlocale.h... yes
checking for newlocale... (cached) yes
checking for freelocale... (cached) yes
checking for uselocale... (cached) yes
checking for strtod_l... yes
checking for dlopen... yes
configure: Dynamic loading of shared libraries is supported.
checking for sys/mman.h... (cached) yes
checking for mmap... yes
checking for munmap... yes
checking for pwrite... yes
checking whether the C compiler supports -fdebug-prefix-map... yes
checking for struct stat.st_atim.tv_nsec... yes
configure: stat supports nanosecond precision
checking how many arguments gethostbyname_r() takes... six
checking how many arguments gethostbyaddr_r() takes... eight
checking for mkstemp... yes
checking for nice... yes
checking for dup3... yes
checking for pipe2... yes
checking for accept4... yes
checking for getauxval... yes
checking for sys/shm.h... yes
checking for shmat... yes
checking for execvpe... yes
checking for spawn.h... yes
checking for posix_spawn... yes
checking for posix_spawnp... yes
checking for pkg-config... /data/data/com.termux/files/usr/bin/pkg-config
checking whether programs can be linked with zstd... yes
checking whether programs linked with zstd can execute... skipped
configure: compressed compilation artefacts supported
configure: ocamldebug supported
checking whether gcc is Clang... yes
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for sigwait... yes
checking arguments for pthread_getaffinity_np... pthread_getaffinity_np not found
configure: the threads library is supported
checking whether the assembler supports --debug-prefix-map... no
checking whether the assembler supports CFI directives... yes
configure: not using frame pointers
checking whether mmap supports huge pages... yes
checking for patdiff... no
checking for diff... diff
checking whether diff supports --strip-trailing-cr... yes
checking whether diff supports -u... yes
checking whether mmap supports MAP_STACK... yes
configure: creating ./config.status
config.status: creating Makefile.build_config
config.status: creating Makefile.config
config.status: creating stdlib/sys.ml
config.status: creating manual/src/version.tex
config.status: creating manual/src/html_processing/src/common.ml
config.status: creating ocamltest/ocamltest_config.ml
config.status: creating utils/config.common.ml
config.status: creating utils/config.generated.ml
config.status: creating compilerlibs/META
config.status: creating otherlibs/dynlink/META
config.status: creating otherlibs/runtime_events/META
config.status: creating stdlib/META
config.status: creating ocamldoc/META
config.status: creating otherlibs/unix/META
config.status: creating otherlibs/str/META
config.status: creating otherlibs/systhreads/META
config.status: creating runtime/caml/exec.h
config.status: creating runtime/caml/m.h
config.status: creating runtime/caml/s.h
config.status: creating runtime/caml/version.h
config.status: linking otherlibs/unix/unix_unix.ml to otherlibs/unix/unix.ml
config.status: linking ocamltest/ocamltest_unix_real.ml to ocamltest/ocamltest_unix.ml
config.status: executing libtool commands
config.status: executing shebang commands
make -j $(nproc)
mkdir -p .dep/runtime
GEN runtime/caml/opnames.h
GEN runtime/caml/jumptbl.h
CC runtime/sak.o
mkdir -p .dep/ocamltest
CCDEPS .dep/ocamltest/run_unix.d
CCDEPS .dep/ocamltest/run_stubs.d
MKEXE runtime/sak
GEN runtime/build_config.h
CCDEPS .dep/runtime/addrmap.b.d
CCDEPS .dep/runtime/afl.b.d
CCDEPS .dep/runtime/alloc.b.d
CCDEPS .dep/runtime/array.b.d
CCDEPS .dep/runtime/backtrace.b.d
CCDEPS .dep/runtime/bigarray.b.d
CCDEPS .dep/runtime/blake2.b.d
CCDEPS .dep/runtime/callback.b.d
CCDEPS .dep/runtime/codefrag.b.d
CCDEPS .dep/runtime/compare.b.d
CCDEPS .dep/runtime/custom.b.d
CCDEPS .dep/runtime/debugger.b.d
CCDEPS .dep/runtime/domain.b.d
CCDEPS .dep/runtime/dynlink.b.d
CCDEPS .dep/runtime/extern.b.d
CCDEPS .dep/runtime/fiber.b.d
CCDEPS .dep/runtime/finalise.b.d
CCDEPS .dep/runtime/floats.b.d
CCDEPS .dep/runtime/gc_ctrl.b.d
CCDEPS .dep/runtime/gc_stats.b.d
CCDEPS .dep/runtime/globroots.b.d
CCDEPS .dep/runtime/hash.b.d
CCDEPS .dep/runtime/intern.b.d
CCDEPS .dep/runtime/ints.b.d
CCDEPS .dep/runtime/io.b.d
CCDEPS .dep/runtime/lexing.b.d
CCDEPS .dep/runtime/lf_skiplist.b.d
CCDEPS .dep/runtime/main.b.d
CCDEPS .dep/runtime/major_gc.b.d
CCDEPS .dep/runtime/md5.b.d
CCDEPS .dep/runtime/memory.b.d
CCDEPS .dep/runtime/memprof.b.d
CCDEPS .dep/runtime/meta.b.d
CCDEPS .dep/runtime/minor_gc.b.d
CCDEPS .dep/runtime/misc.b.d
CCDEPS .dep/runtime/obj.b.d
CCDEPS .dep/runtime/parsing.b.d
CCDEPS .dep/runtime/platform.b.d
CCDEPS .dep/runtime/printexc.b.d
CCDEPS .dep/runtime/prng.b.d
CCDEPS .dep/runtime/roots.b.d
CCDEPS .dep/runtime/runtime_events.b.d
CCDEPS .dep/runtime/shared_heap.b.d
CCDEPS .dep/runtime/signals.b.d
CCDEPS .dep/runtime/skiplist.b.d
CCDEPS .dep/runtime/startup_aux.b.d
CCDEPS .dep/runtime/str.b.d
CCDEPS .dep/runtime/sync.b.d
CCDEPS .dep/runtime/sys.b.d
CCDEPS .dep/runtime/unix.b.d
CCDEPS .dep/runtime/weak.b.d
CCDEPS .dep/runtime/backtrace_byt.b.d
CCDEPS .dep/runtime/fail_byt.b.d
CCDEPS .dep/runtime/fix_code.b.d
CCDEPS .dep/runtime/interp.b.d
CCDEPS .dep/runtime/startup_byt.b.d
CCDEPS .dep/runtime/zstd.b.d
CCDEPS .dep/runtime/instrtrace.b.d
CCDEPS .dep/runtime/addrmap.n.d
CCDEPS .dep/runtime/afl.n.d
CCDEPS .dep/runtime/alloc.n.d
CCDEPS .dep/runtime/array.n.d
CCDEPS .dep/runtime/backtrace.n.d
CCDEPS .dep/runtime/bigarray.n.d
CCDEPS .dep/runtime/blake2.n.d
CCDEPS .dep/runtime/callback.n.d
CCDEPS .dep/runtime/codefrag.n.d
CCDEPS .dep/runtime/compare.n.d
CCDEPS .dep/runtime/custom.n.d
CCDEPS .dep/runtime/debugger.n.d
CCDEPS .dep/runtime/domain.n.d
CCDEPS .dep/runtime/dynlink.n.d
CCDEPS .dep/runtime/extern.n.d
CCDEPS .dep/runtime/fiber.n.d
CCDEPS .dep/runtime/finalise.n.d
CCDEPS .dep/runtime/floats.n.d
CCDEPS .dep/runtime/gc_ctrl.n.d
CCDEPS .dep/runtime/gc_stats.n.d
CCDEPS .dep/runtime/globroots.n.d
CCDEPS .dep/runtime/hash.n.d
CCDEPS .dep/runtime/intern.n.d
CCDEPS .dep/runtime/ints.n.d
CCDEPS .dep/runtime/io.n.d
CCDEPS .dep/runtime/lexing.n.d
CCDEPS .dep/runtime/lf_skiplist.n.d
CCDEPS .dep/runtime/main.n.d
CCDEPS .dep/runtime/major_gc.n.d
CCDEPS .dep/runtime/md5.n.d
CCDEPS .dep/runtime/memory.n.d
CCDEPS .dep/runtime/memprof.n.d
CCDEPS .dep/runtime/meta.n.d
CCDEPS .dep/runtime/minor_gc.n.d
CCDEPS .dep/runtime/misc.n.d
CCDEPS .dep/runtime/obj.n.d
CCDEPS .dep/runtime/parsing.n.d
CCDEPS .dep/runtime/platform.n.d
CCDEPS .dep/runtime/printexc.n.d
CCDEPS .dep/runtime/prng.n.d
CCDEPS .dep/runtime/roots.n.d
CCDEPS .dep/runtime/runtime_events.n.d
CCDEPS .dep/runtime/shared_heap.n.d
CCDEPS .dep/runtime/signals.n.d
CCDEPS .dep/runtime/skiplist.n.d
CCDEPS .dep/runtime/startup_aux.n.d
CCDEPS .dep/runtime/str.n.d
CCDEPS .dep/runtime/sync.n.d
CCDEPS .dep/runtime/sys.n.d
CCDEPS .dep/runtime/unix.n.d
CCDEPS .dep/runtime/weak.n.d
CCDEPS .dep/runtime/backtrace_nat.n.d
CCDEPS .dep/runtime/clambda_checks.n.d
CCDEPS .dep/runtime/dynlink_nat.n.d
CCDEPS .dep/runtime/fail_nat.n.d
CCDEPS .dep/runtime/frame_descriptors.n.d
CCDEPS .dep/runtime/startup_nat.n.d
CCDEPS .dep/runtime/signals_nat.n.d
CCDEPS .dep/runtime/addrmap.bd.d
CCDEPS .dep/runtime/afl.bd.d
CCDEPS .dep/runtime/alloc.bd.d
CCDEPS .dep/runtime/array.bd.d
CCDEPS .dep/runtime/backtrace.bd.d
CCDEPS .dep/runtime/bigarray.bd.d
CCDEPS .dep/runtime/blake2.bd.d
CCDEPS .dep/runtime/callback.bd.d
CCDEPS .dep/runtime/codefrag.bd.d
CCDEPS .dep/runtime/compare.bd.d
CCDEPS .dep/runtime/custom.bd.d
CCDEPS .dep/runtime/debugger.bd.d
CCDEPS .dep/runtime/domain.bd.d
CCDEPS .dep/runtime/dynlink.bd.d
CCDEPS .dep/runtime/extern.bd.d
CCDEPS .dep/runtime/fiber.bd.d
CCDEPS .dep/runtime/finalise.bd.d
CCDEPS .dep/runtime/floats.bd.d
CCDEPS .dep/runtime/gc_ctrl.bd.d
CCDEPS .dep/runtime/gc_stats.bd.d
CCDEPS .dep/runtime/globroots.bd.d
CCDEPS .dep/runtime/hash.bd.d
CCDEPS .dep/runtime/intern.bd.d
CCDEPS .dep/runtime/ints.bd.d
CCDEPS .dep/runtime/io.bd.d
CCDEPS .dep/runtime/lexing.bd.d
CCDEPS .dep/runtime/lf_skiplist.bd.d
CCDEPS .dep/runtime/main.bd.d
CCDEPS .dep/runtime/major_gc.bd.d
CCDEPS .dep/runtime/md5.bd.d
CCDEPS .dep/runtime/memory.bd.d
CCDEPS .dep/runtime/memprof.bd.d
CCDEPS .dep/runtime/meta.bd.d
CCDEPS .dep/runtime/minor_gc.bd.d
CCDEPS .dep/runtime/misc.bd.d
CCDEPS .dep/runtime/obj.bd.d
CCDEPS .dep/runtime/parsing.bd.d
CCDEPS .dep/runtime/platform.bd.d
CCDEPS .dep/runtime/printexc.bd.d
CCDEPS .dep/runtime/prng.bd.d
CCDEPS .dep/runtime/roots.bd.d
CCDEPS .dep/runtime/runtime_events.bd.d
CCDEPS .dep/runtime/shared_heap.bd.d
CCDEPS .dep/runtime/signals.bd.d
CCDEPS .dep/runtime/skiplist.bd.d
CCDEPS .dep/runtime/startup_aux.bd.d
CCDEPS .dep/runtime/str.bd.d
CCDEPS .dep/runtime/sync.bd.d
CCDEPS .dep/runtime/sys.bd.d
CCDEPS .dep/runtime/unix.bd.d
CCDEPS .dep/runtime/weak.bd.d
CCDEPS .dep/runtime/backtrace_byt.bd.d
CCDEPS .dep/runtime/fail_byt.bd.d
CCDEPS .dep/runtime/fix_code.bd.d
CCDEPS .dep/runtime/interp.bd.d
CCDEPS .dep/runtime/startup_byt.bd.d
CCDEPS .dep/runtime/zstd.bd.d
CCDEPS .dep/runtime/instrtrace.bd.d
CCDEPS .dep/runtime/addrmap.nd.d
CCDEPS .dep/runtime/afl.nd.d
CCDEPS .dep/runtime/alloc.nd.d
CCDEPS .dep/runtime/array.nd.d
CCDEPS .dep/runtime/backtrace.nd.d
CCDEPS .dep/runtime/bigarray.nd.d
CCDEPS .dep/runtime/blake2.nd.d
CCDEPS .dep/runtime/callback.nd.d
CCDEPS .dep/runtime/codefrag.nd.d
CCDEPS .dep/runtime/compare.nd.d
CCDEPS .dep/runtime/custom.nd.d
CCDEPS .dep/runtime/debugger.nd.d
CCDEPS .dep/runtime/domain.nd.d
CCDEPS .dep/runtime/dynlink.nd.d
CCDEPS .dep/runtime/extern.nd.d
CCDEPS .dep/runtime/fiber.nd.d
CCDEPS .dep/runtime/finalise.nd.d
CCDEPS .dep/runtime/floats.nd.d
CCDEPS .dep/runtime/gc_ctrl.nd.d
CCDEPS .dep/runtime/gc_stats.nd.d
CCDEPS .dep/runtime/globroots.nd.d
CCDEPS .dep/runtime/hash.nd.d
CCDEPS .dep/runtime/intern.nd.d
CCDEPS .dep/runtime/ints.nd.d
CCDEPS .dep/runtime/io.nd.d
CCDEPS .dep/runtime/lexing.nd.d
CCDEPS .dep/runtime/lf_skiplist.nd.d
CCDEPS .dep/runtime/main.nd.d
CCDEPS .dep/runtime/major_gc.nd.d
CCDEPS .dep/runtime/md5.nd.d
CCDEPS .dep/runtime/memory.nd.d
CCDEPS .dep/runtime/memprof.nd.d
CCDEPS .dep/runtime/meta.nd.d
CCDEPS .dep/runtime/minor_gc.nd.d
CCDEPS .dep/runtime/misc.nd.d
CCDEPS .dep/runtime/obj.nd.d
CCDEPS .dep/runtime/parsing.nd.d
CCDEPS .dep/runtime/platform.nd.d
CCDEPS .dep/runtime/printexc.nd.d
CCDEPS .dep/runtime/prng.nd.d
CCDEPS .dep/runtime/roots.nd.d
CCDEPS .dep/runtime/runtime_events.nd.d
CCDEPS .dep/runtime/shared_heap.nd.d
CCDEPS .dep/runtime/signals.nd.d
CCDEPS .dep/runtime/skiplist.nd.d
CCDEPS .dep/runtime/startup_aux.nd.d
CCDEPS .dep/runtime/str.nd.d
CCDEPS .dep/runtime/sync.nd.d
CCDEPS .dep/runtime/sys.nd.d
CCDEPS .dep/runtime/unix.nd.d
CCDEPS .dep/runtime/weak.nd.d
CCDEPS .dep/runtime/backtrace_nat.nd.d
CCDEPS .dep/runtime/clambda_checks.nd.d
CCDEPS .dep/runtime/dynlink_nat.nd.d
CCDEPS .dep/runtime/fail_nat.nd.d
CCDEPS .dep/runtime/frame_descriptors.nd.d
CCDEPS .dep/runtime/startup_nat.nd.d
CCDEPS .dep/runtime/signals_nat.nd.d
CCDEPS .dep/runtime/addrmap.bi.d
CCDEPS .dep/runtime/afl.bi.d
CCDEPS .dep/runtime/alloc.bi.d
CCDEPS .dep/runtime/array.bi.d
CCDEPS .dep/runtime/backtrace.bi.d
CCDEPS .dep/runtime/bigarray.bi.d
CCDEPS .dep/runtime/blake2.bi.d
CCDEPS .dep/runtime/callback.bi.d
CCDEPS .dep/runtime/codefrag.bi.d
CCDEPS .dep/runtime/compare.bi.d
CCDEPS .dep/runtime/custom.bi.d
CCDEPS .dep/runtime/debugger.bi.d
CCDEPS .dep/runtime/domain.bi.d
CCDEPS .dep/runtime/dynlink.bi.d
CCDEPS .dep/runtime/extern.bi.d
CCDEPS .dep/runtime/fiber.bi.d
CCDEPS .dep/runtime/finalise.bi.d
CCDEPS .dep/runtime/floats.bi.d
CCDEPS .dep/runtime/gc_ctrl.bi.d
CCDEPS .dep/runtime/gc_stats.bi.d
CCDEPS .dep/runtime/globroots.bi.d
CCDEPS .dep/runtime/hash.bi.d
CCDEPS .dep/runtime/intern.bi.d
CCDEPS .dep/runtime/ints.bi.d
CCDEPS .dep/runtime/io.bi.d
CCDEPS .dep/runtime/lexing.bi.d
CCDEPS .dep/runtime/lf_skiplist.bi.d
CCDEPS .dep/runtime/main.bi.d
CCDEPS .dep/runtime/major_gc.bi.d
CCDEPS .dep/runtime/md5.bi.d
CCDEPS .dep/runtime/memory.bi.d
CCDEPS .dep/runtime/memprof.bi.d
CCDEPS .dep/runtime/meta.bi.d
CCDEPS .dep/runtime/minor_gc.bi.d
CCDEPS .dep/runtime/misc.bi.d
CCDEPS .dep/runtime/obj.bi.d
CCDEPS .dep/runtime/parsing.bi.d
CCDEPS .dep/runtime/platform.bi.d
CCDEPS .dep/runtime/printexc.bi.d
CCDEPS .dep/runtime/prng.bi.d
CCDEPS .dep/runtime/roots.bi.d
CCDEPS .dep/runtime/runtime_events.bi.d
CCDEPS .dep/runtime/shared_heap.bi.d
CCDEPS .dep/runtime/signals.bi.d
CCDEPS .dep/runtime/skiplist.bi.d
CCDEPS .dep/runtime/startup_aux.bi.d
CCDEPS .dep/runtime/str.bi.d
CCDEPS .dep/runtime/sync.bi.d
CCDEPS .dep/runtime/sys.bi.d
CCDEPS .dep/runtime/unix.bi.d
CCDEPS .dep/runtime/weak.bi.d
CCDEPS .dep/runtime/backtrace_byt.bi.d
CCDEPS .dep/runtime/fail_byt.bi.d
CCDEPS .dep/runtime/fix_code.bi.d
CCDEPS .dep/runtime/interp.bi.d
CCDEPS .dep/runtime/startup_byt.bi.d
CCDEPS .dep/runtime/zstd.bi.d
CCDEPS .dep/runtime/instrtrace.bi.d
CCDEPS .dep/runtime/addrmap.ni.d
CCDEPS .dep/runtime/afl.ni.d
CCDEPS .dep/runtime/alloc.ni.d
CCDEPS .dep/runtime/array.ni.d
CCDEPS .dep/runtime/backtrace.ni.d
CCDEPS .dep/runtime/bigarray.ni.d
CCDEPS .dep/runtime/blake2.ni.d
CCDEPS .dep/runtime/callback.ni.d
CCDEPS .dep/runtime/codefrag.ni.d
CCDEPS .dep/runtime/compare.ni.d
CCDEPS .dep/runtime/custom.ni.d
CCDEPS .dep/runtime/debugger.ni.d
CCDEPS .dep/runtime/domain.ni.d
CCDEPS .dep/runtime/dynlink.ni.d
CCDEPS .dep/runtime/extern.ni.d
CCDEPS .dep/runtime/fiber.ni.d
CCDEPS .dep/runtime/finalise.ni.d
CCDEPS .dep/runtime/floats.ni.d
CCDEPS .dep/runtime/gc_ctrl.ni.d
CCDEPS .dep/runtime/gc_stats.ni.d
CCDEPS .dep/runtime/globroots.ni.d
CCDEPS .dep/runtime/hash.ni.d
CCDEPS .dep/runtime/intern.ni.d
CCDEPS .dep/runtime/ints.ni.d
CCDEPS .dep/runtime/io.ni.d
CCDEPS .dep/runtime/lexing.ni.d
CCDEPS .dep/runtime/lf_skiplist.ni.d
CCDEPS .dep/runtime/main.ni.d
CCDEPS .dep/runtime/major_gc.ni.d
CCDEPS .dep/runtime/md5.ni.d
CCDEPS .dep/runtime/memory.ni.d
CCDEPS .dep/runtime/memprof.ni.d
CCDEPS .dep/runtime/meta.ni.d
CCDEPS .dep/runtime/minor_gc.ni.d
CCDEPS .dep/runtime/misc.ni.d
CCDEPS .dep/runtime/obj.ni.d
CCDEPS .dep/runtime/parsing.ni.d
CCDEPS .dep/runtime/platform.ni.d
CCDEPS .dep/runtime/printexc.ni.d
CCDEPS .dep/runtime/prng.ni.d
CCDEPS .dep/runtime/roots.ni.d
CCDEPS .dep/runtime/runtime_events.ni.d
CCDEPS .dep/runtime/shared_heap.ni.d
CCDEPS .dep/runtime/signals.ni.d
CCDEPS .dep/runtime/skiplist.ni.d
CCDEPS .dep/runtime/startup_aux.ni.d
CCDEPS .dep/runtime/str.ni.d
CCDEPS .dep/runtime/sync.ni.d
CCDEPS .dep/runtime/sys.ni.d
CCDEPS .dep/runtime/unix.ni.d
CCDEPS .dep/runtime/weak.ni.d
CCDEPS .dep/runtime/backtrace_nat.ni.d
CCDEPS .dep/runtime/clambda_checks.ni.d
CCDEPS .dep/runtime/dynlink_nat.ni.d
CCDEPS .dep/runtime/fail_nat.ni.d
CCDEPS .dep/runtime/frame_descriptors.ni.d
CCDEPS .dep/runtime/startup_nat.ni.d
CCDEPS .dep/runtime/signals_nat.ni.d
CCDEPS .dep/runtime/addrmap.bpic.d
CCDEPS .dep/runtime/afl.bpic.d
CCDEPS .dep/runtime/alloc.bpic.d
CCDEPS .dep/runtime/array.bpic.d
CCDEPS .dep/runtime/backtrace.bpic.d
CCDEPS .dep/runtime/bigarray.bpic.d
CCDEPS .dep/runtime/blake2.bpic.d
CCDEPS .dep/runtime/callback.bpic.d
CCDEPS .dep/runtime/codefrag.bpic.d
CCDEPS .dep/runtime/compare.bpic.d
CCDEPS .dep/runtime/custom.bpic.d
CCDEPS .dep/runtime/debugger.bpic.d
CCDEPS .dep/runtime/domain.bpic.d
CCDEPS .dep/runtime/dynlink.bpic.d
CCDEPS .dep/runtime/extern.bpic.d
CCDEPS .dep/runtime/fiber.bpic.d
CCDEPS .dep/runtime/finalise.bpic.d
CCDEPS .dep/runtime/floats.bpic.d
CCDEPS .dep/runtime/gc_ctrl.bpic.d
CCDEPS .dep/runtime/gc_stats.bpic.d
CCDEPS .dep/runtime/globroots.bpic.d
CCDEPS .dep/runtime/hash.bpic.d
CCDEPS .dep/runtime/intern.bpic.d
CCDEPS .dep/runtime/ints.bpic.d
CCDEPS .dep/runtime/io.bpic.d
CCDEPS .dep/runtime/lexing.bpic.d
CCDEPS .dep/runtime/lf_skiplist.bpic.d
CCDEPS .dep/runtime/main.bpic.d
CCDEPS .dep/runtime/major_gc.bpic.d
CCDEPS .dep/runtime/md5.bpic.d
CCDEPS .dep/runtime/memory.bpic.d
CCDEPS .dep/runtime/memprof.bpic.d
CCDEPS .dep/runtime/meta.bpic.d
CCDEPS .dep/runtime/minor_gc.bpic.d
CCDEPS .dep/runtime/misc.bpic.d
CCDEPS .dep/runtime/obj.bpic.d
CCDEPS .dep/runtime/parsing.bpic.d
CCDEPS .dep/runtime/platform.bpic.d
CCDEPS .dep/runtime/printexc.bpic.d
CCDEPS .dep/runtime/prng.bpic.d
CCDEPS .dep/runtime/roots.bpic.d
CCDEPS .dep/runtime/runtime_events.bpic.d
CCDEPS .dep/runtime/shared_heap.bpic.d
CCDEPS .dep/runtime/signals.bpic.d
CCDEPS .dep/runtime/skiplist.bpic.d
CCDEPS .dep/runtime/startup_aux.bpic.d
CCDEPS .dep/runtime/str.bpic.d
CCDEPS .dep/runtime/sync.bpic.d
CCDEPS .dep/runtime/sys.bpic.d
CCDEPS .dep/runtime/unix.bpic.d
CCDEPS .dep/runtime/weak.bpic.d
CCDEPS .dep/runtime/backtrace_byt.bpic.d
CCDEPS .dep/runtime/fail_byt.bpic.d
CCDEPS .dep/runtime/fix_code.bpic.d
CCDEPS .dep/runtime/interp.bpic.d
CCDEPS .dep/runtime/startup_byt.bpic.d
CCDEPS .dep/runtime/zstd.bpic.d
CCDEPS .dep/runtime/instrtrace.bpic.d
CCDEPS .dep/runtime/addrmap.npic.d
CCDEPS .dep/runtime/afl.npic.d
CCDEPS .dep/runtime/alloc.npic.d
CCDEPS .dep/runtime/array.npic.d
CCDEPS .dep/runtime/backtrace.npic.d
CCDEPS .dep/runtime/bigarray.npic.d
CCDEPS .dep/runtime/blake2.npic.d
CCDEPS .dep/runtime/callback.npic.d
CCDEPS .dep/runtime/codefrag.npic.d
CCDEPS .dep/runtime/compare.npic.d
CCDEPS .dep/runtime/custom.npic.d
CCDEPS .dep/runtime/debugger.npic.d
CCDEPS .dep/runtime/domain.npic.d
CCDEPS .dep/runtime/dynlink.npic.d
CCDEPS .dep/runtime/extern.npic.d
CCDEPS .dep/runtime/fiber.npic.d
CCDEPS .dep/runtime/finalise.npic.d
CCDEPS .dep/runtime/floats.npic.d
CCDEPS .dep/runtime/gc_ctrl.npic.d
CCDEPS .dep/runtime/gc_stats.npic.d
CCDEPS .dep/runtime/globroots.npic.d
CCDEPS .dep/runtime/hash.npic.d
CCDEPS .dep/runtime/intern.npic.d
CCDEPS .dep/runtime/ints.npic.d
CCDEPS .dep/runtime/io.npic.d
CCDEPS .dep/runtime/lexing.npic.d
CCDEPS .dep/runtime/lf_skiplist.npic.d
CCDEPS .dep/runtime/main.npic.d
CCDEPS .dep/runtime/major_gc.npic.d
CCDEPS .dep/runtime/md5.npic.d
CCDEPS .dep/runtime/memory.npic.d
CCDEPS .dep/runtime/memprof.npic.d
CCDEPS .dep/runtime/meta.npic.d
CCDEPS .dep/runtime/minor_gc.npic.d
CCDEPS .dep/runtime/misc.npic.d
CCDEPS .dep/runtime/obj.npic.d
CCDEPS .dep/runtime/parsing.npic.d
CCDEPS .dep/runtime/platform.npic.d
CCDEPS .dep/runtime/printexc.npic.d
CCDEPS .dep/runtime/prng.npic.d
CCDEPS .dep/runtime/roots.npic.d
CCDEPS .dep/runtime/runtime_events.npic.d
CCDEPS .dep/runtime/shared_heap.npic.d
CCDEPS .dep/runtime/signals.npic.d
CCDEPS .dep/runtime/skiplist.npic.d
CCDEPS .dep/runtime/startup_aux.npic.d
CCDEPS .dep/runtime/str.npic.d
CCDEPS .dep/runtime/sync.npic.d
CCDEPS .dep/runtime/sys.npic.d
CCDEPS .dep/runtime/unix.npic.d
CCDEPS .dep/runtime/weak.npic.d
CCDEPS .dep/runtime/backtrace_nat.npic.d
CCDEPS .dep/runtime/clambda_checks.npic.d
CCDEPS .dep/runtime/dynlink_nat.npic.d
CCDEPS .dep/runtime/fail_nat.npic.d
CCDEPS .dep/runtime/frame_descriptors.npic.d
CCDEPS .dep/runtime/startup_nat.npic.d
CCDEPS .dep/runtime/signals_nat.npic.d
make coldstart
make[1]: Entering directory '/data/data/com.termux/files/home/pdev/ocaml/ocaml'
GEN runtime/primitives
CC runtime/addrmap.b.o
CC runtime/afl.b.o
CC runtime/alloc.b.o
CC runtime/array.b.o
CC runtime/backtrace.b.o
CC runtime/bigarray.b.o
CC runtime/blake2.b.o
CC runtime/callback.b.o
CC runtime/codefrag.b.o
CC runtime/compare.b.o
CC runtime/custom.b.o
CC runtime/debugger.b.o
CC runtime/domain.b.o
CC runtime/dynlink.b.o
CC runtime/extern.b.o
CC runtime/fiber.b.o
CC runtime/finalise.b.o
CC runtime/floats.b.o
CC runtime/gc_ctrl.b.o
CC runtime/gc_stats.b.o
CC runtime/globroots.b.o
CC runtime/hash.b.o
CC runtime/intern.b.o
CC runtime/ints.b.o
CC runtime/io.b.o
CC runtime/lexing.b.o
CC runtime/lf_skiplist.b.o
CC runtime/main.b.o
CC runtime/major_gc.b.o
CC runtime/md5.b.o
CC runtime/memory.b.o
CC runtime/memprof.b.o
CC runtime/meta.b.o
CC runtime/minor_gc.b.o
CC runtime/misc.b.o
CC runtime/obj.b.o
CC runtime/parsing.b.o
CC runtime/platform.b.o
CC runtime/printexc.b.o
CC runtime/prng.b.o
CC runtime/roots.b.o
CC runtime/runtime_events.b.o
CC runtime/shared_heap.b.o
CC runtime/signals.b.o
CC runtime/skiplist.b.o
CC runtime/startup_aux.b.o
CC runtime/str.b.o
CC runtime/sync.b.o
CC runtime/sys.b.o
CC runtime/unix.b.o
CC runtime/weak.b.o
CC runtime/backtrace_byt.b.o
CC runtime/fail_byt.b.o
CC runtime/fix_code.b.o
CC runtime/interp.b.o
CC runtime/startup_byt.b.o
CC runtime/zstd.b.o
GEN runtime/prims.c
CC runtime/prims.o
MKLIB runtime/libcamlrun.a
MKEXE runtime/ocamlrun
ld.lld: error: undefined symbol: libandroid_shmat
>>> referenced by afl.c:112 (runtime/afl.c:112)
>>>               afl.b.o:(caml_setup_afl) in archive runtime/libcamlrun.a
gcc: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:1309: runtime/ocamlrun] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/pdev/ocaml/ocaml'
make: *** [Makefile:830: world.opt] Error 2
OCaml 5.3 failure (due to `getentropy`)
./configure --prefix=$HOME/pdev/ocaml/.install LDFLAGS=-landroid-shmem
configure: Configuring OCaml version 5.3.1+dev0-2025-01-06
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for csc... no
checking for ld... ld
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed
checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /data/data/com.termux/files/usr/bin/nm -B
checking the name lister (/data/data/com.termux/files/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /data/data/com.termux/files/usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /data/data/com.termux/files/usr/bin/dd
checking how to truncate binary pipes... /data/data/com.termux/files/usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C preprocessor... gcc -E
checking C compiler vendor... clang-19-1
checking whether host executables can be run in the build... yes
checking whether #! works in shell scripts... yes
checking whether the C compiler accepts -Wold-style-declaration... no
checking whether the C compiler accepts -Wimplicit-fallthrough=5... no
checking whether the C compiler accepts -Wimplicit-fallthrough... yes
checking for flexdll sources... checking for flexlink... no
checking for flexdll.h... no
checking for winpthreads sources... skipping on that platform
checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
checking for library containing cos... -lm
checking for unistd.h... (cached) yes
checking for math.h... yes
checking for pthread_np.h... no
checking for dirent.h... yes
checking for sys/select.h... yes
checking for sys/mman.h... yes
checking for linux/futex.h... yes
checking for off_t... yes
checking size of int... 4
checking size of long... 8
checking size of long *... 8
checking size of short... 2
checking size of long long... 8
configure: Target is a 64 bits architecture
checking whether byte ordering is bigendian... no
checking alignment of double... 8
checking alignment of long... 8
checking alignment of long long... 8
checking for max_align_t... yes
checking if gcc supports _Atomic types with no additional options... yes
checking whether the C compiler supports __attribute__((optimize("tree-vectorize")))... no
checking whether gcc supports the labels as values extension... yes
checking for ld... ld
checking for rlwrap... rlwrap
configure: checking semantics of signal handlers
checking for sigaction... yes
checking for sigprocmask... yes
configure: POSIX signal handling found.
checking for expm1... yes
checking for log1p... yes
checking for hypot... yes
checking for fma... yes
checking for exp2... yes
checking for log2... yes
checking for cbrt... yes
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for erf... yes
checking for erfc... yes
checking for trunc... yes
checking for round... yes
checking for copysign... yes
checking whether round works... yes
checking whether fma works... yes
checking for getentropy... yes
checking for getrusage... yes
checking for times... yes
checking for secure_getenv... no
checking for __secure_getenv... no
checking for issetugid... no
checking for library containing clock_gettime... none required
configure: not using thread sanitizer
checking for socket... yes
checking for socketpair... yes
checking for bind... yes
checking for listen... yes
checking for accept... yes
checking for connect... yes
checking for socklen_t... yes
checking for inet_aton... yes
checking for struct sockaddr_in6... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for inet_pton... yes
checking for inet_ntop... yes
checking for rewinddir... yes
checking for lockf... yes
checking for mkfifo... yes
checking for getcwd... yes
checking for system... yes
checking for sys/types.h... (cached) yes
checking for utime.h... yes
checking for utime... yes
checking for utimes... yes
checking for fchmod... yes
checking for fchown... yes
checking for truncate... yes
checking for ftruncate... yes
checking for select... yes
checking for fd_set... yes
checking for nanosleep... yes
checking for symlink... yes
checking for readlink... yes
checking for lstat... yes
checking for realpath... yes
checking for waitpid... yes
checking for wait4... yes
checking for getgroups... yes
checking for setgroups... yes
checking for initgroups... yes
checking for termios.h... yes
checking for tcgetattr... yes
checking for tcsetattr... yes
checking for tcsendbreak... yes
checking for tcflush... yes
checking for tcflow... yes
checking for setitimer... yes
checking for gethostname... yes
checking for sys/utsname.h... yes
checking for uname... yes
checking for gettimeofday... yes
checking for mktime... yes
checking for setsid... yes
checking for putenv... yes
checking for setenv... yes
checking for unsetenv... yes
checking for locale.h... yes
checking for newlocale... yes
checking for freelocale... yes
checking for uselocale... yes
checking for xlocale.h... yes
checking for newlocale... (cached) yes
checking for freelocale... (cached) yes
checking for uselocale... (cached) yes
checking for strtod_l... yes
checking for dlopen... yes
configure: Dynamic loading of shared libraries is supported.
checking for sys/mman.h... (cached) yes
checking for mmap... yes
checking for munmap... yes
checking for pwrite... yes
checking whether the C compiler accepts -fdebug-prefix-map=old=new... yes
checking for struct stat.st_atim.tv_nsec... yes
checking for struct stat.st_atimespec.tv_nsec... no
checking for struct stat.st_atimensec... yes
configure: stat supports nanosecond precision
checking how many arguments gethostbyname_r() takes... six
checking how many arguments gethostbyaddr_r() takes... eight
checking for mkstemp... yes
checking for nice... yes
checking for dup3... yes
checking for pipe2... yes
checking for accept4... yes
checking for getauxval... yes
checking for sys/shm.h... yes
checking for shmat... yes
checking for execvpe... yes
checking for spawn.h... yes
checking for posix_spawn... yes
checking for posix_spawnp... yes
checking for pkg-config... /data/data/com.termux/files/usr/bin/pkg-config
checking for gcc options needed to detect all undeclared functions... none needed
checking whether programs can be linked with zstd... yes
checking whether programs linked with zstd can execute... skipped
configure: compressed compilation artefacts supported
configure: ocamldebug supported
checking whether gcc is Clang... yes
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for sigwait... yes
checking arguments for pthread_getaffinity_np... pthread_getaffinity_np not found
configure: the threads library is supported
checking whether the assembler supports --debug-prefix-map... no
checking whether the assembler supports CFI directives... yes
configure: not using frame pointers
checking whether mmap supports huge pages... yes
checking for patdiff... no
checking for diff... diff
checking whether diff supports --strip-trailing-cr... yes
checking whether diff supports -u... yes
checking whether mmap supports MAP_STACK... yes
configure: creating ./config.status
config.status: creating Makefile.build_config
config.status: creating Makefile.config
config.status: creating stdlib/sys.ml
config.status: creating manual/src/version.tex
config.status: creating manual/src/html_processing/src/common.ml
config.status: creating ocamltest/ocamltest_config.ml
config.status: creating otherlibs/dynlink/dynlink_config.ml
config.status: creating utils/config.common.ml
config.status: creating utils/config.generated.ml
config.status: creating compilerlibs/META
config.status: creating otherlibs/dynlink/META
config.status: creating otherlibs/runtime_events/META
config.status: creating stdlib/META
config.status: creating ocamldoc/META
config.status: creating otherlibs/unix/META
config.status: creating otherlibs/str/META
config.status: creating otherlibs/systhreads/META
config.status: creating runtime/caml/exec.h
config.status: creating runtime/caml/m.h
config.status: creating runtime/caml/s.h
config.status: creating runtime/caml/version.h
config.status: linking file_formats/cmo_format.mli to otherlibs/dynlink/dynlink_cmo_format.mli
config.status: linking file_formats/cmxs_format.mli to otherlibs/dynlink/dynlink_cmxs_format.mli
config.status: linking otherlibs/dynlink/dynlink_platform_intf.ml to otherlibs/dynlink/dynlink_platform_intf.mli
config.status: linking otherlibs/unix/unix_unix.ml to otherlibs/unix/unix.ml
config.status: linking ocamltest/ocamltest_unix_real.ml to ocamltest/ocamltest_unix.ml
config.status: executing libtool commands
config.status: executing shebang commands
make -j $(nproc)
mkdir -p .dep/runtime
GEN runtime/caml/opnames.h
GEN runtime/caml/jumptbl.h
CC runtime/sak.o
mkdir -p .dep/ocamltest
CCDEPS .dep/ocamltest/run_unix.d
CCDEPS .dep/ocamltest/run_stubs.d
MKEXE runtime/sak
GEN runtime/build_config.h
CCDEPS .dep/runtime/addrmap.b.d
CCDEPS .dep/runtime/afl.b.d
CCDEPS .dep/runtime/alloc.b.d
CCDEPS .dep/runtime/array.b.d
CCDEPS .dep/runtime/backtrace.b.d
CCDEPS .dep/runtime/bigarray.b.d
CCDEPS .dep/runtime/blake2.b.d
CCDEPS .dep/runtime/callback.b.d
CCDEPS .dep/runtime/codefrag.b.d
CCDEPS .dep/runtime/compare.b.d
CCDEPS .dep/runtime/custom.b.d
CCDEPS .dep/runtime/debugger.b.d
CCDEPS .dep/runtime/domain.b.d
CCDEPS .dep/runtime/dynlink.b.d
CCDEPS .dep/runtime/extern.b.d
CCDEPS .dep/runtime/fail.b.d
CCDEPS .dep/runtime/fiber.b.d
CCDEPS .dep/runtime/finalise.b.d
CCDEPS .dep/runtime/floats.b.d
CCDEPS .dep/runtime/gc_ctrl.b.d
CCDEPS .dep/runtime/gc_stats.b.d
CCDEPS .dep/runtime/globroots.b.d
CCDEPS .dep/runtime/hash.b.d
CCDEPS .dep/runtime/intern.b.d
CCDEPS .dep/runtime/ints.b.d
CCDEPS .dep/runtime/io.b.d
CCDEPS .dep/runtime/lexing.b.d
CCDEPS .dep/runtime/lf_skiplist.b.d
CCDEPS .dep/runtime/main.b.d
CCDEPS .dep/runtime/major_gc.b.d
CCDEPS .dep/runtime/md5.b.d
CCDEPS .dep/runtime/memory.b.d
CCDEPS .dep/runtime/memprof.b.d
CCDEPS .dep/runtime/meta.b.d
CCDEPS .dep/runtime/minor_gc.b.d
CCDEPS .dep/runtime/misc.b.d
CCDEPS .dep/runtime/obj.b.d
CCDEPS .dep/runtime/parsing.b.d
CCDEPS .dep/runtime/platform.b.d
CCDEPS .dep/runtime/printexc.b.d
CCDEPS .dep/runtime/prng.b.d
CCDEPS .dep/runtime/roots.b.d
CCDEPS .dep/runtime/runtime_events.b.d
CCDEPS .dep/runtime/shared_heap.b.d
CCDEPS .dep/runtime/signals.b.d
CCDEPS .dep/runtime/skiplist.b.d
CCDEPS .dep/runtime/startup_aux.b.d
CCDEPS .dep/runtime/str.b.d
CCDEPS .dep/runtime/sync.b.d
CCDEPS .dep/runtime/sys.b.d
CCDEPS .dep/runtime/unix.b.d
CCDEPS .dep/runtime/weak.b.d
CCDEPS .dep/runtime/backtrace_byt.b.d
CCDEPS .dep/runtime/fail_byt.b.d
CCDEPS .dep/runtime/fix_code.b.d
CCDEPS .dep/runtime/interp.b.d
CCDEPS .dep/runtime/startup_byt.b.d
CCDEPS .dep/runtime/zstd.b.d
CCDEPS .dep/runtime/instrtrace.b.d
CCDEPS .dep/runtime/addrmap.n.d
CCDEPS .dep/runtime/afl.n.d
CCDEPS .dep/runtime/alloc.n.d
CCDEPS .dep/runtime/array.n.d
CCDEPS .dep/runtime/backtrace.n.d
CCDEPS .dep/runtime/bigarray.n.d
CCDEPS .dep/runtime/blake2.n.d
CCDEPS .dep/runtime/callback.n.d
CCDEPS .dep/runtime/codefrag.n.d
CCDEPS .dep/runtime/compare.n.d
CCDEPS .dep/runtime/custom.n.d
CCDEPS .dep/runtime/debugger.n.d
CCDEPS .dep/runtime/domain.n.d
CCDEPS .dep/runtime/dynlink.n.d
CCDEPS .dep/runtime/extern.n.d
CCDEPS .dep/runtime/fail.n.d
CCDEPS .dep/runtime/fiber.n.d
CCDEPS .dep/runtime/finalise.n.d
CCDEPS .dep/runtime/floats.n.d
CCDEPS .dep/runtime/gc_ctrl.n.d
CCDEPS .dep/runtime/gc_stats.n.d
CCDEPS .dep/runtime/globroots.n.d
CCDEPS .dep/runtime/hash.n.d
CCDEPS .dep/runtime/intern.n.d
CCDEPS .dep/runtime/ints.n.d
CCDEPS .dep/runtime/io.n.d
CCDEPS .dep/runtime/lexing.n.d
CCDEPS .dep/runtime/lf_skiplist.n.d
CCDEPS .dep/runtime/main.n.d
CCDEPS .dep/runtime/major_gc.n.d
CCDEPS .dep/runtime/md5.n.d
CCDEPS .dep/runtime/memory.n.d
CCDEPS .dep/runtime/memprof.n.d
CCDEPS .dep/runtime/meta.n.d
CCDEPS .dep/runtime/minor_gc.n.d
CCDEPS .dep/runtime/misc.n.d
CCDEPS .dep/runtime/obj.n.d
CCDEPS .dep/runtime/parsing.n.d
CCDEPS .dep/runtime/platform.n.d
CCDEPS .dep/runtime/printexc.n.d
CCDEPS .dep/runtime/prng.n.d
CCDEPS .dep/runtime/roots.n.d
CCDEPS .dep/runtime/runtime_events.n.d
CCDEPS .dep/runtime/shared_heap.n.d
CCDEPS .dep/runtime/signals.n.d
CCDEPS .dep/runtime/skiplist.n.d
CCDEPS .dep/runtime/startup_aux.n.d
CCDEPS .dep/runtime/str.n.d
CCDEPS .dep/runtime/sync.n.d
CCDEPS .dep/runtime/sys.n.d
CCDEPS .dep/runtime/unix.n.d
CCDEPS .dep/runtime/weak.n.d
CCDEPS .dep/runtime/backtrace_nat.n.d
CCDEPS .dep/runtime/clambda_checks.n.d
CCDEPS .dep/runtime/dynlink_nat.n.d
CCDEPS .dep/runtime/fail_nat.n.d
CCDEPS .dep/runtime/frame_descriptors.n.d
CCDEPS .dep/runtime/startup_nat.n.d
CCDEPS .dep/runtime/signals_nat.n.d
CCDEPS .dep/runtime/addrmap.bd.d
CCDEPS .dep/runtime/afl.bd.d
CCDEPS .dep/runtime/alloc.bd.d
CCDEPS .dep/runtime/array.bd.d
CCDEPS .dep/runtime/backtrace.bd.d
CCDEPS .dep/runtime/bigarray.bd.d
CCDEPS .dep/runtime/blake2.bd.d
CCDEPS .dep/runtime/callback.bd.d
CCDEPS .dep/runtime/codefrag.bd.d
CCDEPS .dep/runtime/compare.bd.d
CCDEPS .dep/runtime/custom.bd.d
CCDEPS .dep/runtime/debugger.bd.d
CCDEPS .dep/runtime/domain.bd.d
CCDEPS .dep/runtime/dynlink.bd.d
CCDEPS .dep/runtime/extern.bd.d
CCDEPS .dep/runtime/fail.bd.d
CCDEPS .dep/runtime/fiber.bd.d
CCDEPS .dep/runtime/finalise.bd.d
CCDEPS .dep/runtime/floats.bd.d
CCDEPS .dep/runtime/gc_ctrl.bd.d
CCDEPS .dep/runtime/gc_stats.bd.d
CCDEPS .dep/runtime/globroots.bd.d
CCDEPS .dep/runtime/hash.bd.d
CCDEPS .dep/runtime/intern.bd.d
CCDEPS .dep/runtime/ints.bd.d
CCDEPS .dep/runtime/io.bd.d
CCDEPS .dep/runtime/lexing.bd.d
CCDEPS .dep/runtime/lf_skiplist.bd.d
CCDEPS .dep/runtime/main.bd.d
CCDEPS .dep/runtime/major_gc.bd.d
CCDEPS .dep/runtime/md5.bd.d
CCDEPS .dep/runtime/memory.bd.d
CCDEPS .dep/runtime/memprof.bd.d
CCDEPS .dep/runtime/meta.bd.d
CCDEPS .dep/runtime/minor_gc.bd.d
CCDEPS .dep/runtime/misc.bd.d
CCDEPS .dep/runtime/obj.bd.d
CCDEPS .dep/runtime/parsing.bd.d
CCDEPS .dep/runtime/platform.bd.d
CCDEPS .dep/runtime/printexc.bd.d
CCDEPS .dep/runtime/prng.bd.d
CCDEPS .dep/runtime/roots.bd.d
CCDEPS .dep/runtime/runtime_events.bd.d
CCDEPS .dep/runtime/shared_heap.bd.d
CCDEPS .dep/runtime/signals.bd.d
CCDEPS .dep/runtime/skiplist.bd.d
CCDEPS .dep/runtime/startup_aux.bd.d
CCDEPS .dep/runtime/str.bd.d
CCDEPS .dep/runtime/sync.bd.d
CCDEPS .dep/runtime/sys.bd.d
CCDEPS .dep/runtime/unix.bd.d
CCDEPS .dep/runtime/weak.bd.d
CCDEPS .dep/runtime/backtrace_byt.bd.d
CCDEPS .dep/runtime/fail_byt.bd.d
CCDEPS .dep/runtime/fix_code.bd.d
CCDEPS .dep/runtime/interp.bd.d
CCDEPS .dep/runtime/startup_byt.bd.d
CCDEPS .dep/runtime/zstd.bd.d
CCDEPS .dep/runtime/instrtrace.bd.d
CCDEPS .dep/runtime/addrmap.nd.d
CCDEPS .dep/runtime/afl.nd.d
CCDEPS .dep/runtime/alloc.nd.d
CCDEPS .dep/runtime/array.nd.d
CCDEPS .dep/runtime/backtrace.nd.d
CCDEPS .dep/runtime/bigarray.nd.d
CCDEPS .dep/runtime/blake2.nd.d
CCDEPS .dep/runtime/callback.nd.d
CCDEPS .dep/runtime/codefrag.nd.d
CCDEPS .dep/runtime/compare.nd.d
CCDEPS .dep/runtime/custom.nd.d
CCDEPS .dep/runtime/debugger.nd.d
CCDEPS .dep/runtime/domain.nd.d
CCDEPS .dep/runtime/dynlink.nd.d
CCDEPS .dep/runtime/extern.nd.d
CCDEPS .dep/runtime/fail.nd.d
CCDEPS .dep/runtime/fiber.nd.d
CCDEPS .dep/runtime/finalise.nd.d
CCDEPS .dep/runtime/floats.nd.d
CCDEPS .dep/runtime/gc_ctrl.nd.d
CCDEPS .dep/runtime/gc_stats.nd.d
CCDEPS .dep/runtime/globroots.nd.d
CCDEPS .dep/runtime/hash.nd.d
CCDEPS .dep/runtime/intern.nd.d
CCDEPS .dep/runtime/ints.nd.d
CCDEPS .dep/runtime/io.nd.d
CCDEPS .dep/runtime/lexing.nd.d
CCDEPS .dep/runtime/lf_skiplist.nd.d
CCDEPS .dep/runtime/main.nd.d
CCDEPS .dep/runtime/major_gc.nd.d
CCDEPS .dep/runtime/md5.nd.d
CCDEPS .dep/runtime/memory.nd.d
CCDEPS .dep/runtime/memprof.nd.d
CCDEPS .dep/runtime/meta.nd.d
CCDEPS .dep/runtime/minor_gc.nd.d
CCDEPS .dep/runtime/misc.nd.d
CCDEPS .dep/runtime/obj.nd.d
CCDEPS .dep/runtime/parsing.nd.d
CCDEPS .dep/runtime/platform.nd.d
CCDEPS .dep/runtime/printexc.nd.d
CCDEPS .dep/runtime/prng.nd.d
CCDEPS .dep/runtime/roots.nd.d
CCDEPS .dep/runtime/runtime_events.nd.d
CCDEPS .dep/runtime/shared_heap.nd.d
CCDEPS .dep/runtime/signals.nd.d
CCDEPS .dep/runtime/skiplist.nd.d
CCDEPS .dep/runtime/startup_aux.nd.d
CCDEPS .dep/runtime/str.nd.d
CCDEPS .dep/runtime/sync.nd.d
CCDEPS .dep/runtime/sys.nd.d
CCDEPS .dep/runtime/unix.nd.d
CCDEPS .dep/runtime/weak.nd.d
CCDEPS .dep/runtime/backtrace_nat.nd.d
CCDEPS .dep/runtime/clambda_checks.nd.d
CCDEPS .dep/runtime/dynlink_nat.nd.d
CCDEPS .dep/runtime/fail_nat.nd.d
CCDEPS .dep/runtime/frame_descriptors.nd.d
CCDEPS .dep/runtime/startup_nat.nd.d
CCDEPS .dep/runtime/signals_nat.nd.d
CCDEPS .dep/runtime/addrmap.bi.d
CCDEPS .dep/runtime/afl.bi.d
CCDEPS .dep/runtime/alloc.bi.d
CCDEPS .dep/runtime/array.bi.d
CCDEPS .dep/runtime/backtrace.bi.d
CCDEPS .dep/runtime/bigarray.bi.d
CCDEPS .dep/runtime/blake2.bi.d
CCDEPS .dep/runtime/callback.bi.d
CCDEPS .dep/runtime/codefrag.bi.d
CCDEPS .dep/runtime/compare.bi.d
CCDEPS .dep/runtime/custom.bi.d
CCDEPS .dep/runtime/debugger.bi.d
CCDEPS .dep/runtime/domain.bi.d
CCDEPS .dep/runtime/dynlink.bi.d
CCDEPS .dep/runtime/extern.bi.d
CCDEPS .dep/runtime/fail.bi.d
CCDEPS .dep/runtime/fiber.bi.d
CCDEPS .dep/runtime/finalise.bi.d
CCDEPS .dep/runtime/floats.bi.d
CCDEPS .dep/runtime/gc_ctrl.bi.d
CCDEPS .dep/runtime/gc_stats.bi.d
CCDEPS .dep/runtime/globroots.bi.d
CCDEPS .dep/runtime/hash.bi.d
CCDEPS .dep/runtime/intern.bi.d
CCDEPS .dep/runtime/ints.bi.d
CCDEPS .dep/runtime/io.bi.d
CCDEPS .dep/runtime/lexing.bi.d
CCDEPS .dep/runtime/lf_skiplist.bi.d
CCDEPS .dep/runtime/main.bi.d
CCDEPS .dep/runtime/major_gc.bi.d
CCDEPS .dep/runtime/md5.bi.d
CCDEPS .dep/runtime/memory.bi.d
CCDEPS .dep/runtime/memprof.bi.d
CCDEPS .dep/runtime/meta.bi.d
CCDEPS .dep/runtime/minor_gc.bi.d
CCDEPS .dep/runtime/misc.bi.d
CCDEPS .dep/runtime/obj.bi.d
CCDEPS .dep/runtime/parsing.bi.d
CCDEPS .dep/runtime/platform.bi.d
CCDEPS .dep/runtime/printexc.bi.d
CCDEPS .dep/runtime/prng.bi.d
CCDEPS .dep/runtime/roots.bi.d
CCDEPS .dep/runtime/runtime_events.bi.d
CCDEPS .dep/runtime/shared_heap.bi.d
CCDEPS .dep/runtime/signals.bi.d
CCDEPS .dep/runtime/skiplist.bi.d
CCDEPS .dep/runtime/startup_aux.bi.d
CCDEPS .dep/runtime/str.bi.d
CCDEPS .dep/runtime/sync.bi.d
CCDEPS .dep/runtime/sys.bi.d
CCDEPS .dep/runtime/unix.bi.d
CCDEPS .dep/runtime/weak.bi.d
CCDEPS .dep/runtime/backtrace_byt.bi.d
CCDEPS .dep/runtime/fail_byt.bi.d
CCDEPS .dep/runtime/fix_code.bi.d
CCDEPS .dep/runtime/interp.bi.d
CCDEPS .dep/runtime/startup_byt.bi.d
CCDEPS .dep/runtime/zstd.bi.d
CCDEPS .dep/runtime/instrtrace.bi.d
CCDEPS .dep/runtime/addrmap.ni.d
CCDEPS .dep/runtime/afl.ni.d
CCDEPS .dep/runtime/alloc.ni.d
CCDEPS .dep/runtime/array.ni.d
CCDEPS .dep/runtime/backtrace.ni.d
CCDEPS .dep/runtime/bigarray.ni.d
CCDEPS .dep/runtime/blake2.ni.d
CCDEPS .dep/runtime/callback.ni.d
CCDEPS .dep/runtime/codefrag.ni.d
CCDEPS .dep/runtime/compare.ni.d
CCDEPS .dep/runtime/custom.ni.d
CCDEPS .dep/runtime/debugger.ni.d
CCDEPS .dep/runtime/domain.ni.d
CCDEPS .dep/runtime/dynlink.ni.d
CCDEPS .dep/runtime/extern.ni.d
CCDEPS .dep/runtime/fail.ni.d
CCDEPS .dep/runtime/fiber.ni.d
CCDEPS .dep/runtime/finalise.ni.d
CCDEPS .dep/runtime/floats.ni.d
CCDEPS .dep/runtime/gc_ctrl.ni.d
CCDEPS .dep/runtime/gc_stats.ni.d
CCDEPS .dep/runtime/globroots.ni.d
CCDEPS .dep/runtime/hash.ni.d
CCDEPS .dep/runtime/intern.ni.d
CCDEPS .dep/runtime/ints.ni.d
CCDEPS .dep/runtime/io.ni.d
CCDEPS .dep/runtime/lexing.ni.d
CCDEPS .dep/runtime/lf_skiplist.ni.d
CCDEPS .dep/runtime/main.ni.d
CCDEPS .dep/runtime/major_gc.ni.d
CCDEPS .dep/runtime/md5.ni.d
CCDEPS .dep/runtime/memory.ni.d
CCDEPS .dep/runtime/memprof.ni.d
CCDEPS .dep/runtime/meta.ni.d
CCDEPS .dep/runtime/minor_gc.ni.d
CCDEPS .dep/runtime/misc.ni.d
CCDEPS .dep/runtime/obj.ni.d
CCDEPS .dep/runtime/parsing.ni.d
CCDEPS .dep/runtime/platform.ni.d
CCDEPS .dep/runtime/printexc.ni.d
CCDEPS .dep/runtime/prng.ni.d
CCDEPS .dep/runtime/roots.ni.d
CCDEPS .dep/runtime/runtime_events.ni.d
CCDEPS .dep/runtime/shared_heap.ni.d
CCDEPS .dep/runtime/signals.ni.d
CCDEPS .dep/runtime/skiplist.ni.d
CCDEPS .dep/runtime/startup_aux.ni.d
CCDEPS .dep/runtime/str.ni.d
CCDEPS .dep/runtime/sync.ni.d
CCDEPS .dep/runtime/sys.ni.d
CCDEPS .dep/runtime/unix.ni.d
CCDEPS .dep/runtime/weak.ni.d
CCDEPS .dep/runtime/backtrace_nat.ni.d
CCDEPS .dep/runtime/clambda_checks.ni.d
CCDEPS .dep/runtime/dynlink_nat.ni.d
CCDEPS .dep/runtime/fail_nat.ni.d
CCDEPS .dep/runtime/frame_descriptors.ni.d
CCDEPS .dep/runtime/startup_nat.ni.d
CCDEPS .dep/runtime/signals_nat.ni.d
CCDEPS .dep/runtime/addrmap.bpic.d
CCDEPS .dep/runtime/afl.bpic.d
CCDEPS .dep/runtime/alloc.bpic.d
CCDEPS .dep/runtime/array.bpic.d
CCDEPS .dep/runtime/backtrace.bpic.d
CCDEPS .dep/runtime/bigarray.bpic.d
CCDEPS .dep/runtime/blake2.bpic.d
CCDEPS .dep/runtime/callback.bpic.d
CCDEPS .dep/runtime/codefrag.bpic.d
CCDEPS .dep/runtime/compare.bpic.d
CCDEPS .dep/runtime/custom.bpic.d
CCDEPS .dep/runtime/debugger.bpic.d
CCDEPS .dep/runtime/domain.bpic.d
CCDEPS .dep/runtime/dynlink.bpic.d
CCDEPS .dep/runtime/extern.bpic.d
CCDEPS .dep/runtime/fail.bpic.d
CCDEPS .dep/runtime/fiber.bpic.d
CCDEPS .dep/runtime/finalise.bpic.d
CCDEPS .dep/runtime/floats.bpic.d
CCDEPS .dep/runtime/gc_ctrl.bpic.d
CCDEPS .dep/runtime/gc_stats.bpic.d
CCDEPS .dep/runtime/globroots.bpic.d
CCDEPS .dep/runtime/hash.bpic.d
CCDEPS .dep/runtime/intern.bpic.d
CCDEPS .dep/runtime/ints.bpic.d
CCDEPS .dep/runtime/io.bpic.d
CCDEPS .dep/runtime/lexing.bpic.d
CCDEPS .dep/runtime/lf_skiplist.bpic.d
CCDEPS .dep/runtime/main.bpic.d
CCDEPS .dep/runtime/major_gc.bpic.d
CCDEPS .dep/runtime/md5.bpic.d
CCDEPS .dep/runtime/memory.bpic.d
CCDEPS .dep/runtime/memprof.bpic.d
CCDEPS .dep/runtime/meta.bpic.d
CCDEPS .dep/runtime/minor_gc.bpic.d
CCDEPS .dep/runtime/misc.bpic.d
CCDEPS .dep/runtime/obj.bpic.d
CCDEPS .dep/runtime/parsing.bpic.d
CCDEPS .dep/runtime/platform.bpic.d
CCDEPS .dep/runtime/printexc.bpic.d
CCDEPS .dep/runtime/prng.bpic.d
CCDEPS .dep/runtime/roots.bpic.d
CCDEPS .dep/runtime/runtime_events.bpic.d
CCDEPS .dep/runtime/shared_heap.bpic.d
CCDEPS .dep/runtime/signals.bpic.d
CCDEPS .dep/runtime/skiplist.bpic.d
CCDEPS .dep/runtime/startup_aux.bpic.d
CCDEPS .dep/runtime/str.bpic.d
CCDEPS .dep/runtime/sync.bpic.d
CCDEPS .dep/runtime/sys.bpic.d
CCDEPS .dep/runtime/unix.bpic.d
CCDEPS .dep/runtime/weak.bpic.d
CCDEPS .dep/runtime/backtrace_byt.bpic.d
CCDEPS .dep/runtime/fail_byt.bpic.d
CCDEPS .dep/runtime/fix_code.bpic.d
CCDEPS .dep/runtime/interp.bpic.d
CCDEPS .dep/runtime/startup_byt.bpic.d
CCDEPS .dep/runtime/zstd.bpic.d
CCDEPS .dep/runtime/instrtrace.bpic.d
CCDEPS .dep/runtime/addrmap.npic.d
CCDEPS .dep/runtime/afl.npic.d
CCDEPS .dep/runtime/alloc.npic.d
CCDEPS .dep/runtime/array.npic.d
CCDEPS .dep/runtime/backtrace.npic.d
CCDEPS .dep/runtime/bigarray.npic.d
CCDEPS .dep/runtime/blake2.npic.d
CCDEPS .dep/runtime/callback.npic.d
CCDEPS .dep/runtime/codefrag.npic.d
CCDEPS .dep/runtime/compare.npic.d
CCDEPS .dep/runtime/custom.npic.d
CCDEPS .dep/runtime/debugger.npic.d
CCDEPS .dep/runtime/domain.npic.d
CCDEPS .dep/runtime/dynlink.npic.d
CCDEPS .dep/runtime/extern.npic.d
CCDEPS .dep/runtime/fail.npic.d
CCDEPS .dep/runtime/fiber.npic.d
CCDEPS .dep/runtime/finalise.npic.d
CCDEPS .dep/runtime/floats.npic.d
CCDEPS .dep/runtime/gc_ctrl.npic.d
CCDEPS .dep/runtime/gc_stats.npic.d
CCDEPS .dep/runtime/globroots.npic.d
CCDEPS .dep/runtime/hash.npic.d
CCDEPS .dep/runtime/intern.npic.d
CCDEPS .dep/runtime/ints.npic.d
CCDEPS .dep/runtime/io.npic.d
CCDEPS .dep/runtime/lexing.npic.d
CCDEPS .dep/runtime/lf_skiplist.npic.d
CCDEPS .dep/runtime/main.npic.d
CCDEPS .dep/runtime/major_gc.npic.d
CCDEPS .dep/runtime/md5.npic.d
CCDEPS .dep/runtime/memory.npic.d
CCDEPS .dep/runtime/memprof.npic.d
CCDEPS .dep/runtime/meta.npic.d
CCDEPS .dep/runtime/minor_gc.npic.d
CCDEPS .dep/runtime/misc.npic.d
CCDEPS .dep/runtime/obj.npic.d
CCDEPS .dep/runtime/parsing.npic.d
CCDEPS .dep/runtime/platform.npic.d
CCDEPS .dep/runtime/printexc.npic.d
CCDEPS .dep/runtime/prng.npic.d
CCDEPS .dep/runtime/roots.npic.d
CCDEPS .dep/runtime/runtime_events.npic.d
CCDEPS .dep/runtime/shared_heap.npic.d
CCDEPS .dep/runtime/signals.npic.d
CCDEPS .dep/runtime/skiplist.npic.d
CCDEPS .dep/runtime/startup_aux.npic.d
CCDEPS .dep/runtime/str.npic.d
CCDEPS .dep/runtime/sync.npic.d
CCDEPS .dep/runtime/sys.npic.d
CCDEPS .dep/runtime/unix.npic.d
CCDEPS .dep/runtime/weak.npic.d
CCDEPS .dep/runtime/backtrace_nat.npic.d
CCDEPS .dep/runtime/clambda_checks.npic.d
CCDEPS .dep/runtime/dynlink_nat.npic.d
CCDEPS .dep/runtime/fail_nat.npic.d
CCDEPS .dep/runtime/frame_descriptors.npic.d
CCDEPS .dep/runtime/startup_nat.npic.d
CCDEPS .dep/runtime/signals_nat.npic.d
make coldstart
make[1]: Entering directory '/data/data/com.termux/files/home/pdev/ocaml/ocaml'
GEN runtime/primitives
CC runtime/addrmap.b.o
CC runtime/afl.b.o
CC runtime/alloc.b.o
CC runtime/array.b.o
CC runtime/backtrace.b.o
CC runtime/bigarray.b.o
CC runtime/blake2.b.o
CC runtime/callback.b.o
CC runtime/codefrag.b.o
CC runtime/compare.b.o
CC runtime/custom.b.o
CC runtime/debugger.b.o
CC runtime/domain.b.o
CC runtime/dynlink.b.o
CC runtime/extern.b.o
CC runtime/fail.b.o
CC runtime/fiber.b.o
CC runtime/finalise.b.o
CC runtime/floats.b.o
CC runtime/gc_ctrl.b.o
CC runtime/gc_stats.b.o
CC runtime/globroots.b.o
CC runtime/hash.b.o
CC runtime/intern.b.o
CC runtime/ints.b.o
CC runtime/io.b.o
CC runtime/lexing.b.o
CC runtime/lf_skiplist.b.o
CC runtime/main.b.o
CC runtime/major_gc.b.o
CC runtime/md5.b.o
CC runtime/memory.b.o
CC runtime/memprof.b.o
CC runtime/meta.b.o
CC runtime/minor_gc.b.o
CC runtime/misc.b.o
CC runtime/obj.b.o
CC runtime/parsing.b.o
CC runtime/platform.b.o
CC runtime/printexc.b.o
CC runtime/prng.b.o
CC runtime/roots.b.o
CC runtime/runtime_events.b.o
CC runtime/shared_heap.b.o
CC runtime/signals.b.o
CC runtime/skiplist.b.o
CC runtime/startup_aux.b.o
CC runtime/str.b.o
CC runtime/sync.b.o
CC runtime/sys.b.o
CC runtime/unix.b.o
CC runtime/weak.b.o
CC runtime/backtrace_byt.b.o
CC runtime/fail_byt.b.o
CC runtime/fix_code.b.o
CC runtime/interp.b.o
runtime/sys.c:606:7: error: call to undeclared function 'getentropy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
606 |   if (getentropy(buffer, 12) != -1) {
    |       ^
1 error generated.
CC runtime/startup_byt.b.o
make[1]: *** [Makefile:1543: runtime/sys.b.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/data/data/com.termux/files/home/pdev/ocaml/ocaml'
make: *** [Makefile:850: world.opt] Error 2

Note: Turns out you can skip installing OCaml separately by using the opam bootstrap, so you can just start from 02-opam-build.md.

The old instructions are left here in case you only want to install ocaml not opam.

(
export LDFLAGS=-landroid-shmem
export OC_LDFLAGS=$LDFLAGS
export OC_PREFIX=$HOME/pdev/ocaml/.install

./configure --prefix=$OC_PREFIX

make -j $(nproc)

make install
)

You can now move onto opam-build.sh to install opam.

Building OPam on Android/termux

See ocaml-build.md for system details

Without `--with-vendored-deps`
checking for ocamlc... ocamlc
OCaml version is 5.2.0
OCaml library path is /data/data/com.termux/files/home/.local/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamldep.opt... ocamldep.opt
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamldoc.opt... ocamldoc.opt
checking for ocamlbuild... ocamlbuild
checking OCaml Sys.os_type... Unix
checking for gawk... gawk
checking for compiler type... cc
checking for compiler architecture... arm64
checking for compiler system... linux
checking for compiler target... aarch64-unknown-linux-gnu
checking for gcc... gcc  -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC  -pthread  -D_FILE_OFFSET_BITS=64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc  -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC  -pthread  -D_FILE_OFFSET_BITS=64 accepts -g... yes
checking for gcc  -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC  -pthread  -D_FILE_OFFSET_BITS=64 option to enable C11 features... none needed
checking for ocamlobjinfo... ocamlobjinfo
checking for ocamlfind... ocamlfind
checking for curl... curl
checking for dune... dune
checking for patch... patch
checking for bunzip2... bunzip2
checking for linking method... shared

checking for OCaml findlib package unix... found
checking for OCaml findlib package re 1.9.0 or later... found 1.12.0
checking for OCaml findlib package base64 3.1.0 or later... no
checking for OCaml findlib package cmdliner... found
checking for OCaml findlib package ocamlgraph... not found
checking for OCaml findlib package cudf 0.7 or later... no
checking for OCaml findlib package dose3.common 6.1 or later... no
checking for OCaml findlib package dose3.algo 6.1 or later... no
checking for OCaml findlib package opam-file-format 2.1.4 or later... no
checking for OCaml findlib package spdx_licenses... not found
checking for OCaml findlib package opam-0install-cudf 0.5.0 or later... no
checking for OCaml findlib package jsonm... not found
checking for OCaml findlib package uutf... found
checking for OCaml findlib package sha... not found
checking for OCaml findlib package swhid_core... not found
checking for OCaml findlib package mccs 1.1+17 or later... no
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether g++ really is a C++ compiler... yes

configure: error: Dependencies missing. Use --with-vendored-deps or --disable-checks
Without `MAKE=make`

The bit before the g++ really is a C++ compiler is the same as before.

checking whether g++ really is a C++ compiler... yes

configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating src/ocaml-flags-configure.sexp
config.status: creating src/core/c-flags.sexp

Opam will be built WITH its default built-in solver

Executables will be installed in /data/data/com.termux/files/home/pdev/ocaml/.install/bin
Manual pages will be installed in /data/data/com.termux/files/home/pdev/ocaml/.install/share/man

Downloading vendored source dependencies...
./configure: 8282: gmake: not found
done
Extracting vendored source dependencies in src_ext/... ./configure: 8285: gmake: not found
done

Install the OCaml package manager opam

(
export OC_PREFIX=$HOME/pdev/ocaml/.install
export OPAMROOT=$HOME/pdev/ocaml/.install/share/opam
export OC_LDFLAGS=-landroid-shmem
export LDFLAGS=-landroid-shmem

if command -v ocaml >/dev/null; then
  make compiler
fi

./configure --prefix=$OC_PREFIX --with-vendored-deps MAKE=make

make -j $(nproc)

make install
)

Install the OCaml compiler

(
export OC_PREFIX=$HOME/pdev/ocaml/.install
export OPAMROOT=$HOME/pdev/ocaml/.install/share/opam
export OC_LDFLAGS=-landroid-shmem
export LDFLAGS=-landroid-shmem

# Android cannot do sandboxing unless you have rooted your device (ironic)
opam init --root=$OC_PREFIX/share/opam
# Fails with OCaml 5.3 because of the getentropy syscall
# Okay to clean up
# The LDFLAGS/OC_LDFLAGS will ensure OCaml 5.2.0 is installable
opam switch create default 5.2.0
)

You can now install your development environment with

opam install ocaml-lsp-server odoc ocamlformat utop

There might be some issues, see:

Installing OCaml package base on Termux

The package base will fail to build because of the -mpopcount flag, see janestreet/base#164 (comment)

I have worked around this by cloning and editing the sources

git clone https://github.com/janestreet/base.git
cd base
git checkout v0.17.1

Then edit src/discover/discover.ml to remove the "-mpopcnt" strings.

Now you can

opam pin edit base
# Change src to point to your checkout

Compiled fine and then I can use Base.Int.popcount (or indeed install ocamlformat)

Fixing up UTop

UTop will build fine, but it will not run because of not being able to find dllunixnat.so or dlllwt_unix_stubs.so.

Before any patchelf

utop
Fatal error: cannot load shared library dlllwt_unix_stubs
Reason: dlopen failed: cannot locate symbol "caml_unix_cloexec_default" referenced by "/data/data/com.termux/files/home/pdev/ocaml/.install/share/opam/default/lib/stublibs/dlllwt_unix_stubs.so"...

A simple rg --text -l -g '*.so' caml_unix_cloexec_default $OC_PREFIX1 points me to dllunixnat.so, which is how I got to the first patchelf command.

After the first patchelf

utop
Fatal error: cannot load shared library dlllambda_term_stubs
Reason: dlopen failed: cannot locate symbol "lwt_unix_not_available" referenced by "/data/data/com.termux/files/home/pdev/ocaml/.install/share/opam/default/lib/stublibs/dlllambda_term_stubs.so"...

Similarly rg --text -l -g '*.so' lwt_unix_not_available $OC_PREFIX1 points me to dlllwt_unix_stubs.so, which is how I got to the second patchelf command.

(
export OC_PREFIX="$(dirname $(dirname $(command -v ocaml)))"
export OPAMROOT="$HOME/pdev/ocaml/.install/share/opam"

patchelf --add-needed $OC_PREFIX/lib/ocaml/stublibs/dllunixnat.so \
  $OPAMROOT/default/lib/stublibs/dlllwt_unix_stubs.so

patchelf --add-needed $OPAMROOT/default/lib/stublibs/dlllwt_unix_stubs.so \
  $OPAMROOT/default/lib/stublibs/dlllambda_term_stubs.so
)

Footnotes

  1. The rg command is ripgrep, like grep but faster and recursive over directories by default. 2

Installing OCaml LSP Server on termux

For some reason, OCaml LSP Server doesn't build, despite there being no errors. So I found manually building and installing OCaml LSP Server is the way to go.

# Still useful to install dependencies
opam install ocaml-lsp-server

git clone https://github.com/ocaml/ocaml-lsp
git checkout 1.21.0

dune build -p ocaml-lsp-server -j $(nproc) @install

cp _build/default/ocaml-lsp-server/bin/main.exe \
  $OPAMROOT/default/bin/ocamllsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment