×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Problem compiling: libgmock missing

  • Posts: 989
  • Thank you received: 161
Hi,

after months of inactivity I tried to update my server (Kubuntu 20.04LTS) to the latest version of indi. Indi compiled just fine but 3rdparty did not. It complains about a missing gmocklib. google-mock is installed as is googletest and libgtest-dev. However, I am unable to find google-mock-dev or libgmock-dev.

trifid@SA76R4:~/Astro/indi-3rdparty/build$ cmake -DCMAKE_INSTALL_PREFIX=/usr . ..
-- Found FFMPEG: /usr/lib/x86_64-linux-gnu/libavcodec.so;/usr/lib/x86_64-linux-gnu/libavdevice.so;/usr/lib/x86_64-linux-gnu/libavformat.
so;/usr/lib/x86_64-linux-gnu/libavutil.so;/usr/lib/x86_64-linux-gnu/libswscale.so, /usr/include/x86_64-linux-gnu
-- Since FFMPEG was found, INDI Webcam Driver can be built
-- Found libnova: /usr/lib/x86_64-linux-gnu/libnova.so
-- Could NOT find GMock (missing: GMOCK_LIBRARY)  
-- Building unit tests
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
 Could NOT find GMock (missing: GMOCK_LIBRARY)
Call Stack (most recent call first):
 /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
 cmake_modules/FindGMock.cmake:178 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
 indi-eqmod/test/CMakeLists.txt:3 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!

Apt search (mock-dev, gmock, etc.) doesn't come up with helpful results. Any suggestions as to what I should do? Thanks a lot!

Alfred

 
3 years 1 week ago #69917

Please Log in or Create an account to join the conversation.

  • Posts: 1009
  • Thank you received: 133
So this is the EQMOD driver yes?
This is only for building the unit test. For normal operation, gmock is not needed. I have neither gmock nor gtest installed, and it builds fine.
If I read the CMakeLists.txt right, that one isn't correct. It tries to find both GTest and GMock, but if GTest is found it wants to build the tests, even if GMock wasn't found.
For a quick solution you could edit CMakeLists.txt, line 146, and set INDI_BUILD_UNITTESTS to FALSE...

(in my case the packages would be called gmock and gtest, but that won't help you, as it's openSUSE....)
The following user(s) said Thank You: Alfred
3 years 1 week ago #69930

Please Log in or Create an account to join the conversation.

  • Posts: 989
  • Thank you received: 161
Yes, it is. I don't need it but I used to compile all 3rd party drivers. I probably won't do it from now on since it takes time and can bring trouble.Nice to realize this is one of very few instances where the trouble isn't due to user error on my side. Setting INDI_BUILD_UNITTESTS to FALSE as you suggested did fix the problem for me. Thanks a lot for your help!
True. Gmock, gtest and gtest-dev packages are installed. Only gmock-dev (or whatever the name of the developer package might be) for whatever reason is not available. So if I got this right a combination of a less-than perfect CMakeLists.txt file and the unavailability of the gmock-dev package did cause the problem here. Thanks again and CS!

Alfred
Last edit: 3 years 1 week ago by Alfred.
3 years 1 week ago #69939

Please Log in or Create an account to join the conversation.

Time to create page: 0.399 seconds