FS#63793 - [gmock] package does not include all expected files

Attached to Project: Community Packages
Opened by John Henderson (jwhendy) - Monday, 16 September 2019, 17:35 GMT
Last edited by Levente Polyak (anthraxx) - Sunday, 24 May 2020, 18:41 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: I recently tried to build ros-melodic-realtime-tools, getting build errors with gmock not being found. There are some other reports of this, and I filed github issues in the following places:
- catkin, which is responsible for finding gmock and gtest: https://github.com/ros/catkin/issues/1030
- the ROS package failing to build: https://github.com/ros/catkin/issues/1030

Another user on Debian ran into this and a patch was able to correct the issue, but it didn't work for me.
- proposed patch to catkin: https://github.com/ros/catkin/pull/1022

Note his comment here, which shows a much different /usr/src/gmock structure than what arch has after package installation:
- https://github.com/ros/catkin/issues/1030#issuecomment-531868346

Here's what we have in /usr/src/gmock:

$ ls /usr/src/gmock/
gmock-all.cc gmock-cardinalities.cc gmock.cc gmock-internal-utils.cc gmock_main.cc gmock-matchers.cc gmock-spec-builders.cc

After building this, however, I think we have what we need, it's just not being packaged:

$ pwd
/home/jwhendy/installed/build/gmock/src/googletest-release-1.8.1

$ ls googlemock/
autom4te.cache cmake fused-src make scripts test CHANGES config.log configure CONTRIBUTORS LICENSE Makefile.am README.md
build-aux docs include msvc src aclocal.m4 CMakeLists.txt config.status configure.ac libtool Makefile Makefile.in

Lastly, I might also suggest referring to the patch at catkin #1022 linked above. Note the directory names... they use the default googlemock and googletest directories throughout, whereas arch is renaming them to gmock and gtest. I don't have a ton of packaging experience either, but if there is an opportunity to standardize to what's expected/recommended upstream, it would help when patches come out. As-is, think we'd have to change all their dir structures in the patch to match ours.

So far the only way I know to reproduce is to try and build realtime_tools from upstream with arch's gmock 1.8.1 installed. I'm happy to serve as the test subject, though, as I have all required ROS deps already built.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Sunday, 24 May 2020, 18:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.10.0-1
Comment by John Henderson (jwhendy) - Monday, 16 September 2019, 17:58 GMT
Quick update: I tried replicating the /usr/src/{gmock,gtest} structures shown by the Debian user. I was not able to get realtime_tools to build either with or without the #1022 fix. My directories after manual copying:

$ ls /usr/src/gmock/
build-aux make src aclocal.m4 configure gmock-all.cc gmock.cc gmock_main.cc gmock-spec-builders.cc
cmake scripts test CMakeLists.txt configure.ac gmock-cardinalities.cc gmock-internal-utils.cc gmock-matchers.cc Makefile.in

$ ls /usr/src/gtest
build-aux cmake m4 make scripts src test aclocal.m4 CMakeLists.txt configure configure.ac Makefile.am Makefile.in

So, maybe this isn't the ultimate issue, but I think the difference in dir structures might still warrant verification on if this is what should be there.
Comment by John Henderson (jwhendy) - Monday, 21 October 2019, 23:46 GMT
New recommendation after troubleshooting an issue here:
- https://github.com/ros/catkin/issues/1030

I think gtest and gmock are not standardized.

$ ls -R /usr/src/gtest/
/usr/src/gtest/:
cmake src CMakeLists.txt

/usr/src/gtest/cmake:
Config.cmake.in gtest_main.pc.in gtest.pc.in internal_utils.cmake

/usr/src/gtest/src:
gtest-all.cc gtest-filepath.cc gtest-port.cc gtest-typed-test.cc
gtest.cc gtest-internal-inl.h gtest-printers.cc
gtest-death-test.cc gtest_main.cc gtest-test-part.cc

$ ls -R /usr/src/gmock/
/usr/src/gmock/:
src gmock-cardinalities.cc gmock_main.cc
CMakeLists.txt gmock.cc gmock-matchers.cc
gmock-all.cc gmock-internal-utils.cc gmock-spec-builders.cc

Unless some package expects /usr/src/gmock/*.cc, I would propose standardizing to /usr/src/gmock/src, as that's where gtest *.cc files live, and that's where things get checked at my bug above. Alternatively, could someone explain why one is nested in another src/ dir for gtest, but not gmock?
Comment by John Henderson (jwhendy) - Wednesday, 08 January 2020, 19:07 GMT
~4mos have elapsed. Any input on this? Is this package actively maintained?
Comment by Akash Patel (acxz) - Sunday, 16 February 2020, 18:06 GMT
I am also running into this issue. Is there any progress on this @felixonmars @anthraxx?

Loading...