Skip to content

Question: why macOS was dropped in 1.8.0, and will source builds on macOS arm64 stay possible? #655

Closed

Description

@letiep97

Context

From 1.8.0 the supported platforms are Linux x86_64 and arm64 (#532, #545), and the 1.9.0 changelog says macOS is not supported and no CI job builds or tests it. We run the engine on Apple Silicon for local research, so we would like to understand the decision before planning around it.

Questions

  1. What was the main reason: CI cost or runner time, the macOS-only failures recorded for 1.7.0 in CHANGELOG 1.7.0: known limit on macOS (fd report sink, 64 MiB stream RSS) #503 (descriptor report sink, stream peak RSS), or something in the 1.8.0 design that does not fit macOS?
  2. Is a macOS source build meant to keep working on a best-effort basis, or may later releases depend on Linux-only APIs?
  3. Would you accept small fixes that keep the macOS source build working, like Build on macOS: fdatasync via F_FULLFSYNC, mkdtemp via <unistd.h> (1.7.0 tag blocker) #501 and the 1.9.0 link fix, or a macOS CI leg that does not block a release?

Our request is small: keep the source build working on macOS arm64. We do not need a macOS release archive.

What we see on macOS today

v1.9.0 (ec44968) builds from source on macOS 15 arm64 with Apple clang 17 (Release, static library). Translating with pineforge-codegen 1.9.0 and running run_backtest_full through the C ABI gives the same trades and net profit as the same build on Linux arm64 (gcc 13): on the fixed-id control from #452 over 702,505 five-minute bars, 13,505 trades and the same net profit on both. We have not run your full test suite on macOS.

cc @luisleo526

Activity

  1. luisleo526 commented on Oct 30, 2026

    @luisleo526
    Collaborator

    Thanks for the detailed write-up, and for checking that the macOS arm64 build gives the same trades and net profit as Linux on the #452 control. That is useful to know.

    The short, practical answer:

    1. Why: cost and speed. Paid macOS CI runners cost far more than Linux ones, and the free hosted runners are too slow for the pace we are working at with a test suite this large. So for now CI builds and tests Linux only (x86_64 and arm64), and Linux is the supported platform. That is what the README states ("Supported platforms: Linux x86_64 and arm64"). It was not a design decision against macOS, and nothing in 1.8.0 was built to exclude it.
    2. Source builds on macOS: they are not tested in CI, so they can break without us noticing. We do not set out to depend on Linux-only APIs in the code you build, but we cannot promise a macOS build stays working across releases. The 1.9.0 link fix (one symbol left undefined when linking the shared window-plan library) shows the kind of small break that can happen.
    3. Fixes: small, self-contained fixes that keep the macOS source build working, with no effect on Linux behaviour, are welcome as pull requests. We cannot add a macOS CI leg at this time, for the same cost reason.

    Once the core has converged on Linux, we will reconsider macOS in CI. There is no date for that yet; we will update this issue when it changes.

  2. luisleo526 commented on Nov 3, 2026

    @luisleo526
    Collaborator

    Closing this question as answered (see the reply above). If you have a follow-up about building from source on macOS, please reopen this issue or open a new one, and we will answer it there.

  3. letiep97 commented on Nov 10, 2026

    @letiep97
    Author

    @luisleo526 a follow-up on building from source on macOS, as invited above.

    v1.11.0 (a4472324) does not compile on macOS 15 arm64 as released. v1.10.0 builds unchanged with the same toolchain and options. Two places, both new in 1.11.0:

    1. src/runtime_context.cpp:269 calls ::fdatasync without a platform guard

    src/runtime_context.cpp:269:18: error: no member named 'fdatasync' in the global namespace
      269 |         while (::fdatasync(file) != 0) {
          |                ~~^
    

    macOS has no fdatasync. The other call sites are guarded (src/report_sink_writer.cpp:449, include/pineforge/detail/scratch_file.hpp:686, src/command_scratch_production.cpp:347); this one is not.

    2. src/selected_capacity_csv_reader.cpp:107 uses the floating-point std::from_chars

    src/selected_capacity_csv_reader.cpp:107:30: error: 'from_chars' is unavailable: introduced in macOS 26.0
      107 |     const auto parsed = std::from_chars(begin, text + size, value, std::chars_format::general);
          |                              ^
    

    Apple's libc++ marks the floating-point overloads as available from macOS 26.0, so a build that targets macOS 15 is refused. The integer overloads used elsewhere (src/run_failure.cpp, checked_settings.hpp, live_source_identity.hpp) compile.

    What we changed locally

    • For 1: -Dfdatasync=fsync on the compiler command line.
    • For 2: that one call replaced by strtod_l in the C locale. The function has already scanned the field before the call, so the accepted syntax does not change.

    With both, the Release static library builds and runs run_backtest_full through the C ABI. The v1.11.0 numbers in our reports of 2026-11-10 come from this build. We have not run your test suite on macOS.

    Environment

    macOS 15.8 arm64, Apple clang 17.0.0 (clang-1700.6.3.2), macOS SDK 26.2, CMake 4.4.3. Release, C++17, PINEFORGE_BUILD_SOURCE_LAYER=ON; tests, tutorial, examples, corpus, bench and live runner off.

    Both look like the small, self-contained kind of fix described above, with no effect on Linux: a guard like the one in report_sink_writer.cpp, and a strtod path where the floating-point from_chars is not available.

  4. letiep97 commented on Nov 13, 2026

    @letiep97
    Author

    Thank you for #798: on the 1.12.0 release the fdatasync calls no longer need a local change on macOS (macOS 15.8, Apple clang 17, arm64).

    Two notes from the same build, in case they help keep the source build working on macOS:

    • selected_capacity_csv_reader.cpp still calls floating-point std::from_chars, which Apple's libc++ only provides from macOS 26, so on macOS 15 the library still needs a local replacement for that one call.
    • Building all targets (-DPINEFORGE_BUILD_TESTS=OFF, examples, tutorial, corpus, bench and live runner off) stops at bin/pineforge-selected-admit: ld: symbol(s) not found for architecture arm64, _strategy_reads_trade_history, referenced from libpineforge_kernel.a(engine_report.cpp.o). The pineforge library target itself builds and runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions