Skip to content

Unedfined symbol pybind11::object::borrowed #770

@uentity

Description

@uentity

Hi devs!

Faced topic issue when building modules with Python bindings. Seems that this is related to my custom array class that is inherited from pybind11::array_t. It's a templated type that imports (inherits) all constructors from array_t, but couple of methods are only declared. Module1 contains explicit specializations of these methods (from my custom array) and have no problems.
Then, I use array in Module2 and it fails to load because of the issue above. I think the same would apply for pybind11::object::stolen, but I just didn't use it -- my array code contains reinterpret_borrow<>.

Right now I have a situation when release build does not have undefined symbol, but debug build does. In some other Module3 both release and debug builds have undefined symbol. Tested with gcc 6.3.1 and clang 3.9.1 -- results are the same.

Any ideas how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions