Skip to content

Conversation

MBHuman
Copy link

@MBHuman MBHuman commented Sep 12, 2025

Fix macOS ARM64 build for picodata via tarantool-sys

This PR updates the tarantool-sys submodule to fix build issues of
picodata/picodata on macOS ARM64
(Apple Silicon).

Problem description

When building picodata on macOS ARM64:

  • CMAKE_OSX_SYSROOT was unset, causing bundled dependencies (SASL, LDAP,
    autotools-based libs) to fail with missing headers or unresolved symbols.
  • The xxhash sub-build used -Ofast, which produced compatibility issues on
    Apple Clang.
  • Static linking flags were incorrectly applied under Clang due to too narrow
    compiler ID checks.
  • The small submodule leaked its root directory into include paths, breaking
    builds.
  • For ExternalProject_Add, the macOS SDK path was not propagated, leading to
    inconsistent sysroot usage in child projects.

As a result, picodata could not be built from master on Apple Silicon.

Fixes

  • Detect and set CMAKE_OSX_SYSROOT automatically via xcrun --show-sdk-path.
  • Pass -DCMAKE_OSX_SYSROOT explicitly to ExternalProject_Add on macOS.
  • Replace -Ofast with -O3 for xxhash.
  • Adjust Clang detection when adding -static-libstdc++.
  • Clean up INCLUDE_DIRECTORIES for small targets.

Result

With this update in tarantool-sys, the picodata/picodata project builds
successfully on macOS ARM64.

1. fix tarantool for osx static build
2. fix CMAKE_OSX_SYSROOT osx build problem
3. fix Ofast deprecated
4. improve clang compiler check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant