Skip to content

Commit ce818c5

Browse files
committed
[AARCH64] Fix image.so wheel
By adding explicit libz dependency
1 parent e9546d8 commit ce818c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aarch64_linux/build_aarch64_wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def build_torchvision(host: RemoteHost, *,
280280
branch: str = "master",
281281
use_conda: bool = True,
282282
git_clone_flags: str,
283-
run_smoke_tests: bool = False) -> str:
283+
run_smoke_tests: bool = True) -> str:
284284
print('Checking out TorchVision repo')
285285
build_version = checkout_repo(host,
286286
branch=branch,
@@ -308,6 +308,8 @@ def build_torchvision(host: RemoteHost, *,
308308
host.run_cmd("conda install -y libpng jpeg")
309309
# Remove .so files to force static linking
310310
host.run_cmd("rm miniforge3/lib/libpng.so miniforge3/lib/libpng16.so miniforge3/lib/libjpeg.so")
311+
# And patch setup.py to include libz dependency for libpng
312+
host.run_cmd(['sed -i -e \'s/image_link_flags\.append("png")/image_link_flags += ["png", "z"]/\' vision/setup.py'])
311313

312314
build_vars = ""
313315
if branch == "nightly":

0 commit comments

Comments
 (0)