Closed Bug 1747196 Opened 2 years ago Closed 2 years ago

error[E0432]: unresolved imports `backend::MidiInputPort`, `backend::MidiInput`, `backend::MidiInputConnection`, `backend::MidiOutputPort`, `backend::MidiOut`

Categories

(Core :: DOM: Device Interfaces, defect)

All
OpenBSD
defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- unaffected
firefox96 --- unaffected
firefox97 --- fixed

People

(Reporter: petr.sumbera, Assigned: gsvelto)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

Solaris build fails with:

 4:34.56    Compiling midir v0.7.0 (https://github.com/mozilla/midir.git?rev=dc87afbd4361ae5ec192e1fab0a6409dd13d4011#dc87afbd)
 4:34.70 error[E0432]: unresolved imports `backend::MidiInputPort`, `backend::MidiInput`, `backend::MidiInputConnection`, `backend::MidiOutputPort`, `backend::MidiOut`
 4:34.70   --> /builds/psumbera/mozilla-central-build/third_party/rust/midir/src/common.rs:5:5
 4:34.70    |
 4:34.70 5  |     MidiInputPort as MidiInputPortImpl,
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInputPort` in `backend`
 4:34.70 6  |     MidiInput as MidiInputImpl,
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInput` in `backend`
 4:34.70 7  |     MidiInputConnection as MidiInputConnectionImpl,
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInputConnection` in `backend`
 4:34.70 8  |     MidiOutputPort as MidiOutputPortImpl,
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutputPort` in `backend`
 4:34.70 9  |     MidiOutput as MidiOutputImpl,
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutput` in `backend`
 4:34.70 10 |     MidiOutputConnection as MidiOutputConnectionImpl
 4:34.70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutputConnection` in `backend`
 4:34.86 For more information about this error, try `rustc --explain E0432`.
 4:34.88 error: could not compile `midir` due to previous error

The first bad revision is:
changeset: 602831:791abc86e799
user: Gabriele Svelto <gsvelto@mozilla.com>
date: Tue Dec 21 11:34:51 2021 +0000
description:
Bug 1728436 - Vendor the midir crate r=padenot

Keywords: regression
Regressed by: 1728436
Has Regression Range: --- → yes
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Device Interfaces
Ever confirmed: true
Product: Firefox → Core

Set release status flags based on info from the regressing bug 1728436

fwiw can confirm the build failure on OpenBSD where we use sndio. will try https://phabricator.services.mozilla.com/D134491

still fails with that patch, i have this in the build goo:

[15:29] c64:~/src/m-c/ $grep MOZ_WEBMIDI_MIDIR_BACKEND /usr/obj/m-c/*                                                                                                                                                                         
/usr/obj/m-c/config.status:    'MOZ_WEBMIDI_MIDIR_BACKEND': '',
/usr/obj/m-c/config.status:    'MOZ_WEBMIDI_MIDIR_BACKEND': '',
/usr/obj/m-c/mozilla-config.h:#define MOZ_WEBMIDI_MIDIR_BACKEND 

maybe it should be undef ?

should midir/midir_impl crates be made conditional to platforms in Cargo.lock file ? they shouldnt be built at all on non-supported platforms.. or there should be dummy/empty implementations for the missing symbols in the crates on non-tier1 ....

(In reply to Landry Breuil (:gaston) from comment #5)

should midir/midir_impl crates be made conditional to platforms in Cargo.lock file ? they shouldnt be built at all on non-supported platforms.. or there should be dummy/empty implementations for the missing symbols in the crates on non-tier1 ....

That should be conditional, I'll add the change to the patch.

The platform check should be fixed now but I haven't made building the midir crate conditional yet. Working on that now.

Assignee: nobody → gsvelto
Attachment #9256512 - Attachment description: WIP: Bug 1747196 - Build the Web MIDI midir backend only on known supported platforms rather than excluding unsupported ones r=glandium → Bug 1747196 - Build the Web MIDI midir backend only on known supported platforms rather than excluding unsupported ones r=glandium
Status: NEW → ASSIGNED

This should do the trick, can you please give the patch a spin and confirm that it's fixing your builds?

Flags: needinfo?(petr.sumbera)
Flags: needinfo?(landry)

that gives

 2:38.17 error: failed to load manifest for workspace member `/home/landry/src/m-c/toolkit/library/gtest/rust`
 2:38.18 Caused by:
 2:38.19   failed to load manifest for dependency `gkrust-shared`
 2:38.19 Caused by:
 2:38.19   failed to parse manifest at `/home/landry/src/m-c/toolkit/library/rust/shared/Cargo.toml`
 2:38.19 Caused by:
 2:38.19   feature `webmidi_midir_impl` includes `midir_impl` which is neither a dependency nor another feature

edit: same thing after a clobber/clean objdir

Flags: needinfo?(landry)

I had removed the reference to the crate and forgot to add it back. It should be working now.

The current patch should work but I can't test it directly, could you please give it a spin and see if it fixes the problem for you? If it does I'll land it right away.

Flags: needinfo?(landry)

i've readded the missing midir_impl = { path = "../../../../dom/midi/midir_impl", optional = true } line to toolkit/library/rust/shared/Cargo.toml (because, afaict that was the change added in the last revision of the diff) and the built of all cargo bits went fine.

libxul linking failed but i think this is for reasons totally unrelated to this issue:

79:20.94 ld: error: undefined hidden symbol: webrtc::kIsLibaomAv1EncoderSupported                                                                                                                                    
79:20.94 >>> referenced by Unified_cpp_rnal_video_codecs_gn0.cpp                  
79:20.94 >>>               /usr/obj/m-c/toolkit/library/build/../../../third_party/libwebrtc/media/rtc_internal_video_codecs_gn/Unified_cpp_rnal_video_codecs_gn0.o:(webrtc::InternalEncoderFactory::SupportedFormats())                                                                                                                                                                                                                  
79:20.94 >>> referenced by Unified_cpp_rnal_video_codecs_gn0.cpp                                          
79:20.94 >>>               /usr/obj/m-c/toolkit/library/build/../../../third_party/libwebrtc/media/rtc_internal_video_codecs_gn/Unified_cpp_rnal_video_codecs_gn0.o:(webrtc::InternalEncoderFactory::CreateVideoEncoder(webrtc::SdpVideoFormat const&))                                                                                                                                                                                   
79:20.94 ld: error: undefined hidden symbol: webrtc::CreateLibaomAv1Encoder()                             
79:20.95 >>> referenced by Unified_cpp_rnal_video_codecs_gn0.cpp                                          
79:20.95 >>>               /usr/obj/m-c/toolkit/library/build/../../../third_party/libwebrtc/media/rtc_internal_video_codecs_gn/Unified_cpp_rnal_video_codecs_gn0.o:(webrtc::InternalEncoderFactory::CreateVideoEncoder(webrtc::SdpVideoFormat const&)) 

wonder if this is something related to bug #1744644, :mjf any idea ?

Will clean my tree, pull from mozilla-central, reapply https://bugzilla.mozilla.org/attachment.cgi?id=9256512 and check my builds tomorrow.. but as far as your patch is concerned i think its good to go (eg the midir bits build failure seems solved), and thanks for handling that before 97 goes to beta.

Flags: needinfo?(landry) → needinfo?(mfroman)

:mjf, i think in bug #1744644 when you landed the json changes for https://hg.mozilla.org/integration/autoland/rev/724151aa470d and/or https://hg.mozilla.org/integration/autoland/rev/1c31dce53dff you didnt take OpenBSD into account, which could lead to the linking failure i'm seeing ? should that be a followup bug ?

OS: Unspecified → OpenBSD
Hardware: Unspecified → All

I don't think those changes would have any OpenBSD dependencies since it is just officially turning off libaom for mozilla builds, which we were previously doing by commenting out code. However, if you generated the OpenBSD json and moz.build files before my changes landed in Bug 1744644, they would need to be regenerated to reflect the modifications in D133406 and D133407.

Flags: needinfo?(mfroman)

Thanks, landing this.

Flags: needinfo?(petr.sumbera)
Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/432387e4879b
Build the Web MIDI midir backend only on known supported platforms rather than excluding unsupported ones r=glandium
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: