boostorg / boostorg/python

Confusion over boost::python installation and example/tutorial instructions

未關閉
#410 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
537
分支
223
平均合併
11 小時 22 分鐘
30 天內合併 PR
2

描述

Hello,

I'm attempting to install boost::python on a Raspbian bullseye (32 bit) system. First, I followed the instructions at https://www.boost.org/doc/libs/1_81_0/more/getting_started/unix-variants.html to build bjam (b2) and install the boost::python libraries and headers...

```
jay@raspberrypi:~/boost_1_81_0 $ ./bootstrap.sh --with-libraries=python --prefix=/home/jay/boost_libs
...
jay@raspberrypi:~/boost_1_81_0 $ ./b2 install
```
It completed without error.

Then, I followed the instructions at https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/tutorial/tutorial/hello.html to build the example...

```
jay@raspberrypi:~/boost_1_81_0/libs/python/example/tutorial $ ~/boost_1_81_0/b2
...found 11 targets...
...updating 3 targets...
gcc.link.dll hello_ext.so
/usr/bin/ld: cannot find -lboost_python
collect2: error: ld returned 1 exit status

"g++" -o "hello_ext.so" -Wl,-h -Wl,hello_ext.so -shared -Wl,--start-group "hello.o" -Wl,-Bstatic -Wl,-Bdynamic -lboost_python -ldl -lpthread -lutil -Wl,--end-group -fPIC -g

...failed gcc.link.dll hello_ext.so...
...skipped hello for lack of hello_ext.so...
...failed updating 1 target...
...skipped 2 targets...
```
It seems that b2 isn't correctly locating the boost_python library. I've also tried installing the boost libraries and headers to the system (/usr/local/) and it made no difference.

I can see the libraries in the filesystem:

```
jay@raspberrypi:~ $ ls ~/boost_libs/lib/
cmake libboost_numpy39.a libboost_numpy39.so libboost_numpy39.so.1.81.0 libboost_python39.a libboost_python39.so libboost_python39.so.1.81.0
jay@raspberrypi:~ $ ls /usr/local/lib/
cmake libboost_numpy39.a libboost_numpy39.so libboost_numpy39.so.1.81.0 libboost_python39.a libboost_python39.so libboost_python39.so.1.81.0 python3.9
```
Please can you help me determine what's missing?

-Thanks,
-Jay

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

先從 issue 中連結的 Unix installation 和 Hello tutorial 頁面開始,然後檢查 libs/python/example/tutorial 中的範例命令,以及 ~/boost_libs/lib 和 /usr/local/lib 下已安裝的檔案。將範例所要求的函式庫與顯示的 Boost.Python 3.9 函式庫名稱進行比較;當 tutorial 範例能在所回報的 Raspbian 設定上成功建置時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp, python
領域
build-system, documentation
Issue 類型
文件
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。