Hello, I am trying to build on Ubuntu 14.04 and I get the following error after running "cmake .." from the bin folder. I have google-mock installed.
$ git show
commit 5ec9dcdcb7e3700f0d6b620a932e4d272fa519cf
..
Building Clementine version: 1.2.3-810-g5ec9dcd
The following components will be built:
Box support
D-Bus support
Devices: Audio CD support
Devices: DeviceKit backend
Devices: GIO device backend
Devices: MTP support
Devices: iPod classic support
Dropbox support
Google Drive support
Last.fm support
Moodbar support
Pulse audio integration
Seafile support
Skydrive support
Visualisations
Vk.com support
Wiimote support
The following components WILL NOT be built:
Crash reporting (disabled in CMake config)
Gnome sound menu integration (missing indicate-qt)
Sparkle integration (missing Mac OS X, Sparkle)
Spotify support: non-GPL binary helper (missing libspotify)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMOCK_LIBRARIES
linked by target "asxiniparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "asxparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "closure_test" in directory /home/ieee8023/Clementine/tests
linked by target "concurrentrun_test" in directory /home/ieee8023/Clementine/tests
linked by target "fmpsparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "mergedproxymodel_test" in directory /home/ieee8023/Clementine/tests
linked by target "musicbrainzclient_test" in directory /home/ieee8023/Clementine/tests
linked by target "organisedialog_test" in directory /home/ieee8023/Clementine/tests
linked by target "organiseformat_test" in directory /home/ieee8023/Clementine/tests
linked by target "scopedtransaction_test" in directory /home/ieee8023/Clementine/tests
linked by target "song_test" in directory /home/ieee8023/Clementine/tests
linked by target "songplaylistitem_test" in directory /home/ieee8023/Clementine/tests
linked by target "sqlite_test" in directory /home/ieee8023/Clementine/tests
linked by target "test_utils" in directory /home/ieee8023/Clementine/tests
linked by target "translations_test" in directory /home/ieee8023/Clementine/tests
linked by target "utilities_test" in directory /home/ieee8023/Clementine/tests
linked by target "zeroconf_test" in directory /home/ieee8023/Clementine/tests
GTEST_LIBRARIES
linked by target "asxiniparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "asxparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "closure_test" in directory /home/ieee8023/Clementine/tests
linked by target "concurrentrun_test" in directory /home/ieee8023/Clementine/tests
linked by target "fmpsparser_test" in directory /home/ieee8023/Clementine/tests
linked by target "mergedproxymodel_test" in directory /home/ieee8023/Clementine/tests
linked by target "musicbrainzclient_test" in directory /home/ieee8023/Clementine/tests
linked by target "organisedialog_test" in directory /home/ieee8023/Clementine/tests
linked by target "organiseformat_test" in directory /home/ieee8023/Clementine/tests
linked by target "scopedtransaction_test" in directory /home/ieee8023/Clementine/tests
linked by target "song_test" in directory /home/ieee8023/Clementine/tests
linked by target "songplaylistitem_test" in directory /home/ieee8023/Clementine/tests
linked by target "sqlite_test" in directory /home/ieee8023/Clementine/tests
linked by target "test_utils" in directory /home/ieee8023/Clementine/tests
linked by target "translations_test" in directory /home/ieee8023/Clementine/tests
linked by target "utilities_test" in directory /home/ieee8023/Clementine/tests
linked by target "zeroconf_test" in directory /home/ieee8023/Clementine/tests
-- Configuring incomplete, errors occurred!
See also "/home/ieee8023/Clementine/bin/CMakeFiles/CMakeOutput.log".
See also "/home/ieee8023/Clementine/bin/CMakeFiles/CMakeError.log".
The issue seems to be with making/running the tests. If you just wanna build it just to run it and just believe that the tests will pass, you can comment out the line that includes the tests
directory
from CMakeLists.txt change
add_subdirectory(tests)
to
#add_subdirectory(tests)
and it should work.
If you're making changes to the source, please ignore this and make sure your build passes the tests
Commenting out the tests hardly seems like the right answer. Is there a better way to make cmake find the gmock stuff?
Despite the fact that this issue is very old and only has a few comments, I'm encountering the same issue on Ubuntu 18.04. I've installed all of the prerequisites listed on the "Compiling from Source" page, and it compiles just fine if I comment out the tests, but I sure would like to be able to run them.
Apparently the reason for this is that versions of Ubuntu prior to 18.10 did not include the libraries for gmock and gest, only the source code. You are expected to build the libraries yourself. See this for some more information:
https://askubuntu.com/questions/219516/howto-install-google-mock-on-ubuntu-12-10
To build & install the libraries manually, do something like this:
sudo -i
cd /usr/src/googletest/googletest
mkdir build
cd build
cmake ..
make -j4
cp *.a /usr/lib/
cd /usr/src/googletest/googlemock
mkdir build
cd build
cmake ..
make -j4
cp *.a /usr/lib/
With the libraries build from googletest and googlemock in your /usr/lib/ directory, you should now be able to build Clementine's tests.