Reverted out debian instructions, as 4213 fixed the issue on clean debian installs and neal's experience was from Nov. 1 - kept in the gtest break instructions, though.
Krista 'DarthMama' Bennett
3 years ago
1 changed files
Download Patch File
Download Diff File
@ -41,29 +41,27 @@ anyway and who am I to judge?
##### Debian and Ubuntu (and derivatives)
Using the libgtest-dev is easy, but not straightforward.
Unfortunately, the version of google test in Debian Buster is too old:
it's version 1.8 and we require version 1.9. Version 1.9 is available
in Debian Testing, but it is built with g++ 9.0, which is ABI
incompatible with binaries built with g++ 8.0, which is in Debian
stable. Specifically, gcc has changed the semantics of std::string
with C++11 and using g++ 8.0 results in the errors like the following:
undefined reference to `std::__cxx11::basic_stringstream
It's possible to install g++ 9.0 from testing to get the test suite
working, but that breaks other things (at least for me -Neal).
Instead, the easiest thing to do it to rebuild gtest for Debian
Stable. This is straightforward:
$ sudo apt install build-essential cmake debhelper
$ apt source -t testing libgtest-dev
$ cd googletest-220.127.116.1190831
$ dpkg-buildpackage -us -uc
$ sudo dpkg -i googletest_18.104.22.16890831-1_amd64.deb libgtest-dev_22.214.171.12490831-1_amd64.deb
Thanks to Erik Smistad for this starting point (condensed from [Getting Started
with Google Test On
1. Install the packages
from the repository. This
will install the gtest source files to
. You'll still need to
compile the code and link the library files to be able to use them.
2. Compile the source files:
sudo cmake CMakeLists.txt
3. Copy/symlink the libraries to the library location of your choice (here,
, hence the
, but as long as it's in your library path,
it shouldn't matter where you stick it):
sudo cp *.a /usr/lib