尝试使用 scons 构建 libjingle 0.6.14 失败

Attempting to build libjingle 0.6.14 with scons fails

如果我尝试使用 scons 构建 libjingle,我 运行 会出现以下错误:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build\dbg\obj\third_party\gtest\src\gtest-all.obj
gtest-all.cc
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\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(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\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(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4338) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(4570) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductGenerator9<T1,T2,T3,T4,
T5,T6,T7,T8,T9>' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4338) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4338) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4338) : error C2955: 'testing::internal::
ParamGeneratorInterface' : use of class template requires template argument list

        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util.h(142) : see declaration of 'testing::interna
l::ParamGeneratorInterface'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4340) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4351) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4351) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4356) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4356) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4363) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(4363) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductGenerator9<T1,T2,T3,T4,
T5,T6,T7,T8,T9>::Iterator' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4363) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4363) : error C2955: 'testing::internal::
ParamIteratorInterface' : use of class template requires template argument list
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util.h(69) : see declaration of 'testing::internal
::ParamIteratorInterface'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4365) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4365) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4398) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4398) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4440) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4440) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4444) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4444) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4525) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4525) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4577) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(4826) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductGenerator10<T1,T2,T3,T4
,T5,T6,T7,T8,T9,T10>' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4577) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4577) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4577) : error C2955: 'testing::internal::
ParamGeneratorInterface' : use of class template requires template argument list

        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util.h(142) : see declaration of 'testing::interna
l::ParamGeneratorInterface'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4579) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4591) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4591) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4596) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4596) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4603) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(4603) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductGenerator10<T1,T2,T3,T4
,T5,T6,T7,T8,T9,T10>::Iterator' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4603) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4603) : error C2955: 'testing::internal::
ParamIteratorInterface' : use of class template requires template argument list
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util.h(69) : see declaration of 'testing::internal
::ParamIteratorInterface'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4605) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4605) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4641) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4641) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4687) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4687) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4691) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4691) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4777) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(4777) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5059) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(5087) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductHolder9<Generator1,Gene
rator2,Generator3,Generator4,Generator5,Generator6,Generator7,Generator8,Generat
or9>' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5059) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5059) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5103) : error C2977: 'std::tuple' : too m
any template arguments
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
        c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\inclu
de\gtest\internal\gtest-param-util-generated.h(5134) : see reference to class te
mplate instantiation 'testing::internal::CartesianProductHolder10<Generator1,Gen
erator2,Generator3,Generator4,Generator5,Generator6,Generator7,Generator8,Genera
tor9,Generator10>' being compiled
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5103) : error C3203: 'tuple' : unspeciali
zed class template can't be used as a template argument for template parameter '
T', expected a real type
c:\users\cmrl\dependencies\libjingle-0.6.14\talk\third_party\gtest\include\gtest
\internal\gtest-param-util-generated.h(5103) : error C2955: 'std::tuple' : use o
f class template requires template argument list
        c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(7
3) : see declaration of 'std::tuple'
scons: *** [build\dbg\obj\third_party\gtest\src\gtest-all.obj] Error 2
scons: building terminated because of errors.

tl;dr: gtest 中的一堆模板错误。

我正在尝试构建版本 0.6.14,但 scons 版本 2.0.1、2.1.0、2.3.4 和 local-2.3.4 会出现此错误。其他依赖都是最新的,用VS没问题。我在 VS 命令提示符中尝试 运行ning hammer.bat 并得到相同的错误。有没有其他人遇到过这个?我如何在不尝试自己编辑代码的情况下解决这个问题?

问题已解决。显然这是 VS 2012 的一个问题,它最多只接受五个参数,因此出现 "too many template arguments" 错误。这已在 VS 2013 中修复,或者可以在此处找到解决方案:

C2977: 'std::tuple' : too many template arguments (MSVC11)