Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sjperkins opened this issue Oct 26, 2023 · 0 comments
Labels
bug Something isn't working c++ C++ related issues python Python related issues

Comments

@sjperkins
Copy link
Member

sjperkins commented Oct 26, 2023

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
@sjperkins sjperkins added bug Something isn't working c++ C++ related issues python Python related issues labels Oct 26, 2023
@sjperkins sjperkins changed the title python-casacore and arcae extension modules have symbol clashes Importing both python-casacore and arcae extension modules results in symbol clashes Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c++ C++ related issues python Python related issues
Projects
None yet
Development

No branches or pull requests

1 participant