8000 failed to run custom build command for `libz-sys v1.1.12` on ARM MacOS · Issue #242 · rust-lang/libz-sys · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

failed to run custom build command for libz-sys v1.1.12 on ARM MacOS #242

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

Open
twalkertalker opened this issue May 14, 2025 · 3 comments
Open

Comments

@twalkertalker
Copy link

Hello. I am encountering an error while compiling libz-sys dependant crate. And I am facing an error, yet cannot find any meaningful error message. Could you help me please?


Caused by:
  process didn't exit successfully: `CARGO=/Users/a.muminov/.rustup/toolchains/1.86.0-aarch64-apple-darwin/bin/cargo CARGO_CFG_FEATURE=default,libc,static,stock-zlib CARGO_CFG_PANIC=unwind CARGO_CFG_TARGET_ABI='' CARGO_CFG_TARGET_ARCH=aarch64 CARGO_CFG_TARGET_ENDIAN=little CARGO_CFG_TARGET_ENV='' CARGO_CFG_TARGET_FAMILY=unix CARGO_CFG_TARGET_FEATURE=aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh CARGO_CFG_TARGET_HAS_ATOMIC=128,16,32,64,8,ptr CARGO_CFG_TARGET_OS=macos CARGO_CFG_TARGET_POINTER_WIDTH=64 CARGO_CFG_TARGET_VENDOR=apple CARGO_CFG_UNIX='' CARGO_ENCODED_RUSTFLAGS='' CARGO_FEATURE_DEFAULT=1 CARGO_FEATURE_LIBC=1 CARGO_FEATURE_STATIC=1 CARGO_FEATURE_STOCK_ZLIB=1 CARGO_MANIFEST_DIR=/Users/a.muminov/.cargo/registry/src/git.crates.ds.ips.cloud-96babaa7a84ae434/libz-sys-1.1.12 CARGO_MANIFEST_LINKS=z CARGO_MANIFEST_PATH=/Users/a.muminov/.cargo/registry/src/git.crates.ds.ips.cloud-96babaa7a84ae434/libz-sys-1.1.12/Cargo.toml CARGO_PKG_AUTHORS='Alex Crichton <alex@alexcrichton.com>:Josh Triplett <josh@joshtriplett.org>:Sebastian Thiel <sebastian.thiel@icloud.com>' CARGO_PKG_DESCRIPTION='Low-level bindings to the system libz library (also known as zlib).' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=libz-sys CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/libz-sys' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.1.12 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=12 CARGO_PKG_VERSION_PRE='' DEBUG=true DYLD_FALLBACK_LIBRARY_PATH='/Users/a.muminov/Developer/RustProjects/tbank/ipsilon/ipsilon-ree/target/debug/deps:/Users/a.muminov/Developer/RustProjects/tbank/ipsilon/ipsilon-ree/target/debug:/Users/a.muminov/.rustup/toolchains/1.86.0-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib:/Users/a.muminov/.rustup/toolchains/1.86.0-aarch64-apple-darwin/lib:/Users/a.muminov/lib:/usr/local/lib:/usr/lib' HOST=aarch64-apple-darwin NUM_JOBS=14 OPT_LEVEL=0 OUT_DIR=/Users/a.muminov/Developer/RustProjects/tbank/ipsilon/ipsilon-ree/target/debug/build/libz-sys-4b08f6856f945351/out PROFILE=debug RUSTC=/Users/a.muminov/.rustup/toolchains/1.86.0-aarch64-apple-darwin/bin/rustc RUSTDOC=/Users/a.muminov/.rustup/toolchains/1.86.0-aarch64-apple-darwin/bin/rustdoc TARGET=aarch64-apple-darwin /Users/a.muminov/Developer/RustProjects/tbank/ipsilon/ipsilon-ree/target/debug/build/libz-sys-eaa4abf26704a72b/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
  cargo:rerun-if-changed=build.rs
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
  CC_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
  CC_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
  CFLAGS_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
  CFLAGS_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
@twalkertalker
Copy link
Author

So far, I have found there is some weird errors in apple toolchain, but have no idea what to do with it

[/usr/local/include/_stdio.h:318:7: error: expected ')'](cargo:warning=/usr/local/include/_stdio.h:318:7: error: expected ')')

@Byron
Copy link
Member
Byron commented May 14, 2025

I think this would need at least a demo project with a Cargo manifest that allow to reproduce the issue locally.
The MacOS and maybe Xcode version would probably be helpful, too.

@SongXinbai
Copy link

Hi @twalkertalker , I got same error during compile

  cargo:warning=In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:61:

  cargo:warning=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('

  cargo:warning=  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));

And my configuration is

Apple clang version 17.0.0 (clang-1700.0.13.3)
Target: arm64-apple-darwin24.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

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

3 participants
0