From 14813d13c0c67133fe399924e20518768f56d835 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Thu, 26 May 2022 01:14:38 +0800 Subject: [PATCH] fix(whl): fix whl broken: patchelf on big (> 4G) file will make elf section broken, as a workaround, do strip firstly, then do patchelf. GitOrigin-RevId: c7fb7e25a6e477589ac8d65890e9832d942c0d87 --- scripts/whl/manylinux2014/do_build_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/whl/manylinux2014/do_build_common.sh b/scripts/whl/manylinux2014/do_build_common.sh index 0f1497241..0e5844e13 100755 --- a/scripts/whl/manylinux2014/do_build_common.sh +++ b/scripts/whl/manylinux2014/do_build_common.sh @@ -51,9 +51,9 @@ function patch_elf_depend_lib_mgb_mge() { handle_strip ${BUILD_DIR}/staging/megengine/core/_imperative_rt.so cp ${BUILD_DIR}/src/libmegengine_shared.so ${LIBS_DIR} + handle_strip ${LIBS_DIR}/libmegengine_shared.so patchelf --remove-rpath ${LIBS_DIR}/libmegengine_shared.so patchelf --force-rpath --set-rpath '$ORIGIN/.' ${LIBS_DIR}/libmegengine_shared.so - handle_strip ${LIBS_DIR}/libmegengine_shared.so # as some version of cudnn/trt libs have dlopen libs, so we can not use auditwheel # TODO: PR for auditwheel to support args for dlopen libs -- GitLab