Closed
Bug 1298418
Opened 9 years ago
Closed 8 years ago
clang-cl warning/error: _tzcnt_u32 was not declared
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: froydnj, Assigned: jya)
References
Details
Attachments
(1 file)
clang-cl complains:
11:33.48 c:/m-c/media/ffvpx/libavutil/x86/intmath.h(59,33): warning: implicit declaration of function '_tzcnt_u32' is invalid in C99 [-Wimplicit-function-declaration]
11:33.48 return ((uint32_t)v == 0) ? _tzcnt_u32((uint32_t)(v >> 32)) + 32 : _tzcnt_u32((uint32_t)v);
11:33.48 ^
which then leads to linking failures later:
11:34.10 mathematics.obj : error LNK2019: unresolved external symbol __tzcnt_u32 referenced in function _av_gcd
11:34.10
11:34.10 mozavutil.dll : fatal error LNK1120: 1 unresolved externals
11:34.10
as _tzcnt_u32 was expected to be inlined.
The problem here is that clang-cl only makes intrinsics available based on the compilation flags you have selected, whereas MSVC makes all the intrinsics available all the time, cf https://llvm.org/bugs/show_bug.cgi?id=25544 , which is a WONTFIX on the clang-cl side. Chromium had to work around this too; from reading the bug report below, I think the problem was fixed upstream, and then they imported a new version of the source:
http://crbug.com/556735
Can we upgrade our version of ffmpeg to include the relevant fix, or patch our version of ffmpeg?
Updated•9 years ago
|
Component: Audio/Video → Audio/Video: Playback
You can clear MOZ_FFVPX in configure in the meanwhile.
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jyavenard
| Assignee | ||
Comment 2•9 years ago
|
||
We use ffmpeg 3.1 as of July 2016, which is a much later version than the one mentioned in the chromium bug
Updated•9 years ago
|
Priority: -- → P3
| Reporter | ||
Comment 3•9 years ago
|
||
Ah, apparently ffmpeg broke things a while back:
https://github.com/FFmpeg/FFmpeg/commit/f98417451291a3ff6719d739b5e904e0b7bf404b
and chromium has not yet updated to a newer version. Do we have a mechanism for providing local patches, so we can make this work in clang-cl?
Flags: needinfo?(jyavenard)
| Assignee | ||
Comment 4•9 years ago
|
||
Well, we don't really. we've been trying to be as close to 100% identical to upstream.
It would be best to have the past accepted upstream and then we resync.
They are very quick at accepting new patches like this, and I can do the resync as soon you you ping me that it's done...
Flags: needinfo?(jyavenard)
| Assignee | ||
Comment 5•9 years ago
|
||
Do you have a patch handy for this?
could submit it upstream for you.
Flags: needinfo?(nfroyd)
| Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #5)
> Do you have a patch handy for this?
>
> could submit it upstream for you.
I do, but clang-cl is also working on fixing it on their side, albeit requiring special compilation options. But the patch to fix it has been waiting more than a week with no movement on the review front...so I'm not sure what the best course of action here is.
Flags: needinfo?(nfroyd)
| Comment hidden (mozreview-request) |
Comment 8•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8815868 [details]
Bug 1298418 - use clang modules with ffvpx's libavutil and clang-cl;
https://reviewboard.mozilla.org/r/96644/#review97266
Are you still planning to remove this if it gets fixed upstream? Can you get a followup on file if so?
Attachment #8815868 -
Flags: review?(mshal) → review+
| Reporter | ||
Comment 9•8 years ago
|
||
(In reply to Michael Shal [:mshal] from comment #8)
> Are you still planning to remove this if it gets fixed upstream? Can you get
> a followup on file if so?
Yes. Bug 1321651 tracks.
Comment 10•8 years ago
|
||
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a63ed01b4c56
use clang modules with ffvpx's libavutil and clang-cl; r=mshal
Comment 11•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•