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

Failed to build x86_64-apple-darwin binary on ARM silicon #221

Open
jiabochao opened this issue Nov 9, 2024 · 0 comments
Open

Failed to build x86_64-apple-darwin binary on ARM silicon #221

jiabochao opened this issue Nov 9, 2024 · 0 comments

Comments

@jiabochao
Copy link

hi, when I compile the rust-ffmpeg x86 program on Apple M2 Pro macOS 15.1, I get an error

Cargo.toml

ffmpeg-next = {git = "https://github.com/zmwangx/rust-ffmpeg.git", branch = "master"}

error message:

error: failed to run custom build command for `ffmpeg-sys-next v7.1.0`

Caused by:
  process didn't exit successfully: `/Users/bochao/Work/projects/SearchIn/src-tauri/target/release/build/ffmpeg-sys-next-201ad7040f4dd9cc/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBAVUTIL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_apple_darwin
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_apple_darwin
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_apple_darwin
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at /Users/bochao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-sys-next-7.1.0/build.rs:795:14:
  called `Result::unwrap()` on an `Err` value: pkg-config has not been configured to support cross-compilation.

  Install a sysroot for the target platform and configure it via
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
  cross-compiling wrapper for pkg-config and set it via
  PKG_CONFIG environment variable.
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
failed to build x86_64-apple-darwin binary: failed to build app
    Error failed to build x86_64-apple-darwin binary: failed to build app
 ELIFECYCLE  Command failed with exit code 1.
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

1 participant