boostorg / boostorg/python

Undefined symbol when importing module in python

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

描述

Hi guys

I''m trying to use boost python and then I'm exposing simple class i get
undefined symbol: _ZN5boost6python15instance_holder8allocateEP7_objectmm

I checked symbols in libboost_python39.so.1.78.0 and i noticed that exist following symbol
_ZN5boost6python15instance_holder8allocateEP7_objectmmm (one m more than expected)

So am I doing sth wrong or this is a bug?

My class
```
struct ConnectionFactory
{
ConnectionFactory(){}
~ConnectionFactory(){}
};
```

Exposing by:
`class_("ConnectionFactory");`

Linux Ubuntu 18.04

EDIT:
I made a workaround, just modifying expected symbol using this
`objcopy --redefine-sym _ZN5boost6python15instance_holder8allocateEP7_objectmm=_ZN5boost6python15instance_holder8allocateEP7_objectmmm myFile.o`

And this is working, but i'm not sure if this is correct approach

貢獻指南

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

研究方向

首先,將 libboost_python39.so.1.78.0 中預期的符號和匯出的符號與 Ubuntu 18.04 上顯示的 ConnectionFactory 暴露內容進行比較。檢查 objcopy workaround,並確定該不相符是否可重現,以及它是否表明存在 Boost.Python 或建置設定問題。

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

評估

技術堆疊
cpp, python
領域
backend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

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

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