After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750602 - 'make check' gives '/usr/bin/ld: cannot find -lgtest'
'make check' gives '/usr/bin/ld: cannot find -lgtest'
Status: RESOLVED FIXED
Product: gstreamermm
Classification: Bindings
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: gstreamermm-maint
gstreamermm-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-08 22:20 UTC by Michał Wróbel
Modified: 2015-07-31 11:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michał Wróbel 2015-06-08 22:20:26 UTC
According to Google Test FAQ [1], linking with pre-compiled gtest is no longer recommended. Autoconf script bundled with gtest [2] is considered deprecated and thus system package maintainers use it as an excuse to make it unusable (at least Ubuntu 14.04 does so - they don't provide a proper gtest-config file).

We need to either:
1. search the system for gtest sources (e.g. Ubuntu 14.04 has them in /usr/src/gtest, given libgtest-dev package is installed),
2. bundle gtest sources with gstreamermm,
3. download gtest sources as a tarball and unpack it while building,
4. provide them as a git submodule or
5. fix the Google Test packages in distros :-).

[1] https://code.google.com/p/googletest/wiki/V1_7_FAQ#Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog
[2] https://code.google.com/p/googletest/source/browse/trunk/m4/gtest.m4
[3] https://bugs.launchpad.net/ubuntu/+source/gtest/+bug/877424/comments/4
Comment 1 Marcin Kolny (IRC: loganek) 2015-06-29 14:01:21 UTC
(In reply to Michał Wróbel from comment #0)
> According to Google Test FAQ [1], linking with pre-compiled gtest is no
> longer recommended. Autoconf script bundled with gtest [2] is considered
> deprecated and thus system package maintainers use it as an excuse to make
> it unusable (at least Ubuntu 14.04 does so - they don't provide a proper
> gtest-config file).
> 
> We need to either:
> 1. search the system for gtest sources (e.g. Ubuntu 14.04 has them in
> /usr/src/gtest, given libgtest-dev package is installed),
Is there any generic method for searching sources in the other distros? Moreover, it could be a problem, if we wanted to compile and run tests e.g. on Windows (in the future). 
> 2. bundle gtest sources with gstreamermm,
Merging gtest with gstreamermm on newer gtest's versions is IHMO unnecessary, if we can just download it from somewhere else.
> 3. download gtest sources as a tarball and unpack it while building,
That's imo the best solution
> 4. provide them as a git submodule or
I can't find official git repository. Have you found one?
> 5. fix the Google Test packages in distros :-).
Comment 2 Marcin Kolny (IRC: loganek) 2015-07-31 11:47:21 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release.