Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build aarch64-apple-darwin target #54

Open
nu11ptr opened this issue Jan 29, 2024 · 2 comments
Open

Unable to build aarch64-apple-darwin target #54

nu11ptr opened this issue Jan 29, 2024 · 2 comments

Comments

@nu11ptr
Copy link

nu11ptr commented Jan 29, 2024

I am following these precise steps on PopOS 22.04 LTS:

# Setup cross toolchains
git clone https://github.com/cross-rs/cross
cd cross
git submodule update --init --remote
cargo xtask configure-crosstool

# Build docker images
cargo build-docker-image aarch64-apple-darwin-cross --build-arg 'MACOS_SDK_URL=https://github.com/joseluisq/macosx-sdks/releases/download/13.0/MacOSX13.0.sdk.tar.xz' --tag local

I get the following error:

... **snipped** ...
#0 163.3 create_symlink ./x86_64-apple-darwin22-install_name_tool ./arm64e-apple-darwin22-install_name_tool
#0 163.3 create_symlink ./x86_64-apple-darwin22-segedit ./arm64e-apple-darwin22-segedit
#0 163.3 create_symlink ./x86_64-apple-darwin22-ctf_insert ./arm64e-apple-darwin22-ctf_insert
#0 163.3 
#0 163.3 extracting MacOSX13.0.sdk.tar.xz ...
#0 168.2 mv: cannot stat '*OSX*13.0*sdk*': No such file or directory
#0 168.2 
#0 168.2 exiting with abnormal exit code (1)
#0 168.2 run 'OCDEBUG=1 ./build.sh' to enable debug messages
#0 168.2 
------
error: failed to solve: executor failed running [/bin/sh -c /darwin.sh]: exit code: 1
Error: 
   0: some error(s) encountered

Location:
   xtask/src/build_docker_image.rs:346

Error:

      0: `docker buildx build --platform linux/amd64 --build-arg 'CROSS_TARGET_TRIPLE=AARCH64_APPLE_DARWIN_CROSS' --load --pull --cache-from 'type=registry,ref=ghcr.io/cross-rs/aarch64-apple-darwin-cross:main' --tag ghcr.io/cross-rs/aarch64-apple-darwin-cross:local --label 'org.cross-rs.for-cross-target=aarch64-apple-darwin-cross' --label 'org.cross-rs.runs-with=x86_64-unknown-linux-gnu' --file /home/scott/src/rust/cross/docker/cross-toolchains/docker/Dockerfile.aarch64-apple-darwin-cross --progress auto --build-arg 'MACOS_SDK_URL=https://github.com/joseluisq/macosx-sdks/releases/download/13.0/MacOSX13.0.sdk.tar.xz' .` failed with exit status: 1

   Location:
      xtask/src/build_docker_image.rs:309

   Warning: call to docker failed
   Suggestion: is `buildx` available for the container engine?
   Note: disable the `buildkit` dependency optionally with `CROSS_CONTAINER_ENGINE_NO_BUILDKIT=1`

I have tried with a local file in the docker folder with the MACOS_SDK_FILE option and get the same exact error. I get the same issue with the x86_64-apple-darwin target. Please advise if you would be so kind... I'm not sure if this is a bug or something I'm doing wrong, thx.

@nu11ptr
Copy link
Author

nu11ptr commented Jan 29, 2024

Ok, it works with 12.3 it seems, and 13.0 is the problem

@fxshlein
Copy link

Just for reference: The reason for this seems to be that the MacOSX13.0.sdk.tar.xz file actually contains MacOSX13.sdk (without the .0)

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

No branches or pull requests

2 participants