Skip to content

Build fails on macOS with deployment target < 13.3 due to std::format using unavailable std::to_chars #1092

Description

@starxg

faker-cxx fails to build on macOS when the deployment target is set below macOS 13.3.

The project uses std::format, which instantiates libc++ floating-point formatting code. On Apple libc++, floating-point overloads of std::to_chars are marked as unavailable before macOS 13.3, so the build fails when using a lower deployment target such as macOS 11.0.


  • OS: macOS
  • Architecture: arm64
  • Compiler: Apple Clang / libc++
  • C++ standard: C++20
  • Package manager: vcpkg
  • Library version: faker-cxx v4.3.2
  • Deployment target: macOS 11.0

vcpkg triplet:

set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions