Closed Bug 1351803 Opened 5 years ago Closed 5 years ago

--disable-webrtc build broken in cubeb_wasapi.obj : error LNK2019: unresolved external symbol __imp_AvSetMmThreadCharacteristicsA

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: away, Assigned: padenot)

Details

Attachments

(1 file)

With --disable-webrtc, we don't incorporate avrt.lib via https://dxr.mozilla.org/mozilla-central/rev/272ce6c2572164f5f6a9fba2a980ba9ccf50770c/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_core_win.h#31

Adding the same #pragma comment to cubeb_wasapi.cpp fixes it for me, but maybe check with glandium to see whether this should really be in a moz.build instead.
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Rank: 25
Priority: -- → P2
Comment on attachment 8852898 [details]
Bug 1351803 - Statically link to avrt.lib on Windows, when compiling cubeb.

https://reviewboard.mozilla.org/r/125036/#review128838

::: commit-message-60d7a:7
(Diff revision 1)
> +
> +We used to get the symbols we need using `LoadLibrary`, but now (since
> +https://github.com/kinetiknz/cubeb/commit/661c653c8650b2b1c485e86b5a5b4f6d0ed07d1b),
> +we can statically link to avrt.lib, because we only support Windows OSes that
> +have this library. For now, this works because avrt.lib is linked in
> +webrtc-land somewhere with a #pragma, but:

I'm mystified this didn't cause problems when we still supported < Vista... the pragma has been there for a long time...
Attachment #8852898 - Flags: review?(mh+mozilla) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/autoland/rev/cd9eb22854c9
Statically link to avrt.lib on Windows, when compiling cubeb. r=glandium
https://hg.mozilla.org/mozilla-central/rev/cd9eb22854c9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.