Open Bug 1225377 Opened 9 years ago Updated 5 months ago

ssl_gtest does not build on many platforms

Categories

(NSS :: Build, defect, P2)

3.21

Tracking

(Not tracked)

People

(Reporter: ashwani.kadian, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421

Steps to reproduce:

Built NSS 3.21 with NSPR 4.10.10


Actual results:

Build failed on most of the platforms including Solaris SPARC, Solaris x64, AIX, HP-UX while creating gtest-all.o.


Expected results:

The build should have passed.
The build has passed on Linux but failed on other platforms.

Following is the error on Solaris SPARC and x64 :

CC -o SunOS5.8_OPT.OBJ/gtest/src/gtest-all.o -c -xO4 -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT  -xarch=v8plus -DXP_UNIX -UDEBUG -DNDEBUG -DNSS_ECC_MORE_THAN_SUITE_B -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -Igtest/include/ -Igtest -I../../../dist/SunOS5.8_OPT.OBJ/include -I../../../dist/public/gtest -I../../../dist/private/gtest   gtest/src/gtest-all.cc
CC: Warning: -xarch=v8plus is deprecated, use -m32 -xarch=sparc instead
"gtest/src/gtest.cc", line 2070: Error: Could not find a match for std::vector<std::string>::vector(const char*const[8], const char*const*) needed in testing::ArrayAsVector<8>(const char*const(&)[8]).
"gtest/src/gtest.cc", line 2076:     Where: While instantiating "testing::ArrayAsVector<8>(const char*const(&)[8])".
"gtest/src/gtest.cc", line 2076:     Where: Instantiated from non-template code.
1 Error(s) detected.
gmake-3.79[3]: *** [SunOS5.8_OPT.OBJ/gtest/src/gtest-all.o] Error 1


Following is the error on AIX :

xlC_r -o AIX5.2_OPT.OBJ/gtest/src/gtest-all.o -c -O -qmaxmem=-1 -DAIX -DSYSV -DXP_UNIX -UDEBUG -DNDEBUG -DNSS_ECC_MORE_THAN_SUITE_B -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -Igtest/include/ -Igtest -I../../../dist/AIX5.2_OPT.OBJ/include -I../../../dist/public/gtest -I../../../dist/private/gtest   "/share/builds/mccrel3/security/securitytip/builds/20151116.1/wozzeck_Solaris8/nss/external_tests/google_test/gtest/src/gtest-all.cc"
1540-5215 (I) No licenses available. Contact your program supplier to add additional users.  Compilation will proceed shortly.
"gtest/include/gtest/gtest-typed-test.h", line 239.47: 1540-0847 (S) Expected an identifier but found "..." in the parameter list for the macro "REGISTER_TYPED_TEST_CASE_P".
gmake[3]: *** [AIX5.2_OPT.OBJ/gtest/src/gtest-all.o] Error 1

Following is the error on HP-UX : 

/opt/aCC/bin/aCC -ext -o HP-UXB.11.11_OPT.OBJ/gtest/src/gtest-all.o -c -O -DHPUX10 -Ae +Z -DHPUX -Dhppa -D_HPUX_SOURCE -D_USE_BIG_FDS +DAportable +DS2.0 -DHPUX11 -D_POSIX_C_SOURCE=199506L -DXP_UNIX -UDEBUG -DNDEBUG -DNSS_ECC_MORE_THAN_SUITE_B -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -Igtest/include/ -Igtest -I../../../dist/HP-UXB.11.11_OPT.OBJ/include -I../../../dist/public/gtest -I../../../dist/private/gtest   gtest/src/gtest-all.cc
Error 112: "gtest/include/gtest/gtest.h", line 54 # Include file <limits> not found.
    #include <limits>
             ^^^^^^^^
Error 112: "gtest/include/gtest/gtest.h", line 55 # Include file <ostream> not found.
    #include <ostream>
             ^^^^^^^^^
Error 112: "gtest/include/gtest/gtest.h", line 56 # Include file <vector> not found.
    #include <vector>
             ^^^^^^^^
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 274 # Include file <algorithm> not found.
    #include <algorithm>  // NOLINT
             ^^^^^^^^^^^           
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 275 # Include file <iostream> not found.
    #include <iostream>  // NOLINT
             ^^^^^^^^^^           
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 276 # Include file <sstream> not found.
    #include <sstream>  // NOLINT
             ^^^^^^^^^           
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 277 # Include file <string> not found.
    #include <string>  // NOLINT
             ^^^^^^^^           
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 278 # Include file <utility> not found.
    #include <utility>
             ^^^^^^^^^
Error 112: "gtest/include/gtest/internal/gtest-port.h", line 603 # Include file <typeinfo> not found.
    # include <typeinfo>
              ^^^^^^^^^^
Error 112: "gtest/include/gtest/internal/gtest-tuple.h", line 41 # Include file <utility> not found.
    #include <utility>  // For ::std::pair.
             ^^^^^^^^^                     
Error 24: "gtest/include/gtest/internal/gtest-tuple.h", line 112 # 'class' expected instead of 'namespace'.
    namespace std {
    ^^^^^^^^^      
Error 24: "gtest/include/gtest/internal/gtest-tuple.h", line 113 # 'class' expected instead of 'namespace'.
    namespace tr1 {
    ^^^^^^^^^      
Error 699: "gtest/include/gtest/internal/gtest-tuple.h", line 113 # Error limit reached; halting compilation.
    namespace tr1 {
    ^^^^^^^^^      
gmake-3.80[3]: *** [HP-UXB.11.11_OPT.OBJ/gtest/src/gtest-all.o] Error 2
Severity: normal → critical
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Version: 3.17.2 → 3.21
Ashwani, I believe these are all because the C++ compiler on these machines is not up to the current C++11 standard. Either the compilers need to be upgraded, or the compilation of the gtests should be disabled.

In previous versions of NSS, there was a build macro called NSS_BUILD_GTESTS to control this behavior. It looks like this build macro has gone away and the gtests are now building by default.

We should upgrade the compiler where possible, and turn off the building of these tests where it isn't.
For the short term, we have to do the later.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 1214390
Try setting NSS_DISABLE_GTESTS=1 in the build.
No longer depends on: 1214390
Lowering to P2 since there is a way to disable building those tests with NSS_DISABLE_TESTS=1 .

I'm keeping the bug open so we can figure out the C++ compiler flags as we upgrade compilers to C++11 on various machines.
Severity: critical → normal
Priority: P1 → P2
Summary: gtest-all.o fails to build with NSS 3.21 → ssl_gtest does not build on many platforms
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.