Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

All non-`CMakePresets.json` builds broken

オープン
#188 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cmake, cpp
領域
build-system

調査の方向性

CMakeLists.txt の 61 行目付近にある find_package 呼び出しから始め、infra/cmake/beman-install-library-config.cmake を調べます。README に記載された cmake -B .build -S . コマンドで失敗を再現し、その後、外部で設定された CMAKE_PREFIX_PATH に依存せずに、プリセットを使用しないビルドフローが正常に configure できることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Overview

This project's CMakeLists.txt unconditionally requires beman-install-library to be resolvable via find_package, but does not guarantee its own ./infra/cmake/beman-install-library-config.cmake file is resolvable.

https://github.com/bemanproject/optional/blob/4e2a09453fb83bef329f6cf88c2877cdb33a9765/CMakeLists.txt#L61

Nothing in the CMakeLists.txt file takes steps to check/provide this before hard-erroring, and all README-described build steps are broken (except for the preset builds, see below).

Broken Build Output
[pszenher ~/src/optional]$ cmake -B .build -S . -DOPTIONAL_ENABLE_TESTING=OFF
-- The CXX compiler identification is GNU 15.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:61 (find_package):
  By not providing "Findbeman-install-library.cmake" in CMAKE_MODULE_PATH
  this project has asked CMake to find a package configuration file provided
  by "beman-install-library", but CMake did not find one.

  Could not find a package configuration file provided by
  "beman-install-library" with any of the following names:

    beman-install-libraryConfig.cmake
    beman-install-library-config.cmake

  Add the installation prefix of "beman-install-library" to CMAKE_PREFIX_PATH
  or set "beman-install-library_DIR" to a directory containing one of the
  above files.  If "beman-install-library" provides a separate development
  package or SDK, be sure it has been installed.
Details

I had originally drafted up an issue about incompatibility of this package being fetched/built via CMake FetchContent, but realized midway through that the primary build instructions are broken.

There are only three currently working build-flows:

  1. Setting -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=.infra/cmake/use-fetch-content.cmake at configure-time
    • note that this is not the readme-recommended cmake/use-fetch-content.cmake from the top-level cmake dir; build using the readme-suggested CMAKE_PROJECT_TOP_LEVEL_INCLUDES file are broken
  2. Any of the CMake preset builds, which use the infra toolchain files, each of which call list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}")
    • note that these would work without the toolchain cmake files, as the _root-config base preset also sets CMAKE_PROJECT_TOP_LEVEL_INCLUDES to ./infra/cmake/use-fetch-content.cmake, reducing to the same case as above
  3. Building on a system/in a context where beman-install-library is resolvable from CMAKE_PREFIX_PATH

It appears that all of the CI workflows explicitly inject "./infra/cmake" into CMAKE_PREFIX_PATH via the strategy matrix, which is why CI flows remain green.

Recommendation

This project's top-level CMakeLists.txt file should likely change:
https://github.com/bemanproject/optional/blob/4e2a09453fb83bef329f6cf88c2877cdb33a9765/CMakeLists.txt#L61

to:

find_package(
    beman-install-library REQUIRED
    HINTS "${CMAKE_CURRENT_LIST_DIR}/infra/cmake"
)
主要言語
C++
スター
49
フォーク
25
平均マージ
4日 16時間
マージ済み PR(30日)
7

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bemanproject/optional のほかの issue

bemanproject/optional の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。