Closed Bug 1766914 Opened 3 years ago Closed 3 years ago

Build failure in audioipc2, cannot find type `RtPriorityThreadInfo`

Categories

(Core :: Audio/Video: cubeb, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1760743

People

(Reporter: KaiE, Unassigned)

Details

I'm on Linux (Debian 11), trying to build Beta (v 100).
My build configuration still worked for me three days ago.

Today I get the following error:

 0:06.82    Compiling viaduct v0.1.0 (https://github.com/mozilla/application-services?rev=c51b63595a27a6ef45161012323e0261475c10c9#c51b6359)
 0:39.95 error: extern location for audio_thread_priority does not exist: /home/user/moz/comm-beta/obj-thunder-fullopt/x86_64-unknown-linux-gnu/release/deps/libaudio_thread_priority-c962a30f78d0fbae.rlib
 0:39.95  --> /home/user/moz/comm-beta/mozilla/third_party/rust/audioipc2/src/messages.rs:9:5
 0:39.95   |
 0:39.95 9 | use audio_thread_priority::RtPriorityThreadInfo;
 0:39.95   |     ^^^^^^^^^^^^^^^^^^^^^
 0:39.95 error[E0412]: cannot find type `RtPriorityThreadInfo` in this scope
 0:39.95    --> /home/user/moz/comm-beta/mozilla/third_party/rust/audioipc2/src/messages.rs:231:54
 0:39.96     |
 0:39.96 204 | pub enum ServerMessage {
 0:39.96     |                       - help: you might be missing a type parameter: `<RtPriorityThreadInfo>`
 0:39.96 ...
 0:39.96 231 |     PromoteThreadToRealTime([u8; std::mem::size_of::<RtPriorityThreadInfo>()]),
 0:39.96     |                                                      ^^^^^^^^^^^^^^^^^^^^ not found in this scope
 0:39.96 error[E0412]: cannot find type `RtPriorityThreadInfo` in this scope
 0:39.96    --> /home/user/moz/comm-beta/mozilla/third_party/rust/audioipc2/src/messages.rs:231:54
 0:39.96     |
 0:39.96 231 |     PromoteThreadToRealTime([u8; std::mem::size_of::<RtPriorityThreadInfo>()]),
 0:39.96     |                                                      ^^^^^^^^^^^^^^^^^^^^ not found in this scope
 0:39.96 For more information about this error, try `rustc --explain E0412`.
 0:39.96 sccache: Compiler killed by signal 1
 0:39.96 error: could not compile `audioipc2` due to 3 previous errors

Quick question and I'm guessing you may have already done so, but have you tried running ./mach clobber and then rebuilding to see if the issue resolves?

Flags: needinfo?(kaie)

FWIW, I don't reproduce with rustc 1.60.0 and current beta tip.

Plain clobber didn't help me.

What helped was clobber, then installing rust 1.57.0 and setting it as default, then building beta 100 worked.

Flags: needinfo?(kaie)

I'm ok to mark this worksforme.

I think if the mozilla build system doesn't automatically enforce the use of a known-to-work version of the rust toolchain, then at the very least there should be a text file in an easily findable place, that states the recommended rust version that is known to work with the branch.

And maybe print a warning if the used toolchain is a different version.

If the rust language is incompatible between versions, something like that seems necessary.

Thanks for the suggestion Kai, I'll pass it along. Glad you got it working!

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

Reopening.

Now I'm building Beta 101 with Rust 1.59.0 and I get the same error again.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

It looks like there was some kind of compiler cache issue.

I'm using a local dist-sccache setup, where I use a second computer in my network to speed up building.

I've removed --with-ccache=sccache from my mozconfig, and did a full slow local rebuild, and that didn't have this compiler error.

(I made another change in addition. My mozconfig had a --disable-elf-hack option, which I had added a long time ago. I've removed this too, for the build that had succeeded.)

I've re-enabled sccache, and the compiler error is there again.

Very strange, because I had removed all files in the $HOME/.cache/sccache directory, too.

Maybe an outdated sccache executable?
Or a bad downloaded toolchain on the second computer?

I deleted $HOME/.cache/sccache again.
I kept --disable-elf-hack removed.

On the second computer running sccache-dist, I cleaned up more: I've removed the directories that were configured in server.conf, cache_dir and build-dir.

That seems to have fixed it.

Ah sorry, had forgotton to restart sccache-dist server...
Stay tuned

No, all cleanup didn't help.

I always get this error with sccache-dist.

What version of sccache are you using?

$ sccache-dist --version
sccache 0.2.16-alpha.0

$ sccache --version
sccache 0.2.16-alpha.0

Try 0.3.0

Kai, please see https://bugzilla.mozilla.org/show_bug.cgi?id=1760743#c20. This is fixed in 0.3.0, but 0.3.0 is not released yet.

Actual patches are: https://github.com/mozilla/sccache/pull/1157 and https://github.com/mozilla/sccache/pull/1159.

Ok, thank you for confirming.

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → DUPLICATE

Confirming. I've locally built the tip of sccache with the patches, and it works!
Thanks again.

(In reply to Paul Adenot (:padenot) from comment #15)

Kai, please see https://bugzilla.mozilla.org/show_bug.cgi?id=1760743#c20. This is fixed in 0.3.0, but 0.3.0 is not released yet.

It is released. https://crates.io/crates/sccache https://github.com/mozilla/sccache/releases/tag/v0.3.0

You need to log in before you can comment on or make changes to this bug.