Closed Bug 1591249 Opened 6 years ago Closed 6 years ago

Bump coreaudio-sys to 0.2.3

Categories

(Core :: Audio/Video: cubeb, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: chunmin, Assigned: chunmin)

Details

Attachments

(1 file, 5 obsolete files)

The cross-compiling issue mentioned in bug 1569003 is solved by https://github.com/RustAudio/coreaudio-sys/pull/28 and that fix is released within coreaudio-sys 0.2.3. We should use coreaudio-sys 0.2.3. directly instead of using a custom 0.2.2 version.

The coreaudio-sys 0.2.3. should be tested with sccache before being bumpped, in case we won't run into similar issue to bug 1590890 .

Attached file GitHub Pull Request (obsolete) —

The current coreaudio-sys in gecko is a custom 0.2.2 version that used
to avoid the cross-compiling issue mentioned in bug 1569003. The issue
has been fixed in the coreaudio-sys 0.2.3, so we should follow the
upstream instead of using a custom version.

Depends on D50531

I don't have a sccache so I need to set it and try if the patches work with it.

Attachment #9104075 - Attachment description: Bug 1591249 - P2: Bump coreaudio-sys. r?glandium → Bug 1591249 - P2: Bump coreaudio-sys to 0.2.3. r?glandium
Comment on attachment 9104070 [details] [review] GitHub Pull Request The change in the pull request won't affect the version bump of _coreaudio-sys_
Attachment #9104070 - Attachment is obsolete: true

(In reply to C.M.Chang[:chunmin] from comment #4)

I don't have a sccache so I need to set it and try if the patches work with it.

The patch can work with my sccache with default setting in https://firefox-source-docs.mozilla.org/build/buildsystem/sccache-dist.html (Rust 1.38 and MacOSX10.11.sdk)

(In reply to C.M.Chang[:chunmin] from comment #4)

I don't have a sccache so I need to set it and try if the patches work with it.

 0:02.34 ERROR: Couldn't execute `cargo metadata` with manifest "/Users/haftandilian/r/mc/toolkit/library/rust/Cargo.toml": Metadata(Output { status: ExitStatus(ExitStatus(25856)), stdout: "", stderr: "error: failed to select a version for `coreaudio-sys`.\n    ... required by package `coreaudio-sys-utils v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs/coreaudio-sys-utils)`\n    ... which is depended on by `cubeb-coreaudio v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs)`\n    ... which is depended on by `gkrust-shared v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/rust/shared)`\n    ... which is depended on by `gkrust-gtest v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/gtest/rust)`\nversions that meet the requirements `= 0.2.3` are: 0.2.3\n\nthe package `coreaudio-sys-utils` depends on `coreaudio-sys`, with features: `nobindgen` but `coreaudio-sys` does not have these features.\n\n\nfailed to select a version for `coreaudio-sys` which could resolve this conflict\n" })
 0:02.34 ERROR: Couldn't generate bindings for /Users/haftandilian/r/mc/toolkit/library/rust.
 0:02.34 make[4]: *** [.deps/ServoStyleConsts.h.stub] Error 1
 0:02.34 make[3]: *** [layout/style/export] Error 2
 0:02.34 make[3]: *** Waiting for unfinished jobs....
 0:02.57 ERROR: Couldn't execute `cargo metadata` with manifest "/Users/haftandilian/r/mc/toolkit/library/rust/Cargo.toml": Metadata(Output { status: ExitStatus(ExitStatus(25856)), stdout: "", stderr: "    Blocking waiting for file lock on package cache\nerror: failed to select a version for `coreaudio-sys`.\n    ... required by package `coreaudio-sys-utils v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs/coreaudio-sys-utils)`\n    ... which is depended on by `cubeb-coreaudio v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs)`\n    ... which is depended on by `gkrust-shared v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/rust/shared)`\n    ... which is depended on by `gkrust-gtest v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/gtest/rust)`\nversions that meet the requirements `= 0.2.3` are: 0.2.3\n\nthe package `coreaudio-sys-utils` depends on `coreaudio-sys`, with features: `nobindgen` but `coreaudio-sys` does not have these features.\n\n\nfailed to select a version for `coreaudio-sys` which could resolve this conflict\n" })
 0:02.57 ERROR: Couldn't generate bindings for /Users/haftandilian/r/mc/toolkit/library/rust.
 0:02.58 make[4]: *** [.deps/webrender_ffi_generated.h.stub] Error 1
 0:02.58 make[3]: *** [gfx/webrender_bindings/export] Error 2
 0:02.83 ERROR: Couldn't execute `cargo metadata` with manifest "/Users/haftandilian/r/mc/toolkit/library/rust/Cargo.toml": Metadata(Output { status: ExitStatus(ExitStatus(25856)), stdout: "", stderr: "    Blocking waiting for file lock on package cache\nerror: failed to select a version for `coreaudio-sys`.\n    ... required by package `coreaudio-sys-utils v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs/coreaudio-sys-utils)`\n    ... which is depended on by `cubeb-coreaudio v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs)`\n    ... which is depended on by `gkrust-shared v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/rust/shared)`\n    ... which is depended on by `gkrust-gtest v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/gtest/rust)`\nversions that meet the requirements `= 0.2.3` are: 0.2.3\n\nthe package `coreaudio-sys-utils` depends on `coreaudio-sys`, with features: `nobindgen` but `coreaudio-sys` does not have these features.\n\n\nfailed to select a version for `coreaudio-sys` which could resolve this conflict\n" })
 0:02.83 ERROR: Couldn't generate bindings for /Users/haftandilian/r/mc/toolkit/library/rust.
 0:02.84 make[4]: *** [.deps/gk_rust_utils_ffi_generated.h.stub] Error 1
 0:02.84 make[3]: *** [xpcom/base/export] Error 2
 0:02.84 make[2]: *** [export] Error 2
 0:02.84 make[1]: *** [default] Error 2
 0:02.84 make: *** [build] Error 2
 0:02.88 355 compiler warnings present.

(In reply to Haik Aftandilian [:haik] from comment #8)

 0:02.34 ERROR: Couldn't execute `cargo metadata` with manifest "/Users/haftandilian/r/mc/toolkit/library/rust/Cargo.toml": Metadata(Output { status: ExitStatus(ExitStatus(25856)), stdout: "", stderr: "error: failed to select a version for `coreaudio-sys`.\n    ... required by package `coreaudio-sys-utils v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs/coreaudio-sys-utils)`\n    ... which is depended on by `cubeb-coreaudio v0.1.0 (/Users/haftandilian/r/mc/media/libcubeb/cubeb-coreaudio-rs)`\n    ... which is depended on by `gkrust-shared v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/rust/shared)`\n    ... which is depended on by `gkrust-gtest v0.1.0 (/Users/haftandilian/r/mc/toolkit/library/gtest/rust)`\nversions that meet the requirements `= 0.2.3` are: 0.2.3\n\nthe package `coreaudio-sys-utils` depends on `coreaudio-sys`, with features: `nobindgen` but `coreaudio-sys` does not have these features.\n\n\nfailed to select a version for `coreaudio-sys` which could resolve this conflict\n" })

It looks like it try using nobindgen in coreaudio-sys. Feature nobindgen is removed after bumping up the coreaudio-sys to 0.2.3. The current coreaudio-sys-utils doesn't use nobindgen. Is it built on top of the patch D50529?
(I will submit a patch to remove nobindgen if D50529 is landed first.)

I tried some version of this (bumping to 0.2.3) locally yesterday and it succeeded with sccache.

(In reply to C.M.Chang[:chunmin] from comment #7)

Oh it fails on try server: https://treeherder.mozilla.org/#/jobs?repo=try&revision=290037d015f4c81a9432b4dc49494d7a9f720cd3&selectedJob=272877291

I guess I need to set COREAUDIO_SDK_PATH so the build.rs could work in a MacOS environment built on Linux. I tried exporting COREAUDIO_SDK_PATH in build/macosx/cross-mozconfig.common but the build still fails.

glandium, do you know where the COREAUDIO_SDK_PATH should be set?

Flags: needinfo?(mh+mozilla)

The problem is not that you need to set COREAUDIO_SDK_PATH, but that the 10.11 SDK doesn't have AudioUnit. You need to disable the audio_unit feature.

Flags: needinfo?(mh+mozilla)

I guess one thing that could be done in coreaudio-sys upstream is to add some has_include checks to avoid having to manually disable features that aren't provided by the SDK.

(In reply to C.M.Chang[:chunmin] from comment #11)

I guess I need to set COREAUDIO_SDK_PATH so the build.rs could work in a MacOS environment built on Linux. I tried exporting COREAUDIO_SDK_PATH in build/macosx/cross-mozconfig.common but the build still fails.

Set COREAUDIO_SDK_PATH to MACOS_SDK_DIR in rust.mk works both in my local build and try server, with Mac 10.11 SDK. I will upload those patches once they pass the tests.

The feature nobingen is a custom feature in our custom coreaudio-sys
0.2.2 that is removed in the previous patch. It no longer exists after
bumping up the coreaudio-sys to 0.2.3.

The coreaudio-sys should generate API bindings based on MACOS_SDK_DIR if
it's set.

Depends on D51126

Attachment #9104074 - Attachment description: Bug 1591249 - P1: Do not override dependencies for coreaudio-sys. r?glandium → Bug 1591249 - Bump coreaudio-sys to 0.2.3. r=glandium
Attachment #9104075 - Attachment is obsolete: true
Attachment #9105267 - Attachment is obsolete: true
Attachment #9105268 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Pick commits:
cd954ca - Update dependencies (#22)
7043a0c - Make audiounit_get_devices_of_type infallible (#21)

Comment on attachment 9106351 [details]
Bug 1591249 - Update cubeb-coreaudio-rs to cd954ca. r?padenot

Revision D51725 was moved to bug 1590151. Setting attachment 9106351 [details] to obsolete.

Attachment #9106351 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: