Closed Bug 2000293 Opened 8 months ago Closed 4 months ago

Broken Windows OpenH264 builds

Categories

(Firefox Build System :: Toolchains, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr140 unaffected, firefox145 unaffected, firefox146 unaffected, firefox147 wontfix, firefox149 wontfix, firefox150 wontfix, firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox145 --- unaffected
firefox146 --- unaffected
firefox147 --- wontfix
firefox149 --- wontfix
firefox150 --- wontfix
firefox151 --- fixed

People

(Reporter: RyanVM, Assigned: RyanVM)

References

(Regression)

Details

(Keywords: regression)

https://treeherder.mozilla.org/logviewer?job_id=535756111&repo=try&task=RCC76AXsTYiwwLwuobq81A.0&lineNumber=823

module/gmp-openh264.cpp(710,10): error: no member named 'vector' in namespace 'std'
  710 |     std::vector<uint32_t> lengths;
      |     ~~~~~^
module/gmp-openh264.cpp(710,17): error: unexpected type name 'uint32_t': expected expression
  710 |     std::vector<uint32_t> lengths;
      |                 ^
module/gmp-openh264.cpp(710,27): error: use of undeclared identifier 'lengths'; did you mean 'length'?
  710 |     std::vector<uint32_t> lengths;
      |                           ^~~~~~~
      |                           length
module/gmp-openh264.cpp(709,14): note: 'length' declared here
  709 |     uint32_t length = 0;
      |              ^
module/gmp-openh264.cpp(714,7): error: use of undeclared identifier 'lengths'; did you mean 'length'?
  714 |       lengths.push_back (0);
      |       ^~~~~~~
      |       length
module/gmp-openh264.cpp(709,14): note: 'length' declared here
  709 |     uint32_t length = 0;
      |              ^
module/gmp-openh264.cpp(714,14): error: member reference base type 'uint32_t' (aka 'unsigned int') is not a structure or union
  714 |       lengths.push_back (0);
      |       ~~~~~~~^~~~~~~~~~
module/gmp-openh264.cpp(719,9): error: use of undeclared identifier 'lengths'; did you mean 'length'?
  719 |         lengths[i] += encoded->sLayerInfo[i].pNalLengthInByte[j];
      |         ^~~~~~~
      |         length
module/gmp-openh264.cpp(709,14): note: 'length' declared here
  709 |     uint32_t length = 0;
      |              ^
module/gmp-openh264.cpp(719,16): error: subscripted value is not an array, pointer, or vector
  719 |         lengths[i] += encoded->sLayerInfo[i].pNalLengthInByte[j];
      |         ~~~~~~~^~
module/gmp-openh264.cpp(740,51): error: use of undeclared identifier 'lengths'; did you mean 'length'?
  740 |       memcpy (tmp, encoded->sLayerInfo[i].pBsBuf, lengths[i]);
      |                                                   ^~~~~~~
      |                                                   length
module/gmp-openh264.cpp(709,14): note: 'length' declared here
  709 |     uint32_t length = 0;
      |              ^
module/gmp-openh264.cpp(740,58): error: subscripted value is not an array, pointer, or vector
  740 |       memcpy (tmp, encoded->sLayerInfo[i].pBsBuf, lengths[i]);
      |                                                   ~~~~~~~^~
module/gmp-openh264.cpp(741,14): error: use of undeclared identifier 'lengths'; did you mean 'length'?
  741 |       tmp += lengths[i];
      |              ^~~~~~~
      |              length
module/gmp-openh264.cpp(709,14): note: 'length' declared here
  709 |     uint32_t length = 0;
      |              ^
module/gmp-openh264.cpp(741,21): error: subscripted value is not an array, pointer, or vector
  741 |       tmp += lengths[i];
      |              ~~~~~~~^~
module/gmp-openh264.cpp(797,6): error: variable has incomplete type 'void'
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |      ^
module/gmp-openh264.cpp(797,29): error: no member named 'vector' in namespace 'std'
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                        ~~~~~^
module/gmp-openh264.cpp(797,36): error: unexpected type name 'uint8_t': expected expression
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                    ^
module/gmp-openh264.cpp(797,46): error: use of undeclared identifier 'out'
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                              ^
module/gmp-openh264.cpp(797,51): error: expected expression
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                                   ^
module/gmp-openh264.cpp(797,70): error: unexpected type name 'size_t': expected expression
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                                                      ^
module/gmp-openh264.cpp(797,82): error: expected ';' after top level declarator
  797 | void copyWithStartCode(std::vector<uint8_t>& out, const uint8_t* in, size_t size) {
      |                                                                                  ^
      |                                                                                  ;
module/gmp-openh264.cpp(874,12): error: no member named 'vector' in namespace 'std'
  874 |       std::vector<uint8_t> annexb;
      |       ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

This looks directly relevant:
https://hg-edge.mozilla.org/integration/autoland/diff/e04fcb496529ebc63014c094e615dd88d48b1026/dom/media/gmp/gmp-api/gmp-video-encode.h

Flags: needinfo?(sguelton)

So Linux & Mac builds appear to bootstrap gmp-api from the Firefox135 tag of https://github.com/mozilla/gmp-api while Windows builds use the in-tree version in dom/media/gmp/gmp-api/ instead. Exciting.

I wonder if Windows builds can just bootstrap from the upstream repo as well now. I think the original decision goes back to a time when the Windows workers in our CI didn't have Git installed on them, which is no longer the case.

Well, https://hg-edge.mozilla.org/integration/autoland/diff/e04fcb496529ebc63014c094e615dd88d48b1026/dom/media/gmp/gmp-api/gmp-video-encode.h is correct in the sense that std::vector is not used by gmp-video-encode.h . So my questions are:

  • do we own gmp-video-encode.h? (from the log I'd say yes)
  • where does that gmp-openh264.cpp live and could we have it just include <vector> as it seems to require it?
Flags: needinfo?(sguelton)

https://github.com/cisco/openh264 is the upstream repo.

From the looks of it, we also haven't upstreamed our in-tree changes to the gmp-api repo in awhile. Can you help with that, Andrew?

Flags: needinfo?(aosmond)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #5)

From the looks of it, we also haven't upstreamed our in-tree changes to the gmp-api repo in awhile. Can you help with that, Andrew?

I've submitted https://github.com/mozilla/gmp-api/pull/25 for that. Just need someone with permissions to review and merge it. Then we can hopefully submit an OpenH264 patch to add the <vector> include directly to gmp-openh264.cpp and update the gmp-api reference to the latest tip.

In the mean time, I'm also attempting a patch to have Windows builds use the same logic as Linux & Mac which should un-break things in the short term.

Depends on: 2021508
Assignee: nobody → ryanvm
Status: NEW → RESOLVED
Closed: 4 months ago
Flags: needinfo?(aosmond)
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
You need to log in before you can comment on or make changes to this bug.