Skip to content

Build failure on macOS 10.4 on arm64 #10

@jberdine

Description

@jberdine

Presumably due to the same clang bug as caused janestreet/base#180, and probably the fix is the same from the looks of:

(fun (flag, prog) ->
match c_test c ~c_flags:[ flag ] prog with
| true -> Some flag
| false -> None)
[ "-mpopcnt", prog_popcnt (* ; "-mlzcnt", prog_lzcnt
* ; "-mbmi", prog_tzcnt *)

Build log for reference:

#=== ERROR while compiling ocaml_intrinsics.v0.16.1 ===========================#
# context     2.3.0 | macos/arm64 | ocaml-option-flambda.1 ocaml-option-nnp.1 ocaml-variants.4.14.2+options | https://opam.ocaml.org#ad2202b486885c0c13f146ead5c85646ce87e24e
# path        ~/.opam/default/.opam-switch/build/ocaml_intrinsics.v0.16.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocaml_intrinsics -j 15
# exit-code   1
# env-file    ~/.opam/log/ocaml_intrinsics-3609-d46b77.env
# output-file ~/.opam/log/ocaml_intrinsics-3609-d46b77.out
### output ###
# [...]
# File "src/dune", line 6, characters 4-18:
# 6 |     prefetch_stubs)
#         ^^^^^^^^^^^^^^
# (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -O2 -fno-strict-aliasing -fwrapv -pthread -march=armv8-a+crc -mpopcnt -mprfchw -g -I /Users/josh/.opam/default/lib/ocaml -o prefetch_stubs.o -c prefetch_stubs.c)
# clang: error: unsupported option '-mpopcnt' for target 'arm64-apple-darwin24.4.0'
# clang: error: unsupported option '-mprfchw' for target 'arm64-apple-darwin24.4.0'
# File "src/dune", line 4, characters 44-57:
# 4 |   (names atomic_stubs int_stubs float_stubs perfmon_stubs crc_stubs
#                                                 ^^^^^^^^^^^^^
# (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -O2 -fno-strict-aliasing -fwrapv -pthread -march=armv8-a+crc -mpopcnt -mprfchw -g -I /Users/josh/.opam/default/lib/ocaml -o perfmon_stubs.o -c perfmon_stubs.c)
# clang: error: unsupported option '-mpopcnt' for target 'arm64-apple-darwin24.4.0'
# clang: error: unsupported option '-mprfchw' for target 'arm64-apple-darwin24.4.0'

Metadata

Metadata

Assignees

No one assigned

    Labels

    forwarded-to-js-devsThis report has been forwarded to Jane Street's internal review system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions