-
Notifications
You must be signed in to change notification settings - Fork 11
Description
While implementing aarch64-linux builds in #1271 (which succeeded up to an equivalent point of existing wheels), I inspected the output wheels and found some issues - including in wheels for x86-64.
Because compilation is happening on a modern host, rather than in a constrained environment with a lower GLIBC, libtket-c-api.so has access to modern GLIBC and GLIBCXX. In pure rust builds this didn't matter, as there was full control over the toolchain - but now we have C++ builds mixed in, I don't know of a bulletproof method other than to build within a constrained environment.
(That isn't to say that there isn't a bulletproof method to build on a host machine, I just don't know of one)
PEP 599 requires that shared objects within a manylinux_2_17 (a.k.a. manylinux2014) wheel are constrained to GLIBC <= 2.17, and GLIBCXX <= 3.4.19. However:
readelf --syms --wide tket.libs/libtket-c-api-0321b017.so | grep "@" | grep "GLIBC_2.[0-9][0-9]"
59: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isoc23_strtoll@GLIBC_2.38 (15)
106: 0000000000000000 0 FUNC GLOBAL DEFAULT UND lgamma@GLIBC_2.23 (20)
111: 0000000000000000 0 FUNC GLOBAL DEFAULT UND log@GLIBC_2.29 (21)
114: 0000000000000000 0 FUNC GLOBAL DEFAULT UND memcpy@GLIBC_2.14 (23)
129: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_once@GLIBC_2.34 (25)
179: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND __libc_single_threaded@GLIBC_2.32 (31)
197: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isoc23_strtoull@GLIBC_2.38 (15)
244: 0000000000000000 0 FUNC WEAK DEFAULT UND __pthread_key_create@GLIBC_2.34 (25)
262: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pow@GLIBC_2.29 (21)
274: 0000000000000000 0 FUNC GLOBAL DEFAULT UND log2@GLIBC_2.29 (21)
275: 0000000000000000 0 FUNC GLOBAL DEFAULT UND exp@GLIBC_2.29 (21)
8714: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isoc23_strtoll@GLIBC_2.38
10552: 0000000000000000 0 FUNC GLOBAL DEFAULT UND lgamma@GLIBC_2.23
10813: 0000000000000000 0 FUNC GLOBAL DEFAULT UND log@GLIBC_2.29
10999: 0000000000000000 0 FUNC GLOBAL DEFAULT UND memcpy@GLIBC_2.14
11814: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_once@GLIBC_2.34
13901: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND __libc_single_threaded@GLIBC_2.32
14486: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __isoc23_strtoull@GLIBC_2.38
16279: 0000000000000000 0 FUNC WEAK DEFAULT UND __pthread_key_create@GLIBC_2.34
17095: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pow@GLIBC_2.29
17336: 0000000000000000 0 FUNC GLOBAL DEFAULT UND log2@GLIBC_2.29
17357: 0000000000000000 0 FUNC GLOBAL DEFAULT UND exp@GLIBC_2.29
readelf --syms --wide tket.libs/libtket-c-api-0321b017.so | awk '$0 ~ /GLIBCXX_3.4.[2-9][0-9]/'
6: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND _ZTINSt8ios_base7failureB5cxx11E@GLIBCXX_3.4.21 (5)
11: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND _ZTINSt6thread6_StateE@GLIBCXX_3.4.22 (8)
12: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSt12out_of_rangeC1EPKc@GLIBCXX_3.4.21 (5)
...
48: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZNSt28__atomic_futex_unsigned_base26_M_futex_wait_until_steadyEPjjbNSt6chrono8durationIlSt5ratioILl1ELl1EEEENS2_IlS3_ILl1ELl1000000000EEEE@GLIBCXX_3.4.29 (14)
...
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@GLIBCXX_3.4.21 (5)
231: 0000000000000000 0 FUNC GLOBAL DEFAULT UND _ZSt21ios_base_library_initv@GLIBCXX_3.4.32 (36)
Which means that the wheels are not manylinux compliant at the moment:
auditwheel show tket-0.12.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
tket-0.12.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
is consistent with the following platform tag:
"manylinux_2_39_x86_64".
The effect is that installing tket wheels on an older system will appear to succeed until used - at which point GLIBC/XX errors will appear.
In order to get it there, I suggest the build process changes to use CIBuildWheel or similar instead.