Closed yallop closed 2 years ago
Hi, I think this makes the core_unix v0.15 release impossible to install on MacOS. Is there a timeline for a fix or workaround? I think the only use of anything from ocaml_intrinsics over there is in the time stamp counter module: https://github.com/janestreet/core_unix/blob/a051098a918b950e9d0a5da7248f1bbfb51388e5/time_stamp_counter/src/time_stamp_counter.ml#L100
Sorry about the delay, I will get it fixed asap.
@yallop thank you for the detailed report and repo case! I think there is a bug (missing implementation) in the C stubs int_stubs.c
when __GNUC__
is not defined, although it should be defined when building with LLVM.
@yallop I've updated your tests with the proposed fix and they pass on the CI.
It took a fairly old mac to reproduce the failures locally for debugging purposes. All tests in this library pass on the old mac, except one floating point input (float_stubs
compiles with a warning, so it's expected to have some precision difference and the module is not yet used in base/core).
I would like to re-enable ocaml_intrinsics in opam for macos.
@yallop I've updated your tests with the proposed fix and they pass on the CI.
That's good news. Thank you for fixing this, @gretay-js
@yallop @gretay-js @hackedy Could anyone say what would it take to implement these for macOS on PowerPC? :)
@barracuda156 We would need to either find the corresponding instructions / C compiler intrinsics and provide (slower) software implementations for the missing ones. I don't have any way to test such an implementation, do you :)
@gretay-js Testing is not a problem, I got a variety of hardware (including pretty fast G5s), as well as VM set-up with Rosetta.
At the moment some operations in this library crash with
SIGTRAP
or silently return wrong results on macOS (test, CI output). This means that software built using this library will build and install on macOS systems, but fail catastrophically at run time.Is it possible to have the library either fixed to work on macOS or marked in the metadata as Linux-only for the first OPAM release?