Googletest: Compilation issue with GCC 6.1.1 and PBBAM

Created on 8 Jun 2017  路  3Comments  路  Source: google/googletest

This is a bug reported in the program _PBBAM_ for which I believe the culprit is actually google test.
See entry in github

Update: I stated this wrong, googletest is not the source of the problem, but only subsequently reports the error due to wrong defined access flags

We migrated from CentOS 6 with gcc4.9 to CentOS 7 with gcc 6.1.1.
While trying to rebuild pbbam for that architecture I ran into issues with gtest.
It looks as if make is somehow trying to change the Dprivate and Dpublic flags and the error results in a redeclared with different access message.


[ 68%] Building CXX object tests/CMakeFiles/test_pbbam.dir/src/test_AlignmentPrinter.cpp.o
In file included from /builddir/build/BUILD/gtest/include/gtest/internal/gtest-port.h:212:0,
                 from /builddir/build/BUILD/gtest/include/gtest/internal/gtest-internal.h:40,
                 from /builddir/build/BUILD/gtest/include/gtest/gtest.h:58,
                 from /builddir/build/BUILD/pbbam-0106cdf0a2c71ed3195d971b6972b6200dfe66f3/tests/src/test_Accuracy.cpp:42:
/software/include/c++/6.1.1/sstream:300:7: error: 'struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs' redeclared with different access
       struct __xfer_bufptrs
       ^~~~~~
In file included from /builddir/build/BUILD/gtest/include/gtest/internal/gtest-port.h:212:0,
                 from /builddir/build/BUILD/gtest/include/gtest/internal/gtest-internal.h:40,
                 from /builddir/build/BUILD/gtest/include/gtest/gtest.h:58,
                 from /builddir/build/BUILD/pbbam-0106cdf0a2c71ed3195d971b6972b6200dfe66f3/tests/src/test_AlignmentPrinter.cpp:43:
/software/include/c++/6.1.1/sstream:300:7: error: 'struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs' redeclared with different access
       struct __xfer_bufptrs
       ^~~~~~
[ 69%] Building CXX object tools/pbindex/CMakeFiles/pbindex.dir/src/main.cpp.o
make[2]: *** [tests/CMakeFiles/test_pbbam.dir/src/test_Accuracy.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Most helpful comment

~/pbbam $ grep -rn '#define *private *public' | wc -l
45

If PBBAM does #define private public, it deserves everything it gets.

All 3 comments

~/pbbam $ grep -rn '#define *private *public' | wc -l
45

If PBBAM does #define private public, it deserves everything it gets.

I couldnt agree more with you. Do you know a way to ignore these warnings ? Currently I had to deactivate all googletests in order to finish the installation.

There is no actionable information here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GoogleCodeExporter picture GoogleCodeExporter  路  5Comments

marknelson picture marknelson  路  4Comments

nholthaus picture nholthaus  路  6Comments

kdawgwilk picture kdawgwilk  路  3Comments

cyberdecker picture cyberdecker  路  3Comments