File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
The goal of this script is to ensure that the .so files we ship do not contain
3
- symbol versions from libstdc++ that are too recent.
3
+ symbol versions from libstdc++ that are too recent. This is a very manual way of
4
+ doing the checks that `auditwheel repair` would do (but using auditwheel isn't
5
+ necessarily easy either).
4
6
5
7
Why this is needed: during development, we observed the following general
6
8
scenario in various local development setups:
25
27
GLIBCXX_3.4.19, so as long as torchcodec doesn't ship a symbol that is higher
26
28
than that, torchcodec should be fine.
27
29
28
- Note that the easiest way to avoid recent symbols is simply to use an old-enough
29
- toolchain. In July 2024, pytorch libraries (and torchcodec) are built with gcc
30
- 9.
30
+ The easiest way to avoid recent symbols is simply to use an old-enough
31
+ toolchain. Relying on the test-infra runners should be enough.
31
32
"""
32
33
33
34
import re
36
37
if len (sys .argv ) != 2 :
37
38
raise ValueError ("Wrong usage: python check_glibcxx.py <str_with_symbols>." )
38
39
39
- MAX_ALLOWED = (3 , 4 , 19 )
40
+ MAX_ALLOWED = (3 , 4 , 24 )
40
41
41
42
symbol_matches = sys .argv [1 ].split ("\n " )
42
43
all_symbols = set ()
Original file line number Diff line number Diff line change @@ -37,14 +37,13 @@ assert_not_in_wheel $wheel_path "^doc"
37
37
assert_not_in_wheel $wheel_path " ^benchmarks"
38
38
assert_not_in_wheel $wheel_path " ^packaging"
39
39
40
- # TODO: Put this back with higher upper bound of version symbol.
41
- # if [[ "$unamestr" == 'Linux' ]]; then
42
- # # See invoked python script below for details about this check.
43
- # extracted_wheel_dir=$(mktemp -d)
44
- # unzip -q $wheel_path -d $extracted_wheel_dir
45
- # symbols_matches=$(find $extracted_wheel_dir | grep ".so$" | xargs objdump --syms | grep GLIBCXX_3.4.)
46
- # python packaging/check_glibcxx.py "$symbols_matches"
47
- # fi
40
+ if [[ " $unamestr " == ' Linux' ]]; then
41
+ # See invoked python script below for details about this check.
42
+ extracted_wheel_dir=$( mktemp -d)
43
+ unzip -q $wheel_path -d $extracted_wheel_dir
44
+ symbols_matches=$( find $extracted_wheel_dir | grep " .so$" | xargs objdump --syms | grep GLIBCXX_3.4.)
45
+ python packaging/check_glibcxx.py " $symbols_matches "
46
+ fi
48
47
49
48
echo " ls dist"
50
49
ls dist
You can’t perform that action at this time.
0 commit comments