boostorg / boostorg/python

Undefined symbol when importing module in python

Open
#380 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.