WebRTC tests fail to build using visual studio 2012

RESOLVED FIXED in mozilla17

Status

()

Core
WebRTC
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: jimm, Assigned: TimAbraldes)

Tracking

Trunk
mozilla17
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
A long series of errors similar to these:

f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/gtest-printers.h(550) : error C2977: 'std::tuple' : too many template arguments
        C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\utility(73) : see declaration of 'std::tuple'
f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/gtest-printers.h(558) : error C2977: 'std::tuple' : too many template arguments
        C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\utility(73) : see declaration of 'std::tuple'
f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(4017) : error C2977: 'std::tuple' : too many template arguments
        C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\utility(73) : see declaration of 'std::tuple'
        f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(4249) : see reference to class template instantiation 'testing::internal::CartesianProductGenerator9<T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(4017) : error C3203: 'tuple' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type
f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(4017) : error C2955: 'std::tuple' : use of class template requires template argument list
        C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\utility(73) : see declaration of 'std::tuple'
f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(4017) : error C2955: 'testing::internal::ParamGeneratorInterface' : use of class template requires template argument list
        f:\Mozilla\firefox\mc\media\webrtc\trunk\testing\gtest\include\gtest/internal/gtest-param-util.h(142) : see declaration of 'testing::internal::ParamGeneratorInterface'
Are the problems all in gtest?
(Reporter)

Comment 2

6 years ago
(In reply to Randell Jesup [:jesup] from comment #1)
> Are the problems all in gtest?

Yes, if I clip trunk/testing out of the root makefile the library builds successfully. Do we rely on these tests?
I wonder if these have been fixed in upstream gtest? If not, we can probably get them fixed.
These are caused by a change in VS2012.  Basically, variadic macros support fewer arguments in VS2012RC than they did in previous version of VS.  Defining `_VARIADIC_MAX` to be 10 might solve this issue.

From [1]:
  "Spamming out so many pair-tuple overloads, plus all of the emplacement overloads, consumed a massive amount of memory during compilation. Therefore, we reduced infinity. In Visual C++ 2008 SP1 and Visual C++ 2010, infinity was 10 (that is, "variadic" templates supported 0 to 10 arguments, inclusive). By default, infinity is 5 in Visual C++ in Visual Studio 2012 RC. This brings compiler memory consumption back to what it was in Visual C++ 2010. If you need more arguments (for example, if you have existing code that uses 6-tuples), there is an escape hatch. You can define _VARIADIC_MAX project-wide between 5 and 10 inclusive. This consumes more memory, and may require that you use the /Zm compiler option to reserve more space for pre-compiled headers."

[1] http://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx
Created attachment 642032 [details] [diff] [review]
Patch v1

The attached patch seems to fix my local builds.  Ted; are you the right person to review this?
Assignee: nobody → tabraldes
Status: NEW → ASSIGNED
Attachment #642032 - Flags: review?(ted.mielczarek)
Comment on attachment 642032 [details] [diff] [review]
Patch v1

Review of attachment 642032 [details] [diff] [review]:
-----------------------------------------------------------------

This seems reasonable. We'll want to get this upstream, but I'm not sure what our process is there currently.
Attachment #642032 - Flags: review?(ted.mielczarek) → review+
(In reply to Ted Mielczarek [:ted] from comment #7)
> This seems reasonable. We'll want to get this upstream, but I'm not sure
> what our process is there currently.

http://www.webrtc.org/reference/contributing
I filed this issue at the webrtc site and attached the patch from this bug (modified to apply correctly using the gclient set of tools):
  http://code.google.com/p/webrtc/issues/detail?id=683
Pushed to inbound and marking as "leave open": We'll want to back out this patch when an upstream fix is available.

https://hg.mozilla.org/integration/mozilla-inbound/rev/41308088db55
Whiteboard: [leave open]
Target Milestone: --- → mozilla17
Thanks tim - I'll track it

Updated

6 years ago
QA Contact: jsmith
It appears webrtc.org won't be taking this, so we'll need to carry the patch in our tree.  Closing.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

5 years ago
Whiteboard: [leave open] → [qa-]
I got an email saying that this has been fixed upstream [1]. Do we now want to back out the fix for this?

[1] http://code.google.com/p/webrtc/issues/detail?id=683
You need to log in before you can comment on or make changes to this bug.