Open MisterDA opened 4 months ago
Getting the same error on Termux (where gcc
is linked to clang
):
#=== ERROR while compiling base.v0.17.0 =======================================#
# context 2.1.6 | linux/arm64 | ocaml-base-compiler.5.2.0 | https://opam.ocaml.org#6c0498c5
# path ~/.opam/5.2.0/.opam-switch/build/base.v0.17.0
# command ~/.opam/5.2.0/bin/dune build -p base -j 7
# exit-code 1
# env-file ~/.opam/log/base-22295-f950c4.env
# output-file ~/.opam/log/base-22295-f950c4.out
### output ###
# [...]
# (cd _build/default/src && /data/data/com.termux/files/usr/bin/gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -pthread -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -mpopcnt -g -I /data/data/com.termux/files/home/.opam/5.2.0/lib/ocaml -I /data/data/com.termux/files/home/.opam/5.2.0/lib/ocaml_intrinsics_kernel -I /data/data/com.termux/files/home/.opam/5.2.0/lib/sexplib0 -I ../hash_types/src[...]
# gcc: error: unsupported option '-mpopcnt' for target 'aarch64-unknown-linux-android24'
# File "src/dune", line 19, characters 57-66:
# 19 | (names bytes_stubs exn_stubs int_math_stubs hash_stubs obj_stubs am_testing)
# ^^^^^^^^^
# (cd _build/default/src && /data/data/com.termux/files/usr/bin/gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -pthread -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -mpopcnt -g -I /data/data/com.termux/files/home/.opam/5.2.0/lib/ocaml -I /data/data/com.termux/files/home/.opam/5.2.0/lib/ocaml_intrinsics_kernel -I /data/data/com.termux/files/home/.opam/5.2.0/lib/sexplib0 -I ../hash_types/src[...]
# gcc: error: unsupported option '-mpopcnt' for target 'aarch64-unknown-linux-android24'
It seems that clang doesn't need the flag and that
__builtin_popcountg
should be used.