diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-28 10:50:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-30 11:04:40 +0000 |
commit | 2c6183594279e2e9d03f11155ad969448869c863 (patch) | |
tree | cb5acf5bd5a113c6236487b0ad85094977f242df | |
parent | 23639edfbbb3fced7606dce211db8a31c5766585 (diff) | |
download | bitbake-contrib-2c6183594279e2e9d03f11155ad969448869c863.tar.gz |
lib/bb: Add workaround for libgcc issues with python 3.8 and 3.9
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__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py index b8333bdb8..565f163f5 100644 --- a/lib/bb/__init__.py +++ b/lib/bb/__init__.py @@ -15,6 +15,13 @@ import sys if sys.version_info < (3, 6, 0): raise RuntimeError("Sorry, python 3.6.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): """ |