From 151dd0fb3494262d2e5d05c1d08f4fe305717a8c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 28 Feb 2024 15:19:17 +0700 Subject: [PATCH] Hard-code SDK root when building PyOxidizer's detection seems to be failing on the machine I'm running from. --- build/runner/src/bundle/artifacts.rs | 1 + build/runner/src/bundle/binary.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/build/runner/src/bundle/artifacts.rs b/build/runner/src/bundle/artifacts.rs index 347b695d2..ec5506717 100644 --- a/build/runner/src/bundle/artifacts.rs +++ b/build/runner/src/bundle/artifacts.rs @@ -47,6 +47,7 @@ pub fn build_artifacts(args: BuildArtifactsArgs) { .env("PROFILE", "release") .env("OUT_DIR", &artifacts) .env("TARGET", env!("TARGET")) + .env("SDKROOT", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") .env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target()) .env("CARGO_BUILD_TARGET", env!("TARGET")), ); diff --git a/build/runner/src/bundle/binary.rs b/build/runner/src/bundle/binary.rs index 4ac281b73..995587c0c 100644 --- a/build/runner/src/bundle/binary.rs +++ b/build/runner/src/bundle/binary.rs @@ -38,6 +38,7 @@ pub fn build_bundle_binary() { .unwrap(), ) .env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target()) + .env("SDKROOT", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") .env("CARGO_BUILD_TARGET", env!("TARGET")); if env!("TARGET") == "x86_64-apple-darwin" { let xcode_path = Command::run_with_output(["xcode-select", "-p"]).unwrap();