Closed Bug 1834947 Opened 1 year ago Closed 7 months ago

error occurred: Failed to find tool. Is `xcrun` installed?

Categories

(Firefox Build System :: General, defect, P3)

Unspecified
iOS
defect

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Cross-compiling on non-mac with --target=aarch64-apple-ios fails with (among many other things):

 1:08.41 error: failed to run custom build command for `lmdb-rkv-sys v0.11.2`
 1:08.41 note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
 1:08.41 Caused by:
 1:08.42   process didn't exit successfully: `/tmp/gecko/obj-aarch64-apple-ios/release/build/lmdb-rkv-sys-e90e5002fe612205/build-script-build` (exit status: 1)
 1:08.42   --- stdout
 1:08.42   cargo:rerun-if-env-changed=LIBLMDB_NO_PKG_CONFIG
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-apple-ios
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_apple_ios
 1:08.42   cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-ios
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_ios
 1:08.42   cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG
 1:08.42   cargo:rerun-if-env-changed=LIBLMDB_STATIC
 1:08.42   cargo:rerun-if-env-changed=LIBLMDB_DYNAMIC
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-ios
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_ios
 1:08.42   cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_PATH
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-ios
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_ios
 1:08.42   cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-ios
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_ios
 1:08.42   cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
 1:08.42   cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
 1:08.42   TARGET = Some("aarch64-apple-ios")
 1:08.42   OPT_LEVEL = Some("2")
 1:08.42   HOST = Some("x86_64-unknown-linux-gnu")
 1:08.42   CC_aarch64-apple-ios = None
 1:08.42   CC_aarch64_apple_ios = Some("/home/glandium/.mozbuild/clang/bin/clang")
 1:08.42   CFLAGS_aarch64-apple-ios = None
 1:08.42   CFLAGS_aarch64_apple_ios = Some("-isysroot /tmp/gecko/iPhoneOS16.4.sdk -mios-version-min=16.4 -Qunused-arguments -std=gnu99 --target=aarch64-ios -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -I/tmp/gecko/toolkit/library/rust -I/tmp/gecko/obj-aarch64-apple-ios/toolkit/library/rust -I/tmp/gecko/obj-aarch64-apple-ios/dist/include -I/tmp/gecko/obj-aarch64-apple-ios/dist/include/nspr -I/tmp/gecko/obj-aarch64-apple-ios/dist/include/nss -include /tmp/gecko/obj-aarch64-apple-ios/mozilla-config.h -DMOZILLA_CLIENT -fPIC -fno-math-errno -pipe -O3 -fno-omit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-range-loop-analysis -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -DMOZILLA_CONFIG_H")
 1:08.42   CRATE_CC_NO_DEFAULTS = None
 1:08.42   DEBUG = Some("false")
 1:08.42   Detecting iOS SDK path for iphoneos
 1:08.42   running: "xcrun" "--show-sdk-path" "--sdk" "iphoneos"
 1:08.42   --- stderr
 1:08.42   error occurred: Failed to find tool. Is `xcrun` installed?
 1:08.42 warning: build failed, waiting for other jobs to finish...

The error comes from third_party/rust/cc/src/lib.rs, which runs xcrun to find the iPhoneOS SDK location... which might actually not even match what the build system is using on mac, so it's not only a problem on cross-compiles. Only a more direct one on cross-compiles.

Group: mozilla-employee-confidential

The severity field is not set for this bug.
:ahochheiden, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(ahochheiden)
Severity: -- → S3
Flags: needinfo?(ahochheiden)
Priority: -- → P3
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/db8946252101 Divert xcrun so that it outputs the build system's chosen iOS SDK. r=firefox-build-system-reviewers,nalexander
Blocks: 1882661
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Group: mozilla-employee-confidential
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: