aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-28 10:50:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-02 13:59:37 +0000
commit72bf75f0b2e7f36930185e18a1de8277ce7045d8 (patch)
tree76c0c185590aecd09c68e1003cad012e5cc75eca
parentf02c3ccc46bfc78ff3ec577b84247a37cbb1a58c (diff)
downloadbitbake-72bf75f0b2e7f36930185e18a1de8277ce7045d8.tar.gz
lib/bb: Add workaround for libgcc issues with python 3.8 and 3.9yocto-4.3.22023-10.2-nanbield2.6.2
With python 3.8 and 3.9, we see intermittent errors of: libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) which seem related to: https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work https://bugs.ams1.psf.io/issue42888 These tend to occur on debian 11 and ubuntu 20.04. Workaround this by ensuring libgcc is preloaded in all cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 3163481e5..75b66edc4 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -15,6 +15,13 @@ import sys
if sys.version_info < (3, 8, 0):
raise RuntimeError("Sorry, python 3.8.0 or later is required for this version of bitbake")
+if sys.version_info < (3, 10, 0):
+ # With python 3.8 and 3.9, we see errors of "libgcc_s.so.1 must be installed for pthread_cancel to work"
+ # https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
+ # https://bugs.ams1.psf.io/issue42888
+ # so ensure libgcc_s is loaded early on
+ import ctypes
+ libgcc_s = ctypes.CDLL('libgcc_s.so.1')
class BBHandledException(Exception):
"""