boostorg / boostorg/python

BoostDetectToolset-1.90.0.cmake file not found in an include() call in boost_python-config.cmake

オープン
#525 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
537
フォーク
223
平均マージ
11時間 22分
マージ済み PR(30日)
2

説明

I first installed Python 3.14, Boost 1.90.0 and Boost.Python with Brew on my macOS Sonoma 14.4 and built a minimum working example with CMake, but it didn't work.

When I used
```cmake
find_package(Boost REQUIRED COMPONENTS python)
```
to find Boost and ran with command
```bash
cmake .. -DCMAKE_PREFIX_PATH='/usr/local/opt/boost' -DBoost_DEBUG=1
```
the following error occured:
```
CMake Error at /usr/local/lib/cmake/boost_python-1.90.0/boost_python-config.cmake:29 (include):
include could not find requested file:

/usr/local/lib/cmake/boost_python-1.90.0/../BoostDetectToolset-1.90.0.cmake
Call Stack (most recent call first):
/usr/local/opt/boost/lib/cmake/Boost-1.90.0/BoostConfig.cmake:141 (find_package)
/usr/local/opt/boost/lib/cmake/Boost-1.90.0/BoostConfig.cmake:262 (boost_find_component)
CMakeLists.txt:10 (find_package)
```

After checking the file system, no file named `BoostDetectToolset-1.90.0.cmake` was found in either `/usr/local/lib/cmake/boost_python-1.90.0/..`, `/usr/local/opt/boost-python3/lib/cmake`, or `/usr/local/Cellar/boost-python3/1.90.0/lib/cmake`. The only `BoostDetectToolset-1.90.0.cmake` file was in `/usr/local/Cellar/boost/1.90.0_1/lib/cmake`.

Because there is a
```cmake
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.90.0.cmake)
```
in the file `/usr/local/lib/cmake/boost_python-1.90.0/boost_python-config.cmake` which was auto-generated by Boost, and `CMAKE_CURRENT_LIST_DIR` here refers to `/usr/local/lib/cmake/boost_python-config.cmake`, I suppose there must be something wrong with the generator of the file.

The following are my minimum working example:
[CMakeLists.txt](https://github.com/user-attachments/files/30335425/CMakeLists.txt)
[module.cpp](https://github.com/user-attachments/files/30335426/module.cpp)

Do you have any suggestions? Thanks in advance.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Run the attached CMakeLists.txt example with the stated Boost and Python versions, then inspect boost_python-config.cmake and BoostConfig.cmake around the failing include() call. Compare the generated configuration paths with the BoostDetectToolset-1.90.0.cmake locations reported in the issue; done means find_package(Boost REQUIRED COMPONENTS python) completes successfully.

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

評価

技術スタック
cmake, cpp, macos, python
領域
build-system
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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