From 7d4090b6281ba5e538f619d1c04ddee409a7a8ef Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 28 Mar 2021 10:23:38 +0200 Subject: [PATCH] Add manylinux_2_27 policy (#300) This policy is based on symbols from ubuntu 18.04 with GLIBCXX_3.4.25 symbols removed (introduced in gcc-8 and incompatible with Photon 3 distro based on glibc 2.28). As long as gcc-7 is used on ubuntu 18.04, using this distro should lead to manylinux_2_27 compliant wheels. Symbol compatibility analysis done using https://github.com/mayeut/pep600_compliance data. Fix #299 --- auditwheel/policy/policy.json | 50 +++++++++++++++++++++++++++++++++++ tests/unit/test_policy.py | 2 ++ 2 files changed, 52 insertions(+) diff --git a/auditwheel/policy/policy.json b/auditwheel/policy/policy.json index a490df49..0ed5d38e 100644 --- a/auditwheel/policy/policy.json +++ b/auditwheel/policy/policy.json @@ -154,6 +154,56 @@ "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22"] } }, + "lib_whitelist": [ + "libgcc_s.so.1", + "libstdc++.so.6", + "libm.so.6", "libdl.so.2", "librt.so.1", + "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0", + "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6", + "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0", + "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2" + ]}, + {"name": "manylinux_2_27", + "aliases": [], + "priority": 65, + "symbol_versions": { + "i686": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "FLOAT128", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "4.0.0", "4.2.0", "4.3.0", "4.4.0", "4.5.0", "4.7.0", "4.8.0", "7.0.0"], + "GLIBC": ["2.0", "2.1", "2.1.1", "2.1.2", "2.1.3", "2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"] + }, + "x86_64": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "FLOAT128", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "4.8.0", "7.0.0"], + "GLIBC": ["2.2.5", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"] + }, + "aarch64": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.5.0", "4.7.0", "7.0.0"], + "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"] + }, + "ppc64le": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"], + "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"] + }, + "s390x": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.1.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"], + "GLIBC": ["2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.19", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"] + }, + "armv7l": { + "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "ARM_1.3.3", "TM_1"], + "GCC": ["3.0", "3.3", "3.3.1", "3.3.4", "3.4", "3.4.2", "3.5", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"], + "GLIBC": ["2.0", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"], + "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"] + } + }, "lib_whitelist": [ "libgcc_s.so.1", "libstdc++.so.6", diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py index 11b26325..6694ad76 100644 --- a/tests/unit/test_policy.py +++ b/tests/unit/test_policy.py @@ -100,6 +100,7 @@ class TestPolicyAccess: def test_get_by_priority(self): _arch = get_arch_name() + assert get_policy_name(65) == f'manylinux_2_27_{_arch}' assert get_policy_name(70) == f'manylinux_2_24_{_arch}' assert get_policy_name(80) == f'manylinux_2_17_{_arch}' if _arch in {'x86_64', 'i686'}: @@ -120,6 +121,7 @@ def test_get_by_priority_duplicate(self): def test_get_by_name(self): _arch = get_arch_name() + assert get_priority_by_name(f"manylinux_2_27_{_arch}") == 65 assert get_priority_by_name(f"manylinux_2_24_{_arch}") == 70 assert get_priority_by_name(f"manylinux2014_{_arch}") == 80 assert get_priority_by_name(f"manylinux_2_17_{_arch}") == 80