Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Tests are broken in 1.5.1: googletest-1.10.0 is installed but it doesn't find it #979

Open
yurivict opened this issue Jun 10, 2020 · 5 comments

Comments

@yurivict
Copy link

No description provided.

@dmah42
Copy link
Member

dmah42 commented May 8, 2021

can't really do a lot with this without logs attached.

@dmah42 dmah42 closed this as completed May 8, 2021
@yurivict
Copy link
Author

yurivict commented Jun 1, 2021

Tests fail:

$ make test
===>  Testing for benchmark-1.5.4
-- git version: v0.0.0-dirty normalized to 0.0.0
-- Version: 1.5.4
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Looking for Google Test sources
-- Looking for Google Test sources in /usr/local
CMake Error at CMakeLists.txt:34 (message):
  Did not find Google Test sources! Either pass correct path in
  GOOGLETEST_PATH, or enable BENCHMARK_DOWNLOAD_DEPENDENCIES, or disable
  BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.


CMake Error at /usr/local/share/cmake/Modules/ExternalProject.cmake:1803 (get_property):
  get_property could not find TARGET googletest.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  CMakeLists.txt:54 (ExternalProject_Get_Property)


CMake Error at /usr/local/share/cmake/Modules/ExternalProject.cmake:1805 (message):
  External project "googletest" has no SOURCE_DIR
Call Stack (most recent call first):
  CMakeLists.txt:54 (ExternalProject_Get_Property)


-- Configuring incomplete, errors occurred!
See also "/disk-samsung/freebsd-ports/devel/benchmark/work/.build/third_party/googletest/CMakeFiles/CMakeOutput.log".
CMake Error at cmake/GoogleTest.cmake:13 (message):
  CMake step for googletest failed: 1
Call Stack (most recent call first):
  CMakeLists.txt:310 (include)


-- Configuring incomplete, errors occurred!
See also "/disk-samsung/freebsd-ports/devel/benchmark/work/.build/CMakeFiles/CMakeOutput.log".
See also "/disk-samsung/freebsd-ports/devel/benchmark/work/.build/CMakeFiles/CMakeError.log".
*** Error code 1

googletest is has these files installed, but benchmark doesn't find it:

$ pkg info -l googletest
googletest-1.10.0_1:
	/usr/local/include/gmock/gmock-actions.h
	/usr/local/include/gmock/gmock-cardinalities.h
	/usr/local/include/gmock/gmock-function-mocker.h
	/usr/local/include/gmock/gmock-generated-actions.h
	/usr/local/include/gmock/gmock-generated-function-mockers.h
	/usr/local/include/gmock/gmock-generated-matchers.h
	/usr/local/include/gmock/gmock-matchers.h
	/usr/local/include/gmock/gmock-more-actions.h
	/usr/local/include/gmock/gmock-more-matchers.h
	/usr/local/include/gmock/gmock-nice-strict.h
	/usr/local/include/gmock/gmock-spec-builders.h
	/usr/local/include/gmock/gmock.h
	/usr/local/include/gmock/internal/custom/README.md
	/usr/local/include/gmock/internal/custom/gmock-generated-actions.h
	/usr/local/include/gmock/internal/custom/gmock-matchers.h
	/usr/local/include/gmock/internal/custom/gmock-port.h
	/usr/local/include/gmock/internal/gmock-internal-utils.h
	/usr/local/include/gmock/internal/gmock-port.h
	/usr/local/include/gmock/internal/gmock-pp.h
	/usr/local/include/gtest/gtest-death-test.h
	/usr/local/include/gtest/gtest-matchers.h
	/usr/local/include/gtest/gtest-message.h
	/usr/local/include/gtest/gtest-param-test.h
	/usr/local/include/gtest/gtest-printers.h
	/usr/local/include/gtest/gtest-spi.h
	/usr/local/include/gtest/gtest-test-part.h
	/usr/local/include/gtest/gtest-typed-test.h
	/usr/local/include/gtest/gtest.h
	/usr/local/include/gtest/gtest_pred_impl.h
	/usr/local/include/gtest/gtest_prod.h
	/usr/local/include/gtest/internal/custom/README.md
	/usr/local/include/gtest/internal/custom/gtest-port.h
	/usr/local/include/gtest/internal/custom/gtest-printers.h
	/usr/local/include/gtest/internal/custom/gtest.h
	/usr/local/include/gtest/internal/gtest-death-test-internal.h
	/usr/local/include/gtest/internal/gtest-filepath.h
	/usr/local/include/gtest/internal/gtest-internal.h
	/usr/local/include/gtest/internal/gtest-param-util.h
	/usr/local/include/gtest/internal/gtest-port-arch.h
	/usr/local/include/gtest/internal/gtest-port.h
	/usr/local/include/gtest/internal/gtest-string.h
	/usr/local/include/gtest/internal/gtest-type-util.h
	/usr/local/lib/cmake/GTest/GTestConfig.cmake
	/usr/local/lib/cmake/GTest/GTestConfigVersion.cmake
	/usr/local/lib/cmake/GTest/GTestTargets-release.cmake
	/usr/local/lib/cmake/GTest/GTestTargets.cmake
	/usr/local/lib/libgmock.so
	/usr/local/lib/libgmock_main.so
	/usr/local/lib/libgtest.so
	/usr/local/lib/libgtest_main.so
	/usr/local/libdata/pkgconfig/gmock.pc
	/usr/local/libdata/pkgconfig/gmock_main.pc
	/usr/local/libdata/pkgconfig/gtest.pc
	/usr/local/libdata/pkgconfig/gtest_main.pc
	/usr/local/share/licenses/googletest-1.10.0_1/BSD3CLAUSE
	/usr/local/share/licenses/googletest-1.10.0_1/LICENSE
	/usr/local/share/licenses/googletest-1.10.0_1/catalog.mk

@dmah42 dmah42 reopened this Jun 1, 2021
@dmah42
Copy link
Member

dmah42 commented Jun 1, 2021

per the output, can you pass the correct path in GOOGLETEST_PATH ? It's set here to a default that doesn't match your system:

set(GOOGLETEST_PATH "/usr/src/googletest" CACHE PATH

@yurivict
Copy link
Author

yurivict commented Jun 1, 2021

per the output, can you pass the correct path in GOOGLETEST_PATH ? It's set here to a default that doesn't match your system:

benchmark/cmake/GoogleTest.cmake.in is incorrect. It looks for the source tree while you need built and installed version. Googletest provides cmake files, see the list above. You just need to use them.

@dmah42
Copy link
Member

dmah42 commented Jun 2, 2021

Patches welcome.

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

No branches or pull requests

2 participants