From b7ff078030db961662ab535e29e0683bb2dbd212 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 6 Nov 2022 16:58:46 +0100 Subject: [PATCH 1/2] fix(wheels): link libstdc++ statically on manylinux1 For some reason, the ninja binary built on manylinux1 is segfaulting on ubuntu20.04+ & RHEL 8+. Statically linking libstdc++ fixes the issue. --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d3ddc9c..b81dab6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,9 +17,11 @@ repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}" test-extras = "test" test-command = "pytest {project}/tests" -[tool.cibuildwheel.linux] +[[tool.cibuildwheel.overrides]] +select = "*-manylinux_{x86_64,i686}" manylinux-x86_64-image = "manylinux1" manylinux-i686-image = "manylinux1" +environment = { LDFLAGS = "-static-libstdc++" } [tool.cibuildwheel.macos.environment] MACOSX_DEPLOYMENT_TARGET = "10.9" From 868fb99091a5421b93f2d2058db5b8790be5e41a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 5 Nov 2022 23:14:17 -0400 Subject: [PATCH 2/2] ci: add a test on the host for linux Signed-off-by: Henry Schreiner --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96b8229..db479a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,13 @@ jobs: with: path: ./wheelhouse/*.whl + - name: Test wheel on host Linux + if: runner.os == 'Linux' && matrix.arch == 'x86_64' + run: | + pip install wheelhouse/*manylinux*x86_64*.whl + ninja --version + python -m ninja --version + build_sdist: name: Build source distribution needs: [lint]