google / google/googletest

CMake error on installing include/gtest directory

Open
#3,201 2 comments 0 reactions 1 assignee Claimed by @derekmauro View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

I'm building gtest as an external project inside a cmake project. Usually there are no issues, but recently I've started running into a strange error on GitHub Actions' macOS machines. Does this error make sense to anyone? I'm stumped:
```
2020-12-30T21:22:44.3533600Z [0/1] Install the project...
2020-12-30T21:22:44.3634950Z -- Install configuration: ""
2020-12-30T21:22:44.3736180Z -- Installing: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/lib/cmake/GTest/GTestTargets.cmake
2020-12-30T21:22:44.3837190Z -- Installing: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/lib/cmake/GTest/GTestTargets-noconfig.cmake
2020-12-30T21:22:44.3937800Z -- Installing: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/lib/cmake/GTest/GTestConfigVersion.cmake
2020-12-30T21:22:44.4038810Z -- Installing: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/lib/cmake/GTest/GTestConfig.cmake
2020-12-30T21:22:44.4139660Z -- Up-to-date: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/include
2020-12-30T21:22:44.4240200Z -- Installing: /Users/runner/work/M2/M2/M2/BUILD/build/usr-host/include/gtest
2020-12-30T21:22:44.4341250Z CMake Error at googletest/cmake_install.cmake:67 (file):
2020-12-30T21:22:44.4441910Z file INSTALL cannot make directory
2020-12-30T21:22:44.4543570Z "/Users/runner/work/M2/M2/M2/BUILD/build/usr-host/include/gtest": No such
2020-12-30T21:22:44.4644110Z file or directory.
2020-12-30T21:22:44.4745530Z Call Stack (most recent call first):
2020-12-30T21:22:44.4845600Z cmake_install.cmake:42 (include)
2020-12-30T21:22:44.4946790Z
2020-12-30T21:22:44.5047230Z
2020-12-30T21:22:44.5148830Z FAILED: CMakeFiles/install.util
2020-12-30T21:22:44.5251690Z cd /Users/runner/work/M2/M2/M2/BUILD/build/libraries/googletest/build && /usr/local/Cellar/cmake/3.19.1/bin/cmake -P cmake_install.cmake
2020-12-30T21:22:44.5351070Z ninja: build stopped: subcommand failed.
```
Here is the code for the external project:
https://github.com/Macaulay2/M2/blob/67e9aae6beee30c90001d5cb2b452b43f7205346/M2/cmake/build-libraries.cmake#L675-L684
Here is the log from the configuration step:
```
2020-12-30T21:22:10.6989490Z [39/64] Creating directories for 'build-googletest'
2020-12-30T21:22:10.7089660Z [40/64] No download step for 'build-googletest'
2020-12-30T21:22:10.7190470Z [41/64] No update step for 'build-googletest'
2020-12-30T21:22:10.7291790Z [42/64] No patch step for 'build-googletest'
2020-12-30T21:22:13.4973800Z [43/64] Performing configure step for 'build-googletest'
2020-12-30T21:22:13.5078630Z CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
2020-12-30T21:22:13.5180700Z Compatibility with CMake < 2.8.12 will be removed from a future version of
2020-12-30T21:22:13.5281070Z CMake.
2020-12-30T21:22:13.5398470Z
2020-12-30T21:22:13.5506490Z Update the VERSION argument value or use a ... suffix to tell
2020-12-30T21:22:13.5623790Z CMake that the project does not need compatibility with older versions.
2020-12-30T21:22:13.5726500Z
2020-12-30T21:22:13.5830900Z
2020-12-30T21:22:13.5941020Z -- The C compiler identification is AppleClang 12.0.0.12000032
2020-12-30T21:22:13.6043520Z -- The CXX compiler identification is AppleClang 12.0.0.12000032
2020-12-30T21:22:13.6143620Z -- Detecting C compiler ABI info
2020-12-30T21:22:13.6247320Z -- Detecting C compiler ABI info - done
2020-12-30T21:22:13.6348190Z -- Check for working C compiler: /usr/local/opt/ccache/libexec/cc - skipped
2020-12-30T21:22:13.6450740Z -- Detecting C compile features
2020-12-30T21:22:13.6551370Z -- Detecting C compile features - done
2020-12-30T21:22:13.6653440Z -- Detecting CXX compiler ABI info
2020-12-30T21:22:13.6754160Z -- Detecting CXX compiler ABI info - done
2020-12-30T21:22:13.6856410Z -- Check for working CXX compiler: /usr/local/opt/ccache/libexec/c++ - skipped
2020-12-30T21:22:13.6857980Z -- Detecting CXX compile features
2020-12-30T21:22:13.6959300Z -- Detecting CXX compile features - done
2020-12-30T21:22:13.7059970Z CMake Deprecation Warning at googletest/CMakeLists.txt:56 (cmake_minimum_required):
2020-12-30T21:22:13.7161160Z Compatibility with CMake < 2.8.12 will be removed from a future version of
2020-12-30T21:22:13.7261760Z CMake.
2020-12-30T21:22:13.7363030Z
2020-12-30T21:22:13.7464490Z Update the VERSION argument value or use a ... suffix to tell
2020-12-30T21:22:13.7563890Z CMake that the project does not need compatibility with older versions.
2020-12-30T21:22:13.7665010Z
2020-12-30T21:22:13.7766130Z
2020-12-30T21:22:13.7867710Z -- Found PythonInterp: /usr/local/bin/python (found version "2.7.18")
2020-12-30T21:22:13.7967820Z -- Looking for pthread.h
2020-12-30T21:22:13.8069270Z -- Looking for pthread.h - found
2020-12-30T21:22:13.8170380Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
2020-12-30T21:22:13.8271950Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
2020-12-30T21:22:13.8371930Z -- Found Threads: TRUE
2020-12-30T21:22:13.8472140Z -- Configuring done
2020-12-30T21:22:13.8573790Z -- Generating done
2020-12-30T21:22:13.8674730Z -- Build files have been written to: /Users/runner/work/M2/M2/M2/BUILD/build/libraries/googletest/build
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.