gunit fails to compile on some compilers because of GCC pragmas
Trying to install tempo2 on someone elses cluster, I get the following while compiling:
In file included from gtest-1.7.0/src/gtest-all.cc:39: ./gtest-1.7.0/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char, const char, const T1&, const T2&)’: ./gtest-1.7.0/include/gtest/gtest.h:1447: error: #pragma GCC diagnostic not allowed inside functions ./gtest-1.7.0/include/gtest/gtest.h:1451: error: #pragma GCC diagnostic not allowed inside functions make[2]: *** [gtest-1.7.0/src/gtest-all.lo] Error 1 make[2]: Leaving directory `/nfshome/lentati/tempo2/tests'
I dont really know what it means though.
Comments (7)
-
-
- changed status to open
-
- changed title to gunit fails to compile on some compilers because of GCC pragmas
-
assigned issue to
Changed title to be a bit more informative.
-
reporter Apparently they have gcc 4.4.7 installed. I looked in the configure help (./configure -h) to see if there was an option to disable tests but didn't see it, will check again.
Cheers Lindley
-
- changed status to resolved
Expected to be fixed as of 9bd701f9cec7bc96243da39733cd6c274e30bd8c
Bug with GCC < 4.8 when using #pragma GCC, so put in a verison check. Please checkout hotfix branch and see if the problem is resolved
-
N.B. "A quick fix would be to disable compiling the test suite unless make check was actually run." << I meant that I should do that in the makefile. I lazily build the test suite even if you aren't going to run any tests.
-
reporter Hot fix branch worked.
Thanks!
Lindley
- Log in to comment
Can you let me know what compiler is being used? For some reason gtest uses a GNU pragma to disable certain warnings, but clearly it isn't quite set up correctly for all compilers.
A quick fix would be to disable compiling the test suite unless make check was actually run.