Skip to content

Importing both python-casacore and arcae extension modules results in symbol clashes #72

@sjperkins

Description

@sjperkins

Both packages bundle the casacore libraries in their wheels, but:

  • python-casacore is built with manylinux2014 and the older C++11 _GLIBCXX_USE_CXX11_ABI=0
  • arcae is built with manylinux_2_28 and the newer C++11 _GLIBCXX_USE_CXX11_ABI=1.

This results in segfaults, probably due to the the symbols of the first extension module loaded having precedence over the the second extension module loaded.

Possible solutions:

  • Use the lower priority module in a separate process (must use the spawn and not fork method). arcae currently does this when using python-casacore to generate test case data.
    def casa_table_at_path(factory, *args):
    with mp.get_context("spawn").Pool(1) as pool:
    return pool.apply(factory, args)
    @pytest.fixture
    def column_case_table(tmp_path_factory):
    return casa_table_at_path(generate_column_cases_table,
    tmp_path_factory.mktemp("column_cases"))
  • Use lazy imports in mixed packages and keep implementations orthogonal
  • Help python-casacore upgrade to manylinux_2_28 as manylinux2014 will reach EOL in July 2024

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingc++C++ related issuespythonPython related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions