← All tasks
cppgabime/spdlog #975Repaired task

Configuration with cmake failes in 1.3.1

envgap__gabime__spdlog-975

01 / FAILURE SIGNATURE

Captured in a clean container

Could not find a package configuration file provided by "benchmark" with

02 / ENVIRONMENT RECIPE

Base commit
a7148b718ea2fabb8387cb90aee9bf448da63e65
Manifest
CMakeLists.txt
Reproduce
cmake -S . -B build -DBUILD_TESTING=OFF && cmake --build build -j4
Run under trace
cmake --build build -j4
Reference environment fix used for admission
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf2d04f5..eaf9d802 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
     add_compile_options("-Wconversion")
     add_compile_options("-pedantic")
     add_compile_options("-Wfatal-errors")
-    
 endif()
 
 #---------------------------------------------------------------------------------------
@@ -47,11 +46,11 @@ add_library(spdlog::spdlog ALIAS spdlog)
 # Check if spdlog is being used directly or via add_subdirectory
 set(SPDLOG_MASTER_PROJECT OFF)
 if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
-  set(SPDLOG_MASTER_PROJECT ON)
+    set(SPDLOG_MASTER_PROJECT ON)
 endif()
 
 option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
-option(SPDLOG_BUILD_BENCH "Build benchmarks" ${SPDLOG_MASTER_PROJECT})
+option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)" OFF)
 option(SPDLOG_BUILD_TESTS "Build tests" ${SPDLOG_MASTER_PROJECT})
 option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF)

03 / ORIGINAL ISSUE TEXT

gabime/spdlog #975 · read the original issue
When running this:



`cd $(mktemp -d) && git clone https://github.com/gabime/spdlog.git && cd spdlog && git checkout v1.3.1 && mkdir build && cd build && cmake .. && make -j;`



I get this:



```

-- The CXX compiler identification is GNU 8.2.1

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Build type: Release

-- Looking for C++ include pthread.h

-- Looking for C++ include pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE  

CMake Error at bench/CMakeLists.txt:33 (find_package):

  Could not find a package configuration file provided by "benchmark" with

  any of the following names:



    benchmarkConfig.cmake

    benchmark-config.cmake



  Add the installation prefix of "benchmark" to CMAKE_PREFIX_PATH or set

  "benchmark_DIR" to a directory containing one of the above files.  If

  "benchmark" provides a separate development package or SDK, be sure it has

  been installed.





-- Configuring incomplete, errors occurred!

See also "/tmp/tmp.dnMfTPt6TI/spdlog/build/CMakeFiles/CMakeOutput.log".

See also "/tmp/tmp.dnMfTPt6TI/spdlog/build/CMakeFiles/CMakeError.log".

```



My cmake version is `3.13.2`.
Continue on GitHub ↗

04 / LABELS

Labels checked by running the task · needs human review

misspecificationunderspecification
Label rules and the text that matched
[
  {
    "category": "underspecification",
    "rule": "signature.missing_system_requirement",
    "source": "failure_signature",
    "excerpt": "Could not find a package configuration file provided by \"benchmark\" with"
  },
  {
    "category": "misspecification",
    "rule": "diff.changes_existing_manifest_line",
    "source": "manifest_diff:CMakeLists.txt",
    "excerpt": "-    \n-  set(SPDLOG_MASTER_PROJECT ON)\n-option(SPDLOG_BUILD_BENCH \"Build benchmarks\" ${SPDLOG_MASTER_PROJECT})\n+    set(SPDLOG_MASTER_PROJECT ON)\n+option(SPDLOG_BUILD_BENCH \"Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)\" OFF)"
  }
]

Mined from a merged pull request linked to the issue whose changed files are all environment files.

The base commit is the pull request's base, not the dated default-branch commit; the registry is pinned to the merge date so the pull request's own pins resolve.

Default commands from envgap default-recipe synthesizer v1; gold_files are the pull request's environment diff.

Preparation uses current registries. Historical package availability is not enforced here; execution metadata records this limitation separately from the oracle's date-bounding policy.