Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Unable to locate GTest/Gmock when running build.sh on unbunt 18.04 #62

Closed
libing64 opened this issue Sep 13, 2019 · 2 comments
Closed

Comments

@libing64
Copy link

libing64 commented Sep 13, 2019

I tried to build the code with TEST enabled.
./build.sh -te

Here is the error log:
`libing@libing:~/source/gnss/GPSTk$ ./build.sh -te
Run cmake -DBUILD_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python -DBUILD_EXT=ON -DTEST_SWITCH=ON -DADDRESS_SANITIZER=ON -DCMAKE_CXX_FLAGS=-O3 /home/libing/source/gnss/GPSTk ##########################

cmake -DBUILD_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python -DBUILD_EXT=ON -DTEST_SWITCH=ON -DADDRESS_SANITIZER=ON -DCMAKE_CXX_FLAGS=-O3 /home/libing/source/gnss/GPSTk
CMake Warning at core/tests/ORD/CMakeLists.txt:42 (message):
Unable to locate GTest/GMock. Some tests cannot be run.

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindSWIG.cmake:63 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
swig/CMakeLists.txt:10 (find_package)

Error 1 :-(
See /home/libing/source/gnss/GPSTk/build/libing-master/Testing/Temporary/LastTest.log for detailed test log
See /home/libing/source/gnss/GPSTk/build/libing-master/build.log for detailed build log
`

@libing64
Copy link
Author

libing64 commented Sep 13, 2019

The latest google-mock has been installed.
xxx@xxx:~$ sudo apt-get install google-mock Reading package lists... Done Building dependency tree Reading state information... Done google-mock is already the newest version (1.8.0-6). google-mock set to manually installed. The following packages were automatically installed and are no longer required: comerr-dev krb5-multidev libcapnp-0.5.3 libclang1-3.6 libfcitx-qt0 libgssrpc4 libhardware2 libhybris libhybris-common1 libjasper-dev libjs-excanvas libkadm5clnt-mit11 libkadm5clnt-mit9 libkadm5srv-mit11 libkdb5-9 libllvm3.6v5 libmedia1 libmirclient-dev libmircommon-dev libmircookie-dev libmircookie2 libmircore-dev libobjc-5-dev libopencc1 libqbscore1 libqbsqtprofilesetup1 libqt5clucene5 libqtwebkit4 libraptor1 libruby2.3 libsodium18 libsox2 libwebpdemux1 libxkbcommon-dev prosper python-ecdsa python-gpgme qml-module-qtwebkit ruby2.3 texlive-generic-recommended unixodbc x11proto-dri2-dev x11proto-gl-dev xserver-xorg-input-evdev-hwe-16.04 xserver-xorg-input-synaptics-hwe-16.04 xserver-xorg-legacy-hwe-16.04 xserver-xorg-video-amdgpu-hwe-16.04 xserver-xorg-video-qxl-hwe-16.04 xserver-xorg-video-vesa-hwe-16.04 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.

@libing64
Copy link
Author

This issue has been solved by reinstalling gtest and gmock.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant