diff --git a/docker/build_scripts/finalize.sh b/docker/build_scripts/finalize.sh index be23516e0..cc4acbdbb 100755 --- a/docker/build_scripts/finalize.sh +++ b/docker/build_scripts/finalize.sh @@ -103,3 +103,8 @@ LC_ALL=C "${MY_DIR}/update-system-packages.sh" # wrap compilers (see https://github.com/pypa/manylinux/issues/1725) "${MY_DIR}/install-gcc-wrapper.sh" + +# patch libstdc++.so (see https://github.com/pypa/manylinux/issues/1760) +if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then + find "${DEVTOOLSET_ROOTPATH}" -name 'libstdc++.so' -exec sed -i 's/INPUT\s*(\s*\([^ ]\+\)\s*\([^ ]\+\)\s*)/INPUT ( \1 \2 \1 )/g' {} \; +fi diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 5af64487c..f638822d5 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -172,5 +172,19 @@ if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then fi fi +# https://github.com/pypa/manylinux/issues/1760 +g++ -o /tmp/repro -x c++ -D_GLIBCXX_ASSERTIONS -fPIC -Wl,--as-needed - << EOF +#include +#include + +int main(int argc, char* argv[]) +{ + std::array a = {1, 2, 3}; + printf("repro %d\n", a[0]); + return 0; +} +EOF +/tmp/repro + # final report echo "run_tests successful!"