Skip to content

Unable to build 0.17.1 on macos 15.5 due to -mpopcnt #186

@dotcarmen

Description

@dotcarmen

seems to have been previously fixed in #178 but I still get the clang error about -mpopcnt 😬

#=== ERROR while compiling base.v0.17.1 =======================================#
# context     2.3.0 | macos/arm64 | ocaml.5.3.0 | https://opam.ocaml.org#a263eb47bd23b8c5e3555052b1f086fe933eebde
# path        ~/.opam/default/.opam-switch/build/base.v0.17.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p base -j 9
# exit-code   1
# env-file    ~/.opam/log/base-61571-df6a5f.env
# output-file ~/.opam/log/base-61571-df6a5f.out
### output ###
# [...]
# (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -fdiagnostics-color=always -D_LARGEFILE64_SOURCE -mpopcnt -g -I /Users/carmen/.opam/default/lib/ocaml -I /Users/carmen/.opam/default/lib/ocaml_intrinsics_kernel -I /Users/carmen/.opam/default/lib/sexplib0 -I ../hash_types/src -I ../shadow-stdlib/src -o int_math_stubs.o -c int_math_stubs.c)
# clang: error: unsupported option '-mpopcnt' for target 'arm64-apple-darwin24.5.0'
# File "src/dune", line 19, characters 46-56:
# 19 |   (names bytes_stubs exn_stubs int_math_stubs hash_stubs obj_stubs am_testing)
#                                                    ^^^^^^^^^^
# (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -fdiagnostics-color=always -D_LARGEFILE64_SOURCE -mpopcnt -g -I /Users/carmen/.opam/default/lib/ocaml -I /Users/carmen/.opam/default/lib/ocaml_intrinsics_kernel -I /Users/carmen/.opam/default/lib/sexplib0 -I ../hash_types/src -I ../shadow-stdlib/src -o hash_stubs.o -c hash_stubs.c)
# clang: error: unsupported option '-mpopcnt' for target 'arm64-apple-darwin24.5.0'
# (cd _build/default && /Users/carmen/.opam/default/bin/ocamlopt.opt -w -40 -g -I src/.base.objs/byte -I src/.base.objs/native -I /Users/carmen/.opam/default/lib/ocaml_intrinsics_kernel -I /Users/carmen/.opam/default/lib/sexplib0 -I hash_types/src/.base_internalhash_types.objs/byte -I hash_types/src/.base_internalhash_types.objs/native -I shadow-stdlib/src/.shadow_stdlib.objs/byte -I shadow-std[...]
# File "src/array.ml", line 399, characters 28-75:
# 399 |       result := Bool.select ((keep_left_if [@inlined]) (compare x !result)) x !result
#                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Warning 55 [inlining-impossible]: Cannot inline: Unknown function

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