Firefox 36 fails to build in VS2010 SP1 while compiling MediaSourceDecoder.h

RESOLVED FIXED

Status

()

P1
critical
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: adolf_daniel, Assigned: Callek)

Tracking

36 Branch
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(firefox36 fixed, firefox37 wontfix, firefox38 wontfix)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 8559060 [details]
Logs with both with and without "strongly typed enum classes"

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2292.0 Safari/537.36

Steps to reproduce:

1. Run start-shell-msvc2010.bat from MozillaBuild 1.11.0
2. Change directory to /c/mozilla-build/mozilla-beta of Firefox 36b6/36b5 source downloaded from ftp://ftp.mozilla.org/pub/firefox/releases/36.0b6/
3. Run ./mach build


Actual results:

We are working on the Norton Toolbar extension which uses XPCOM C++ for its implementation. While building the Firefox SDK in Visual Studio 2010 SP1 we encountered the below failures.

Due to the usage of "strongly typed enum classes" in dom/media/mediasource/MediaSource.h and dom/media/mediasource/MediaSourceDecoder.h the build fails with the following error.

[1423046191.501, "build_output", {"line": "d:\\mozilla-build\\mozilla-beta\\dom\\media\\mediasource\\MediaSourceDecoder.h(24) : error C2059: syntax error : ';'"}]
[1423046191.505, "build_output", {"line": "d:\\mozilla-build\\mozilla-beta\\dom\\media\\mediasource\\MediaSourceDecoder.h(60) : error C2061: syntax error : identifier 'MSRangeRemovalAction'"}]
[1423046191.51, "build_output", {"line": "d:\\mozilla-build\\mozilla-beta\\dom\\media\\mediasource\\MediaSourceDecoder.h(90) : error C2061: syntax error : identifier 'MSRangeRemovalAction'"}]
[1423046191.515, "build_output", {"line": "d:\\mozilla-build\\mozilla-beta\\obj-i686-pc-mingw32\\dist\\include\\mozilla/dom/Element.h(198) : fatal error C1903: unable to recover from previous error(s); stopping compilation"}]
[1423046191.521, "build_output", {"line": ""}]

I removed the usage of "strongly typed enum classes" and it ended up in throwing the following error.

