Safinsss / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 1 forks source link

build failure with VS2012 from googletest #113

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
from 
http://build.chromium.org/p/client.drmemory/builders/win-8_x64-drm/builds/6/step
s/Build%20TSan%20tests/logs/stdio

cl -nologo -Zi -MTd -Od  -EHs- -EHa- -wd4530 -D_CRT_SECURE_NO_DEPRECATE 
-D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0 -Gy -DOS_windows -DARCH_x86  \
     -I../dynamic_annotations -I../third_party/googletest/include -I. \
     -DDYNAMIC_ANNOTATIONS_ENABLED=1 -c racecheck_unittest.cc -Fobin/racecheck_unittest-windows-x86-O0.obj
racecheck_unittest.cc
E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/interna
l/gtest-param-util-generated.h(4015) : 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'
        E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/internal/gtest-param-util-generated.h(4247) : see reference to class template instantiation 'testing::internal::CartesianProductGenerator9<T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/interna
l/gtest-param-util-generated.h(4015) : error C3203: 'tuple' : unspecialized 
class template can't be used as a template argument for template parameter 'T', 
expected a real type
E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/interna
l/gtest-param-util-generated.h(4015) : 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'
E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/interna
l/gtest-param-util-generated.h(4015) : error C2955: 
'testing::internal::ParamGeneratorInterface' : use of class template requires 
template argument list
        E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/internal/gtest-param-util.h(163) : see declaration of 'testing::internal::ParamGeneratorInterface'
E:\b\build\slave\win-8_x64-drm\tsan\third_party\googletest\include\gtest/interna
l/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'

This is a known bug in googletest:
https://code.google.com/p/googletest/issues/detail?id=412

See also:
https://code.google.com/p/drmemory/issues/detail?id=1141

The workaround is to define _VARIADIC_MAX=10 in the preprocessor

Original issue reported on code.google.com by bruen...@google.com on 19 Jun 2013 at 7:18

GoogleCodeExporter commented 8 years ago
Fixed by r4433 + r4434.

Original comment by timurrrr@google.com on 20 Jun 2013 at 9:01