Bug#895713: FTBFS with googletest 1.8.0-7

Steve Robbins steve at sumost.ca
Sun Apr 15 16:19:37 BST 2018


severity 895713 normal
tags 895713 + patch
thanks

On Saturday, April 14, 2018 7:10:33 PM CDT you wrote:

> Debian's googletest package used to ship only sources, not a compiled
> libgtest.  The ros-catkin package has a build-dep on libgtest-dev.

I was mistaken on the second point; ros-catkin does NOT build-depend on 
libgtest-dev.  I got confused while rebuilding it on my development system 
with gtest installed.  This configuration does provoke the errors described.  
At present, however, ros-catkin rebuilds fine on a clean (pbuilder) 
environment.  So I'm downgrading this bug.

If, in future, you decide to enable tests, you will run into this bug.  It 
looks to me like the gtest and gtest_main libraries are already set by
"find_package(GTest QUIET)".  Removing the lines in catkin's gtest.cmake (see 
patch) fixes the build for me.


> Additionally, the flaw in gtest.cmake appears to be the cause of
> ros-rospack build failure tracked in Bug #895708 -- contrary to what
> was previously written in that bug -- as the ros-rospack build fails
> at the same lines in the installed version of gtest.cmake:
> 
>     -- Found gtest: gtests will be built
>     CMake Error at /usr/share/catkin/cmake/test/gtest.cmake:369
> (add_library): add_library cannot create imported target "gtest" because
> another target with the same name already exists.
>     Call Stack (most recent call first):
>       /usr/share/catkin/cmake/all.cmake:147 (include)
>       /usr/share/catkin/cmake/catkinConfig.cmake:20 (include)
>       CMakeLists.txt:4 (find_package)

This is again what I observed on my development system.  When built in a clean 
environment -- e.g. see [1] -- this error does not occur, although #895708 
does.  I'm not sure why.

[1] https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/ros-rospack.html

-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid-setting-library.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20180415/f1c3123b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20180415/f1c3123b/attachment-0001.sig>


More information about the debian-science-maintainers mailing list