[1423046875.17, "build_output", {"line": "['c:/Program Files (x86)/BullseyeCoverage/bin/x86_amd64/cl.exe', '-Foservice64_resolver.obj', '-c', '-DUNICODE', '-DAB_CD=en-US', '-DNO_NSPR_10_SUPPORT', '-Ic:/mozilla-build/mozilla-beta/security/sandbox/win/wow_helper', '-I.', '-Ic:/mozilla-build/mozilla-beta/security/sandbox/win/wow_helper/../../', '-Ic:/mozilla-build/mozilla-beta/security/sandbox/win/wow_helper/../../../', '-Ic:/mozilla-build/mozilla-beta/security/sandbox/win/wow_helper/../../chromium/', '-I../../../../dist/include', '-Ic:/mozilla-build/mozilla-beta/obj-i686-pc-mingw32/dist/include/nspr', '-Ic:/mozilla-build/mozilla-beta/obj-i686-pc-mingw32/dist/include/nss', '-MT', '-TP', '-nologo', '-D_HAS_EXCEPTIONS=0', '-W3', '-Gy', '-wd4251', '-wd4244', '-wd4267', '-wd4345', '-wd4351', '-wd4482', '-wd4800', '-wd4819', '-we4553', '-GR-', '-DDEBUG', '-DTRACING', '-Zi', '-O1', '-Oi', '-Oy-', '-Fdgenerated.pdb', 'c:/mozilla-build/mozilla-beta/security/sandbox/chromium/sandbox/win/wow_helper/service64_resolver.cc', '-showIncludes']"}]
[1423046875.191, "build_output", {"line": "Traceback (most recent call last):"}]
[1423046875.192, "build_output", {"line": "  File \"c:\\mozilla-build\\python\\Lib\\runpy.py\", line 162, in _run_module_as_main"}]
[1423046875.193, "build_output", {"line": "    \"__main__\", fname, loader, pkg_name)"}]
[1423046875.193, "build_output", {"line": "  File \"c:\\mozilla-build\\python\\Lib\\runpy.py\", line 72, in _run_code"}]
[1423046875.194, "build_output", {"line": "    exec code in run_globals"}]
[1423046875.194, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\python\\mozbuild\\mozbuild\\action\\cl.py\", line 122, in <module>"}]
[1423046875.195, "build_output", {"line": "    sys.exit(main(sys.argv[1:]))"}]
[1423046875.195, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\python\\mozbuild\\mozbuild\\action\\cl.py\", line 119, in main"}]
[1423046875.196, "build_output", {"line": "    return InvokeClWithDependencyGeneration(args)"}]
[1423046875.198, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\python\\mozbuild\\mozbuild\\action\\cl.py\", line 94, in InvokeClWithDependencyGeneration"}]
[1423046875.199, "build_output", {"line": "    p.run()"}]
[1423046875.2, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\testing\\mozbase\\mozprocess\\mozprocess\\processhandler.py\", line 670, in run"}]
[1423046875.2, "build_output", {"line": "    self.proc = self.Process([self.cmd] + self.args, **args)"}]
[1423046875.201, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\testing\\mozbase\\mozprocess\\mozprocess\\processhandler.py\", line 97, in __init__"}]
[1423046875.202, "build_output", {"line": "    universal_newlines, startupinfo, creationflags)"}]
[1423046875.202, "build_output", {"line": "  File \"c:\\mozilla-build\\python\\Lib\\subprocess.py\", line 710, in __init__"}]
[1423046875.203, "build_output", {"line": "    errread, errwrite)"}]
[1423046875.204, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\testing\\mozbase\\mozprocess\\mozprocess\\processhandler.py\", line 234, in _execute_child"}]
[1423046875.205, "build_output", {"line": "    cwd, startupinfo)"}]
[1423046875.205, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\testing\\mozbase\\mozprocess\\mozprocess\\winprocess.py\", line 184, in ErrCheckCreateProcess"}]
[1423046875.206, "build_output", {"line": "    ErrCheckBool(result, func, args)"}]
[1423046875.207, "build_output", {"line": "  File \"c:\\mozilla-build\\mozilla-beta\\testing\\mozbase\\mozprocess\\mozprocess\\winprocess.py\", line 51, in ErrCheckBool"}]
[1423046875.207, "build_output", {"line": "    raise WinError()"}]
[1423046875.208, "build_output", {"line": "WindowsError: [Error 2] The system cannot find the file specified."}]
[1423046875.208, "build_output", {"line": ""}]
[1423046875.211, "build_output", {"line": "In the directory  /c/mozilla-build/mozilla-beta/obj-i686-pc-mingw32/security/sandbox/win/wow_helper"}]
[1423046875.212, "build_output", {"line": "The following command failed to execute properly:"}]

Is it expected that VS 2010 SP1 support has been completely stopped for Firefox builds going forward?

Is there any workaround for building Firefox in VS 2010 SP1 without any errors?

I tried using the SDK built from VS2012 in VS 2010 extension but it doesn't work because of incompatible VS versions.
(Reporter)

Updated

4 years ago
Severity: normal → critical
Component: Untriaged → Build Config
Priority: -- → P1
(Reporter)

Updated

4 years ago
OS: Windows 7 → Windows 8.1
Technically we require MSVC2013 for Firefox37 and onward. This build issue on Firefox 36 is occurring because we backported a patch from 37 to 36.

Given that you'll need to switch to MSVC2013 in three weeks anyway, it's probably easiest to just do that now.
(Reporter)

Comment 3

