From a26b51821544e012edbf7d961bf321d956addec9 Mon Sep 17 00:00:00 2001 From: Kirill Pushkarev Date: Fri, 7 Jun 2024 17:50:11 +0700 Subject: [PATCH] Preload libgcc_s.so.1 to avoid crash on `pthread_cancel` call (fixes #1) --- BUCK | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BUCK b/BUCK index ee3e1bc..bcc6866 100644 --- a/BUCK +++ b/BUCK @@ -7,7 +7,10 @@ include_defs('//product.defs.py') python_binary( name = 'debian11to12.pex', platform = 'py3', - build_args = ['--python-shebang', '/usr/bin/env python3'], + # libgcc_s.so.1 is preloaded to workaround crash due to "libgcc_s.so.1 must + # be installed for pthread_cancel to work" instead of clean exit after + # dist-upgrade, see https://bugs.python.org/issue44434 + build_args = ['--python-shebang', '/usr/bin/env -S LD_PRELOAD=libgcc_s.so.1 python3'], main_module = 'debian11to12.main', deps = [ 'dist-upgrader//pleskdistup:lib',