Compiling on Mac fails with cubeb-coreaudio-rs updates from bug 1589514 (coreaudio-sys, failed to execute compile)
Categories
(Core :: Audio/Video: cubeb, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | --- | unaffected |
firefox69 | --- | unaffected |
firefox70 | --- | unaffected |
firefox71 | --- | unaffected |
firefox72 | --- | fixed |
People
(Reporter: standard8, Assigned: chunmin)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
I've just updated to the latest mozilla-central and checked that everything was up to date via ./mach bootstrap
.
I'm running on MacBook Pro 2018, running 10.14.6.
On compiling, I'm hitting:
4:25.58 error: failed to execute compile
4:25.58 caused by: error reading compile response from server
4:25.58 caused by: Failed to read response header
4:25.58 caused by: failed to fill whole buffer
4:25.58 error: Could not compile `coreaudio-sys`.
I don't see any other obvious error, but I'm attaching the full log just in case.
I tried verbose, but all I get is:
$ DYLD_FALLBACK_LIBRARY_PATH='/Users/mark/dev/gecko/objdir-ff-opt/release/deps:/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/lib:/Users/mark/lib:/usr/local/lib:/usr/lib' CARGO_PKG_REPOSITORY='https://github.com/RustAudio/coreaudio-sys.git' CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_AUTHORS='Mitchell Nordine <mitchell.nordine@gmail.com>' OUT_DIR=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/build/coreaudio-sys-7b3d52b30de1925e/out CARGO_PKG_VERSION_PRE= CARGO=/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/cargo CARGO_PKG_DESCRIPTION='Bindings for Apple'\''s CoreAudio frameworks generated via rust-bindgen' CARGO_PKG_HOMEPAGE='https://github.com/RustAudio/coreaudio-sys' CARGO_MANIFEST_DIR=/Users/mark/dev/gecko/third_party/rust/coreaudio-sys CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION=0.2.2 CARGO_PKG_NAME=coreaudio-sys CARGO_PKG_VERSION_PATCH=2 /usr/local/bin/sccache /Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc --crate-name coreaudio_sys third_party/rust/coreaudio-sys/src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C codegen-units=1 --cfg 'feature="audio_unit"' --cfg 'feature="core_audio"' -C metadata=aefa8752de3a0aee -C extra-filename=-aefa8752de3a0aee --out-dir /Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -C linker=/Users/mark/dev/gecko/build/cargo-linker -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/release/deps -C opt-level=1 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -l framework=AudioUnit -l framework=CoreAudio --verbose
error: failed to execute compile
caused by: error reading compile response from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
Reverting my build to the commit before bug 1589514 landed, it runs successfully.
Comment 1•5 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #0)
Created attachment 9103733 [details]
FailedBuild.txtI've just updated to the latest mozilla-central and checked that everything was up to date via
./mach bootstrap
.I'm running on MacBook Pro 2018, running 10.14.6.
On compiling, I'm hitting:
4:25.58 error: failed to execute compile 4:25.58 caused by: error reading compile response from server 4:25.58 caused by: Failed to read response header 4:25.58 caused by: failed to fill whole buffer 4:25.58 error: Could not compile `coreaudio-sys`.
I don't see any other obvious error, but I'm attaching the full log just in case.
I tried verbose, but all I get is:
$ DYLD_FALLBACK_LIBRARY_PATH='/Users/mark/dev/gecko/objdir-ff-opt/release/deps:/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/lib:/Users/mark/lib:/usr/local/lib:/usr/lib' CARGO_PKG_REPOSITORY='https://github.com/RustAudio/coreaudio-sys.git' CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_AUTHORS='Mitchell Nordine <mitchell.nordine@gmail.com>' OUT_DIR=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/build/coreaudio-sys-7b3d52b30de1925e/out CARGO_PKG_VERSION_PRE= CARGO=/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/cargo CARGO_PKG_DESCRIPTION='Bindings for Apple'\''s CoreAudio frameworks generated via rust-bindgen' CARGO_PKG_HOMEPAGE='https://github.com/RustAudio/coreaudio-sys' CARGO_MANIFEST_DIR=/Users/mark/dev/gecko/third_party/rust/coreaudio-sys CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION=0.2.2 CARGO_PKG_NAME=coreaudio-sys CARGO_PKG_VERSION_PATCH=2 /usr/local/bin/sccache /Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc --crate-name coreaudio_sys third_party/rust/coreaudio-sys/src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C codegen-units=1 --cfg 'feature="audio_unit"' --cfg 'feature="core_audio"' -C metadata=aefa8752de3a0aee -C extra-filename=-aefa8752de3a0aee --out-dir /Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -C linker=/Users/mark/dev/gecko/build/cargo-linker -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/release/deps -C opt-level=1 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -l framework=AudioUnit -l framework=CoreAudio --verbose error: failed to execute compile caused by: error reading compile response from server caused by: Failed to read response header caused by: failed to fill whole buffer
This output looks like it's related to the sccache
daemon being in a bad state. Does restarting the local daemon (sccache --stop-server
) help?
Reverting my build to the commit before bug 1589514 landed, it runs successfully.
Comment 2•5 years ago
|
||
Affected by the same bug, sccache --stop-server
did not help.
Reporter | ||
Comment 3•5 years ago
|
||
I've just cleared my cache (rm -r ~/Library/Cache/Mozilla.sccache
) and restarted the server, and I think it has helped - still compiling, but I think it has got past that point now.
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #3)
I've just cleared my cache (
rm -r ~/Library/Cache/Mozilla.sccache
) and restarted the server, and I think it has helped - still compiling, but I think it has got past that point now.
Oh typical, nope it just failed again with the same error.
Comment 5•5 years ago
|
||
Can someone confirm whether disabling sccache fixes it?
Comment 6•5 years ago
|
||
I commented out ac_add_options --with-ccache='/Users/zbraniecki/.mozbuild/sccache/sccache'
in my .mozconfig and did ./mach build
.
The build seems to be progressing beyond coreaudio-sys but I saw this warning, which may be related? https://paste.mozilla.org/bBse56Yu
My build is still going on (with sccache disabled), so it may fail like Mark's, or complete. I'll update the comment when it finishes.
Reporter | ||
Comment 7•5 years ago
|
||
Disabling sccache makes the build pass. It looks like the one in /usr/local/bin/sccache
is being used, it is version 0.2.12 - there's also one in ~/.mozbuild/sccache/sccache
which is version 0.2.13-alpha.0 (though that doesn't seem to be used from a subsequent test).
Comment 8•5 years ago
|
||
Mine is failing without ccache, with the following error:
15:33.23 error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
15:33.23 /*opt*/ cfg = "...")]`
15:33.23 --> /path/to/objdir-x86_64-apple-darwin/release/build/coreaudio-sys-eee897e7c66f2ab8/out/coreaudio.rs:3:1
15:33.23 |
15:33.23 3 | #[link = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioUnit"]
15:33.24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15:33.24 |
15:33.24 = note: `-D ill-formed-attribute-input` implied by `-D warnings`
15:33.24 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15:33.24 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
15:33.24 error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...",
15:33.24 /*opt*/ cfg = "...")]`
15:33.24 --> /path/to/objdir-x86_64-apple-darwin/release/build/coreaudio-sys-eee897e7c66f2ab8/out/coreaudio.rs:4:1
15:33.24 |
15:33.24 4 | #[link = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio"]
15:33.24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15:33.24 |
15:33.24 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15:33.25 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
15:36.65 error: aborting due to 2 previous errors
15:36.79 error: Could not compile `coreaudio-sys`.
when building with warnings-as-errors.
Comment 9•5 years ago
|
||
It looks like the link issue was already resolved on the github side 2 months ago, at https://github.com/RustAudio/coreaudio-sys/pull/28 . But it seems we're behind, or maybe there's no new released version or something?
Comment 10•5 years ago
|
||
Yeah, I had to remove --with-ccache=sccache and also --enable-warnings-as-errors to make my build happy again.
Assignee | ||
Comment 11•5 years ago
•
|
||
(In reply to Mark Banner (:standard8) from comment #0)
I tried verbose, but all I get is:
$ DYLD_FALLBACK_LIBRARY_PATH='/Users/mark/dev/gecko/objdir-ff-opt/release/deps:/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/lib:/Users/mark/lib:/usr/local/lib:/usr/lib' CARGO_PKG_REPOSITORY='https://github.com/RustAudio/coreaudio-sys.git' CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_AUTHORS='Mitchell Nordine <mitchell.nordine@gmail.com>' OUT_DIR=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/build/coreaudio-sys-7b3d52b30de1925e/out CARGO_PKG_VERSION_PRE= CARGO=/Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/cargo CARGO_PKG_DESCRIPTION='Bindings for Apple'\''s CoreAudio frameworks generated via rust-bindgen' CARGO_PKG_HOMEPAGE='https://github.com/RustAudio/coreaudio-sys' CARGO_MANIFEST_DIR=/Users/mark/dev/gecko/third_party/rust/coreaudio-sys CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION=0.2.2 CARGO_PKG_NAME=coreaudio-sys CARGO_PKG_VERSION_PATCH=2 /usr/local/bin/sccache /Users/mark/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc --crate-name coreaudio_sys third_party/rust/coreaudio-sys/src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C codegen-units=1 --cfg 'feature="audio_unit"' --cfg 'feature="core_audio"' -C metadata=aefa8752de3a0aee -C extra-filename=-aefa8752de3a0aee --out-dir /Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -C linker=/Users/mark/dev/gecko/build/cargo-linker -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/x86_64-apple-darwin/release/deps -L dependency=/Users/mark/dev/gecko/objdir-ff-opt/release/deps -C opt-level=1 -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -l framework=AudioUnit -l framework=CoreAudio --verbose error: failed to execute compile caused by: error reading compile response from server caused by: Failed to read response header caused by: failed to fill whole buffer
Reverting my build to the commit before bug 1589514 landed, it runs successfully.
From the log, the version of coreaudio-sys in use is 0.2.2, however, the minimal required version of coreaudio-sys should be 0.2.3, which contains the solution fixing the compiling issue (https://github.com/RustAudio/coreaudio-sys/pull/28) (comment #9, bug 1569003, bug 1569331). I will update the dependency in the cubeb-coreaudio-rs crate to make sure the minimal required version of coreaudio-sys is 0.2.3.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
I can "fix" by upping the frame size used by sccache to allow the 216MB of stderr to be shipped back to the client, but updating not to produce that much output is certainly preferable. Thanks for looking into this!
Comment 13•5 years ago
|
||
I thought rust dependencies were supposed to be vendored in? ( https://firefox-source-docs.mozilla.org/build/buildsystem/rust.html#crate-dependencies )
That would avoid these toolchain/build-order/rust-version/phase-of-moon dependent breakages... :-(
Also, in addition to the #[link]
thing does 0.2.3 also fix the huge error messages (something about warning:
externblock uses type
u128which is not FFI-safe: 128-bit integers don't currently have a known stable ABI
, followed by lots of spam of the actual source text which has no newlines) which comment #12 references ?
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #13)
I thought rust dependencies were supposed to be vendored in? ( https://firefox-source-docs.mozilla.org/build/buildsystem/rust.html#crate-dependencies )
Right, the current coreaudio-sys version in gecko is 0.2.2
Comment 15•5 years ago
•
|
||
It looks like we need to re-apply the fix for bug 1569003 which was reverted by the fix for bug 1589514.
Updated•5 years ago
|
Assignee | ||
Comment 17•5 years ago
|
||
Revert the coreaudio-sys dependency changed in bug 1589514, which causes
a trouble when compiling with sccache
Assignee | ||
Comment 18•5 years ago
|
||
I will update the coreaudio-sys to 0.2.3 in bug 1591249 instead
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
•
|
||
(In reply to C.M.Chang[:chunmin] from comment #18)
I will update the coreaudio-sys to 0.2.3 in bug 1591249 instead
Patches in bug 1591249 work with sccache in my environment now. Those patches work with my newly installed sccache. However, I didn't use sccache before so I am not sure if those patches are going to solve the issue here. Could someone confirm the issue can be solved by applying patches in bug 1591249 (without applying the patch here) ?
Comment 20•5 years ago
|
||
I got a new error when trying to build today's master:
17:08.32 Compiling coreaudio-sys v0.2.2 (/Users/zbraniecki/projects/mozilla-unified/third_party/rust/coreaudio-sys)
17:08.51 warning: use of deprecated item 'core::str::<impl str>::trim_right': superseded by `trim_end`
17:08.51 --> third_party/rust/coreaudio-sys/build.rs:13:31
17:08.51 |
17:08.51 13 | let version = version_str.trim_right();
17:08.51 | ^^^^^^^^^^ help: replace the use of the deprecated item: `trim_end`
17:08.51 |
17:08.51 = note: `#[warn(deprecated)]` on by default
17:08.51 Compiling baldrdash v0.1.0 (/Users/zbraniecki/projects/mozilla-unified/js/src/wasm/cranelift)
17:08.53 warning: use of deprecated item 'core::str::<impl str>::trim_right': superseded by `trim_end`
17:08.53 --> third_party/rust/coreaudio-sys/build.rs:41:33
17:08.53 |
17:08.53 41 | let prefix = prefix_str.trim_right();
17:08.53 | ^^^^^^^^^^ help: replace the use of the deprecated item: `trim_end`
17:15.19 error: failed to run custom build command for `coreaudio-sys v0.2.2 (/Users/zbraniecki/projects/mozilla-unified/third_party/rust/coreaudio-sys)`
17:15.19 Caused by:
17:15.19 process didn't exit successfully: `/Users/zbraniecki/projects/mozilla-unified/obj-x86_64-apple-darwin19.0.0-opt/release/build/coreaudio-sys-abb4c4d791a6e6ea/build-script-build` (exit code: 101)
17:15.19 --- stdout
17:15.19 cargo:rustc-link-lib=framework=AudioUnit
17:15.19 cargo:rustc-link-lib=framework=CoreAudio
17:15.19 --- stderr
17:15.19 //Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h:165:10: fatal error: 'TargetConditionals.h' file not found
17:15.19 //Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h:165:10: fatal error: 'TargetConditionals.h' file not found, err: true
17:15.20 thread 'main' panicked at 'unable to generate bindings: ()', src/libcore/result.rs:1084:5
17:15.20 stack backtrace:
17:15.20 0: 0x10bb5f2e2 - std::panicking::default_hook::{{closure}}::h3f994bbc901f9889
17:15.20 1: 0x10bb5efad - std::panicking::default_hook::h6c261b7dad1af707
17:15.20 2: 0x10bb5fa20 - std::panicking::rust_panic_with_hook::hd3c20890ac648923
17:15.20 3: 0x10bb5f58d - std::panicking::continue_panic_fmt::hf444d349a369432b
17:15.20 4: 0x10bb5f4e9 - rust_begin_unwind
17:15.20 5: 0x10bb8f632 - core::panicking::panic_fmt::h7bf9e431fd27d405
17:15.20 6: 0x10bb8f719 - core::result::unwrap_failed::hcd64fedd568f6623
17:15.20 7: 0x10b9c1a70 - build_script_build::main::hd7abb9e78b554167
17:15.20 8: 0x10b9bce76 - std::rt::lang_start::{{closure}}::hccad806656decbee
17:15.20 9: 0x10bb5f468 - std::panicking::try::do_call::h8ffcb2a43dbb732c
17:15.20 10: 0x10bb6662f - __rust_maybe_catch_panic
17:15.20 11: 0x10bb5fe9e - std::rt::lang_start_internal::ha688fd553625ef6f
17:15.20 12: 0x10b9c1de9 - main
17:15.20 warning: build failed, waiting for other jobs to finish...
17:22.41 dom/jsurl
Comment 21•5 years ago
|
||
(In reply to C.M.Chang[:chunmin] from comment #19)
(In reply to C.M.Chang[:chunmin] from comment #18)
I will update the coreaudio-sys to 0.2.3 in bug 1591249 instead
Patches in bug 1591249 work with sccache in my environment now. Those patches work with my newly installed sccache. However, I didn't use sccache before so I am not sure if those patches are going to solve the issue here. Could someone confirm the issue can be solved by applying patches in bug 1591249 (without applying the patch here) ?
I can confirm that applying the patches in Bug 1591249 (and not these patches) resolve the compilation problem for me. macos 10.15, not using sccache.
Assignee | ||
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18f60bc21ff8
Disable bindgen when building coreaudio-sys. r=glandium
Reporter | ||
Comment 23•5 years ago
|
||
The checkin-needed flag has now moved to Phabricator - you have to Edit Revision and add the "Check-in needed" tag.
However, I've just triggered landing of this for you so you didn't need to move it across this time.
Comment 24•5 years ago
|
||
The code appears to ignore that SDK could be provided via an alternative path:
with something like:
ac_add_options --with-macos-sdk=/Users/jyavenard/Work/Mozilla/MacOSX10.13.sdk
Comment 25•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•3 years ago
|
Description
•