boostorg / boostorg/python

Undefined symbol when importing module in python

Aberta
#380 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C++
Estrelas
537
Forks
223
Merge médio
11h 22min
PRs com merge (30d)
2

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Start by comparing the expected and exported symbols in libboost_python39.so.1.78.0 against the shown ConnectionFactory exposure on Ubuntu 18.04. Review the objcopy workaround and determine whether the mismatch is reproducible and whether it indicates a Boost.Python or build configuration problem.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
cpp, python
Domínio
backend
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.