Your message dated Mon, 26 Oct 2020 23:55:06 -0500
with message-id <21971994.1R0VfRu9AM@riemann>
and subject line Re: Bug#972627: Minimal reproducible example
has caused the Debian Bug report #972627,
regarding Upgrade to 1.10.0.20201018-1 leads to undefined references to 
testing::Matcher<std::string_view>::Matcher(std::string_view)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
972627: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972627
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: googletest
Version: 1.10.0.20201018-1
Severity: important

After installing the new snapshot version (#970943 points to the new upstream
release scheme), linking my tests fails with a lot of

```
undefined reference to `testing::Matcher<std::basic_string_view<char, 
std::char_traits<char> > >::Matcher(std::basic_string_view<char, 
std::char_traits<char> >)'
```

Downgrading googletest, libgmock-dev, and libgtest-dev to 1.10.0-3 fixes the
problem and makes my tests build successfully.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.8.0-3-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

--- End Message ---
--- Begin Message ---
On Sun, 25 Oct 2020 18:28:36 -0500 Steven Robbins <[email protected]> wrote:

> > Building with `g++ -std=c++20 test.cpp -lgmock_main -lgmock -lgtest
> > -pthread` and version 1.10.0.20201018-1 leads to:

Upstream confirms [1] that one needs to build gtest with at least C++17 to get 
the C++17 related matchers/printers.  The library, however, is built with 
default gcc, which is not yet C++17.

You should always build everything with the same compiler options, so build 
the library yourself as I indicated below.  There is also CMake support for 
this; see /usr/src/googletest/CMakeLists.txt.

> Yes, confirmed.  I'm not sure yet why there is a difference.  However, I can 
> offer a workaround: compile googletest and googlemock yourself.  It's a one-
> liner:
> 
> g++ -std=c++20 test.cpp -I /usr/src/googletest/googletest -I /usr/src/
> googletest/googlemock /usr/src/googletest/googlemock/src/gmock_main.cc /usr/
> src/googletest/googlemock/src/gmock-all.cc /usr/src/googletest/googletest/
src/
> gtest-all.cc -pthread

Regards,
-Steve

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply via email to