4 years ago
Thank you Bobby for the confirmation.
(In reply to Bobby Holley (Busy with media, don't ask for DOM/JS/XPConnect things) from comment #1)
> Technically we require MSVC2013 for Firefox37 and onward. This build issue
> on Firefox 36 is occurring because we backported a patch from 37 to 36.

Why our tree is not burning?
(In reply to Masatoshi Kimura [:emk] from comment #4)
> (In reply to Bobby Holley (Busy with media, don't ask for DOM/JS/XPConnect
> things) from comment #1)
> > Technically we require MSVC2013 for Firefox37 and onward. This build issue
> > on Firefox 36 is occurring because we backported a patch from 37 to 36.
> 
> Why our tree is not burning?

Presumably because, even though VS2010 was technically supported for Firefox 36, we're building it with VS2013 builders.
... which means the addon needs to be built with 2013 too...

That said, the failure to build with 2010 should be fixed anyways.
(Assignee)

Comment 7

4 years ago
Pretty sure this is (one of) the reasons SeaMonkey beta is failing to build as well. (since we're using MSVC2010 still)
(Assignee)

Comment 8

4 years ago
(fix summary for bugmail)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Firefox 36 fails to build in VS2010 SP1 → Firefox 36 fails to build in VS2010 SP1 while compiling MediaSourceDecoder.h
(Assignee)

Comment 9

4 years ago
As far as I can tell this is a regression from http://hg.mozilla.org/releases/mozilla-beta/rev/2a36e0243edd


With glandium's help I pushed-to-try using MSVC2010 and confirmed it fails:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b0d31e52d314

I then pushed my theory-fix with https://treeherder.mozilla.org/#/jobs?repo=try&revision=f4931b2f2b9b (Jobs pending)

The theory here is since MediaSource.h includes MediaSourceDecoder.h and yet MediaSource.h is what currently defines the enum, with MediaSourceDecoder.h forward-declaring it, I might as well just define in MediaSourceDecoder instead.
(Assignee)

Comment 10

4 years ago
see-also: Bug 1131788 for another MSVC2010 issue on Firefox 36
(Assignee)

Comment 11

4 years ago
Created attachment 8562340 [details] [diff] [review]
Fix MSRangeRemovalAction

This should be completely safe to land on trunk, and I'm happy to. I'm also happy to land directly to beta if its not deemed wanted for trunk.

I'll take whoever reviews first.
Assignee: nobody → bugspam.Callek
Status: NEW → ASSIGNED
Attachment #8562340 - Flags: review?(jyavenard)
Attachment #8562340 - Flags: review?(cajbir.bugzilla)
(Assignee)

Comment 12

4 years ago
And the other issue I found (c#9's try run) is articuled with patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1020368#c25
Comment on attachment 8562340 [details] [diff] [review]
Fix MSRangeRemovalAction

r+ but only for 36.

MSRangeRemovalAction should be defined in MediaSource.h as this is where it is exposed.
Attachment #8562340 - Flags: review?(jyavenard) → review+
(Assignee)

Comment 14

4 years ago
Comment on attachment 8562340 [details] [diff] [review]
Fix MSRangeRemovalAction

Approval Request Comment
[Feature/regressing bug #]: Bug 1120079 
[User impact if declined]: Unable to build on MSVC2010 (official Builds use MSVC2013)
[Describe test coverage new/current, TreeHerder]: No coverage for the 2010 fix, however the code is covered on all builds using this code.
[Risks and why]: No risk, the enum is still defined in all places
[String/UUID change made/needed]: None

This was needed because you can't forward declare enums on MSVC2010
Attachment #8562340 - Flags: review?(cajbir.bugzilla) → approval-mozilla-beta?
status-firefox36: --- → affected
Attachment #8562340 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
https://hg.mozilla.org/releases/mozilla-beta/rev/e95df19f3b70
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox36: affected → fixed
status-firefox37: --- → wontfix
status-firefox38: --- → wontfix
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Component: Build Config → Video/Audio
Product: Firefox → Core
Target Milestone: Firefox 36 → ---
You need to log in before you can comment on or make changes to this bug.