Skip to content

ABI incompatibility between 3.5.0/3.5.1 and 3.5.2+ #314

@aldanor

Description

@aldanor

Here's the problem: if you build a pybind11 when using 3.5.2 headers, it will reference this symbol:

U _PyThreadState_UncheckedGet

because of how get_thread_state_unchecked is implemented. If you try to import this module with 3.5.0/3.5.1 version of Python, you will first get a linkage error and then most likely a segfault:

ImportError: foo.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _PyThreadState_UncheckedGet

Now, this is not very cool, since ABI compatibility between micro versions is something to be expected by default. It gets much worse if you use conda: it differentiates package versions by the major+minor numbers in the version only, so you have packages like foo-py34-0.1.0 and foo-py35-0.1.0 and it's implicitly assumed they should work well for all micro versions of the interpreter.

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