Repository navigation
Support Boost 1.89 or later, maintain the CMake build, and add the CI - #119
Merged
Merged
Conversation
Boost 対応の見直しと CMake ビルドの整備の計画書を追加し、Phase 0(準備)を行った。 - 計画書 docs/plan/2026-11-21_boost-cmake-maintenance.md を追加。未決事項を ユーザと決めて決定事項にした。CMake の既定のインストール先を ~/.local に 変えること、Boost の最低バージョンを 1.70 に上げることを加えた。公開ヘッダは Boost を読み込むだけで使っていないため、Phase 5 を Phase 1 に統合した - 新機能・主要な変更点をまとめるリリースノート RELEASE_NOTES.md を追加 - CLAUDE.md を .gitignore に追加 Add the plan for revising the Boost support and maintaining the CMake build, and carry out Phase 0 (preparation). - Add the plan docs/plan/2026-11-21_boost-cmake-maintenance.md. The open issues are decided with the user. Changing the default installation directory of the CMake build to ~/.local and raising the minimum Boost version to 1.70 are added. Phase 5 is merged into Phase 1, since the public headers include the Boost headers without using them - Add the release notes RELEASE_NOTES.md to summarize new features and major changes - Add CLAUDE.md to .gitignore
Boost.System のライブラリへの依存を除き、Boost はヘッダだけを使うようにした
(Boost 1.89 以降への対応)。Boost の最低バージョンを 1.70 にした。
- Autotools: AX_BOOST_SYSTEM と BOOST_LDFLAGS、src/Makefile.am の
$(BOOST_SYSTEM_LIB)、m4/ax_boost_system.m4 を削除し、AX_BOOST_BASE を
1.70.0 にした
- CMake: find_package(Boost 1.70 CONFIG REQUIRED) で探し、Boost を使う
rcsc_clang・rcsc_formation・rcsc_param だけを Boost::headers にリンクした。
ほかの ${Boost_INCLUDE_DIRS} と Boost::system へのリンクを削除した
- 公開ヘッダ4つから、使われていない Boost の読み込みを削除した。Boost の
ヘッダ経由で読み込まれていた標準ヘッダ(<memory>、<iterator>、<cassert>)を
使う所で読み込むようにした
- librcsc.spec.in: BuildRequires を boost-devel >= 1.70 にし、devel
パッケージの Requires から Boost を外した
- リリースノートと計画書(Phase 1 の記録、見つかった問題)を更新した
Remove the dependency on the Boost.System library and use Boost as
header-only (support for Boost 1.89 or later). The minimum required Boost
version is now 1.70.
- Autotools: remove AX_BOOST_SYSTEM, BOOST_LDFLAGS, $(BOOST_SYSTEM_LIB) in
src/Makefile.am, and m4/ax_boost_system.m4, and require Boost 1.70.0 with
AX_BOOST_BASE
- CMake: find Boost with find_package(Boost 1.70 CONFIG REQUIRED), and link
Boost::headers only to rcsc_clang, rcsc_formation, and rcsc_param, which
use Boost. Remove the other ${Boost_INCLUDE_DIRS} and the links to
Boost::system
- Remove the unused Boost includes from four public headers. Include the
standard headers that were included through the Boost headers (<memory>,
<iterator>, <cassert>) where they are used
- librcsc.spec.in: require boost-devel >= 1.70 to build, and remove Boost
from the requirements of the devel package
- Update the release notes and the plan (the record of Phase 1 and the
problems found)
最小構成の CI(計画書の Phase 6a)を追加した。Phase 2 の前に行うことにした。 - .github/workflows/build.yml を追加。Ubuntu 24.04・26.04 × CMake・ Autotools の4ジョブで、ビルドとインストールを行い、Autotools では 単体テスト(make check)も行う。Ubuntu 22.04 は対象にしない - CMake: netinet/in.h の検査を追加し、ビルドの失敗を直した(Phase 2 から 前倒し) - Autotools: CppUnit を pkg-config で探すようにした(cppunit-config は CppUnit 1.13 で廃止されたため、今の Ubuntu では --enable-unit-test が 使えなかった)。m4/cppunit.m4 を削除した - コンパイルできなかった単体テスト2つ(test_rundom_convex_hull.cpp、 test_clang_parser.cpp)を直した - リリースノートの各項目に日付を付け、これらの変更を書いた - 計画書: CI の前倒し、Phase 6 の分割(6a・6b)、対象の Ubuntu (24.04・26.04)、リリースノートの日付の書き方を決定事項に加え、 Phase 6a の記録を書いた Add the minimal CI (Phase 6a of the plan), which is done before Phase 2. - Add .github/workflows/build.yml. Four jobs (Ubuntu 24.04 and 26.04 x CMake and Autotools) build and install librcsc, and the Autotools jobs also run the unit tests (make check). Ubuntu 22.04 is not targeted - CMake: check netinet/in.h to fix the build error (moved from Phase 2) - Autotools: find CppUnit with pkg-config. cppunit-config was removed in CppUnit 1.13, so --enable-unit-test could not be used on the current Ubuntu. Remove m4/cppunit.m4 - Fix the two unit tests that could not be compiled (test_rundom_convex_hull.cpp and test_clang_parser.cpp) - Add the dates to the items of the release notes, and describe these changes - Plan: add the decisions (the CI before Phase 2, splitting Phase 6 into 6a and 6b, the target Ubuntu versions 24.04 and 26.04, and the dates in the release notes), and record Phase 6a
Ubuntu 26.04(GCC 15.2)の CI でビルドに失敗したため直した。 - <algorithm> の関数を使っているのに <algorithm> を直接読み込んでいない 26個のファイルに #include <algorithm> を加えた(GCC 15 の標準ライブラリ では、ほかのヘッダ経由で読み込まれなくなった) - 同梱の simdjson 3.8.0 に、GCC 15 でのエラーを直す本家と同じ修正を 当てた(base_formatter から派生クラスのメンバ関数を呼ぶ所) - CI の actions/checkout と actions/upload-artifact を v7 にした (v4 は非推奨の Node.js 20 を使うため) - リリースノートと計画書(1回目の CI の結果と修正)を更新した Fix the build errors on the CI of Ubuntu 26.04 (GCC 15.2). - Add #include <algorithm> to the 26 files that use the algorithms without including <algorithm> directly (it is no longer included through the other standard headers with GCC 15) - Patch the bundled simdjson 3.8.0 with the upstream fix for GCC 15 (the calls of the member functions of the derived class in base_formatter) - Update actions/checkout and actions/upload-artifact of the CI to v7 (v4 uses Node.js 20, which is deprecated) - Update the release notes and the plan (the results of the first CI run and the fixes)
CMake ビルドの不具合を直し、Autotools と同じファイルがインストールされる ようにした(計画書の Phase 2)。 - CMake: インストールされていなかった rcsc/player/world_state.h と rcsc/time/time_stamp.h をインストールするようにした - CMake: rcgvalidator をビルドし、rcg2csv と rcgvalidator をインストール するようにした。rclmtableprinter を正しいソース(tableprinter.cpp)から ビルドし、object_table_printer もビルドするようにした(インストールしない) - CMake: librcsc.so を zlib にリンクし、ツールの zlib へのリンクを削除した - Autotools: librcsc.so を C++ のリンカでリンクし、libstdc++ が依存関係に 記録されるようにした - configure.ac の AC_INIT を CMake と同じ 2026 にした - librcsc-config --libs の出力を -lrcsc -lz -lm に直した - src/Makefile.am の CXXFLAGS の名前の誤りを直した - ビルドされていない rcsc/action を obsolete/action へ移した - リリースノートと計画書(2回目の CI の結果、Phase 2 の決定事項と記録)を 更新した Fix the CMake build so that it installs the same files as the Autotools build (Phase 2 of the plan). - CMake: install rcsc/player/world_state.h and rcsc/time/time_stamp.h, which were not installed - CMake: build rcgvalidator, and install rcg2csv and rcgvalidator. Build rclmtableprinter from the right source (tableprinter.cpp), and also build object_table_printer (not installed) - CMake: link librcsc.so with zlib, and remove the links of the tools to zlib - Autotools: link librcsc.so with the C++ linker, so that libstdc++ is recorded as its dependency - Set the version in AC_INIT of configure.ac to 2026, the same as CMake - Fix the output of librcsc-config --libs to -lrcsc -lz -lm - Fix the wrong name of CXXFLAGS in src/Makefile.am - Move rcsc/action, which is not built, to obsolete/action - Update the release notes and the plan (the results of the second CI run, and the decisions and the record of Phase 2)
CMake ビルドを整備した(計画書の Phase 3)。 - cmake_minimum_required を 3.16 にし、古い書き方を整理した。librcsc の ビルドだけで使う設定(config.h、インクルード、警告オプション)を INTERFACE ターゲット rcsc_build_settings にまとめ、ユーザが指定した CMAKE_CXX_FLAGS を上書きしないようにした - 既定のインストール先を ~/local から ~/.local に変えた - CMake のパッケージ設定ファイル(librcscConfig.cmake など)を lib/cmake/librcsc にインストールし、find_package(librcsc CONFIG) と インポートターゲット librcsc::rcsc で使えるようにした(CMake のビルド だけ) - インストールしたツールに librcsc への相対パス(RPATH)を埋め込み、 LD_LIBRARY_PATH なしで動くようにした - uninstall ターゲットを加えた - インストール先をすべて GNUInstallDirs に従うようにした - リリースノートと計画書(Phase 2 の CI の結果、Phase 3 の決定事項と記録、 この計画の後に行う作業)を更新した Modernize the CMake build (Phase 3 of the plan). - Require CMake 3.16, and clean up the old settings. The settings used only to build librcsc (config.h, the include directories, and the warning options) are collected in the INTERFACE target rcsc_build_settings, and CMAKE_CXX_FLAGS given by the user is no longer overwritten - Change the default installation directory from ~/local to ~/.local - Install the CMake package configuration files (librcscConfig.cmake and others) in lib/cmake/librcsc, so that librcsc can be used by find_package(librcsc CONFIG) and the imported target librcsc::rcsc (CMake build only) - Embed the relative path to librcsc (RPATH) in the installed programs, so that they run without LD_LIBRARY_PATH - Add the uninstall target - Follow GNUInstallDirs for all the installation directories - Update the release notes and the plan (the results of the CI for Phase 2, the decisions and the record of Phase 3, and the work after this plan)
テストを整備した(計画書の Phase 4)。 - CMake: CppUnit の単体テスト(rcsc/geom、rcsc/clang)を CTest に登録した (Autotools の make check と同じプログラム。CppUnit は pkg-config で探し、 なければ単体テストだけを作らない) - CMake: インストールの検査を加えた(ビルドディレクトリへのインストール、 インストールされたヘッダの単独コンパイル、find_package(librcsc CONFIG) を使うプログラムのビルドと実行) - 単独でコンパイルできなかった rcsc/ann/bpn1.h と rcsc/geom/polygon_2d.h を直した - CMake: config.h をビルドディレクトリから先に探すようにした(ソース直下に Autotools の config.h があっても使わないように) - よく使う CMake のコマンドをまとめた cmake-helper.sh を加えた (configure、build、test、install、uninstall、check-headers、clean) - リリースノートと計画書(Phase 3 の CI の結果、Phase 4 の決定事項と記録) を更新した Add the tests (Phase 4 of the plan). - CMake: register the unit tests (CppUnit) in rcsc/geom and rcsc/clang to CTest, the same programs as make check of the Autotools build (CppUnit is found by pkg-config; without it, only the unit tests are not built) - CMake: add the tests of the installation (install into the build directory, compile each installed header file alone, and build and run a program using find_package(librcsc CONFIG)) - Fix rcsc/ann/bpn1.h and rcsc/geom/polygon_2d.h, which could not be compiled alone - CMake: search config.h in the build directory first (not to use config.h of the Autotools build in the source directory) - Add cmake-helper.sh, shortcuts for the frequently used CMake commands (configure, build, test, install, uninstall, check-headers, clean) - Update the release notes and the plan (the results of the CI for Phase 3, and the decisions and the record of Phase 4)
CI を拡充した(計画書の Phase 6b)。 - CMake のジョブ: cmake-helper.sh でビルド・テスト・インストールを行う。 CTest(単体テストとインストールの検査)を実行し、単体テストが登録されて いることと、uninstall でインストールしたファイルがすべて消えることを 確かめる - Autotools のジョブ: インストールしたヘッダの検査(cmake-helper.sh check-headers)と、配布物の検査(make distcheck、単体テストを含む)を 行う - CMake と Autotools でインストールされたファイルを比べるジョブを加えた (CMake の lib/cmake/librcsc/ と Autotools の .la を除く) - リリースノートと計画書(Phase 4 の CI の結果、Phase 6b の記録)を 更新した Extend the CI (Phase 6b of the plan). - CMake jobs: build, test, and install with cmake-helper.sh. Run CTest (the unit tests and the tests of the installation), and check that the unit tests are registered and that the uninstall removes all the installed files - Autotools jobs: check the installed header files (cmake-helper.sh check-headers) and the source tarball (make distcheck, with the unit tests) - Add a job that compares the files installed by CMake and Autotools (except lib/cmake/librcsc/ of CMake and .la of Autotools) - Update the release notes and the plan (the results of the CI for Phase 4, and the record of Phase 6b)
文書を現状に合わせた(計画書の Phase 7)。 - README.md: 主な手順として cmake-helper.sh だけを説明するように書き 直した(Ubuntu 24.04/26.04 向けの準備、build・install・test・ uninstall、既定のインストール先 ~/.local と ~/local からの移行、 ほかのプログラムからの使い方の要点) - docs/build.md: 詳しい内容を新しく書いた(cmake-helper.sh の全コマンド、 CMake のオプション、インストールとアンインストール、テスト、Autotools の ビルド、CMake・pkg-config・librcsc-config からの使い方、 LD_LIBRARY_PATH の注意、API の文書) - CMake: Doxyfile の HAVE_DOT を、dot が見つかれば YES にした - リリースノートと計画書(Phase 6b の CI の結果、文書の構成の決定、 Phase 7 の記録、まとめ)を更新した Update the documents (Phase 7 of the plan). - README.md: describe only cmake-helper.sh as the main way to build (the packages for Ubuntu 24.04 and 26.04, build, install, test, and uninstall, the default installation directory ~/.local and the migration from ~/local, and the outline of using librcsc) - docs/build.md: describe the details (all the commands of cmake-helper.sh, the options of CMake, the installation and the uninstall, the tests, the Autotools build, using librcsc with CMake, pkg-config, and librcsc-config, the note on LD_LIBRARY_PATH, and the API documents) - CMake: set HAVE_DOT of Doxyfile to YES if dot is found - Update the release notes and the plan (the results of the CI for Phase 6b, the decision on the documents, the record of Phase 7, and the summary)
インストールしたツールが LD_LIBRARY_PATH なしで動くこと(CMake は RPATH、Autotools は libtool が記録するライブラリの場所)を確かめる検査を 加えた。 - test/CheckInstalledTools.cmake: インストール先の各ツールを LD_LIBRARY_PATH なしで実行し、同じインストール先の librcsc を使うことを 確かめる - CTest に installed_tools を加え、cmake-helper.sh に check-tools を加えた (Autotools でインストールしたものにも使える)。CI の Autotools のジョブ でも確かめる - docs/build.md: システムの場所(/usr/local など)にインストールしたときは sudo ldconfig が必要なことと、libtool が記録する場所を書いた - リリースノートと計画書(Phase 7 の CI の結果、決定事項、記録)を更新した Add a check that the installed tools run without LD_LIBRARY_PATH (the library path recorded by RPATH of CMake and by libtool of Autotools). - test/CheckInstalledTools.cmake: run each installed tool without LD_LIBRARY_PATH, and check that it uses librcsc in the same installation - Add the installed_tools test to CTest and the check-tools command to cmake-helper.sh (also for librcsc installed by Autotools), and run the check in the Autotools jobs of the CI - docs/build.md: describe that sudo ldconfig is needed after installing librcsc into a system directory (e.g. /usr/local), and the library path recorded by libtool - Update the release notes and the plan (the results of the CI for Phase 7, the decision, and the record)
hidehisaakiyama
marked this pull request as ready for review
November 21, 2026 14:20
hidehisaakiyama
added a commit
that referenced
this pull request
Nov 23, 2026
計画書に、Phase 8(soccerwindow2 への反映)を soccerwindow2 の PR #98 で 行ったことを記録した(CI に Ubuntu 26.04 を戻して 22.04 を外したこと、 CI の CMake のジョブでの librcsc の CMake ビルド、librcscConfig.cmake を 使った検出と FindLibrcsc.cmake の予備、configure の探す順序、Boost への 依存の除去、find_package の HINTS についての分かったこと)。PR #119 の マージも記録し、ステータスを完了にした。 Record in the plan that Phase 8 (following the changes in soccerwindow2) was done in PR #98 of soccerwindow2: Ubuntu 26.04 added to and 22.04 removed from the CI, librcsc built by CMake in the CMake jobs, finding librcsc by librcscConfig.cmake with FindLibrcsc.cmake as the fallback, the search order of configure, removing the dependency on Boost, and the findings on HINTS of find_package. Also record the merge of PR #119, and mark the plan as completed.
hidehisaakiyama
added a commit
that referenced
this pull request
Nov 23, 2026
計画書に、Phase 8(soccerwindow2 への反映)を soccerwindow2 の PR #98 で 行ったことを記録した(CI に Ubuntu 26.04 を戻して 22.04 を外したこと、 CI の CMake のジョブでの librcsc の CMake ビルド、librcscConfig.cmake を 使った検出と FindLibrcsc.cmake の予備、configure の探す順序、Boost への 依存の除去、find_package の HINTS についての分かったこと)。PR #119 の マージも記録し、ステータスを完了にした。 Record in the plan that Phase 8 (following the changes in soccerwindow2) was done in PR #98 of soccerwindow2: Ubuntu 26.04 added to and 22.04 removed from the CI, librcsc built by CMake in the CMake jobs, finding librcsc by librcscConfig.cmake with FindLibrcsc.cmake as the fallback, the search order of configure, removing the dependency on Boost, and the findings on HINTS of find_package. Also record the merge of PR #119, and mark the plan as completed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Work in progress. This PR follows the plan
docs/plan/2026-11-21_boost-cmake-maintenance.md.Boost is now used as header-only, and the minimum required version is 1.70.
Progress
~/.local,librcscConfig.cmake,uninstall)cmake-helper.sh)