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:03:25 +0000 |
commit | fe5d2f0b666c83e3336ea9962c8e2e4c39816e21 (patch) | |
tree | 44a0b158273a95d88c1fc488d593006c7aa08268 | |
parent | f00d4c302906a0f81395429d2661a26bcb8d05b4 (diff) | |
download | poky-fe5d2f0b666c83e3336ea9962c8e2e4c39816e21.tar.gz |
bitbake: 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.
(Bitbake rev: c6666f6cfafd55e1c980239a7c5ff908f1a69196)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 3cf02069c5..37ac878f96 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -15,6 +15,13 @@ import sys | |||
15 | if sys.version_info < (3, 8, 0): | 15 | if sys.version_info < (3, 8, 0): |
16 | raise RuntimeError("Sorry, python 3.8.0 or later is required for this version of bitbake") | 16 | raise RuntimeError("Sorry, python 3.8.0 or later is required for this version of bitbake") |
17 | 17 | ||
18 | if sys.version_info < (3, 10, 0): | ||
19 | # With python 3.8 and 3.9, we see errors of "libgcc_s.so.1 must be installed for pthread_cancel to work" | ||
20 | # https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work | ||
21 | # https://bugs.ams1.psf.io/issue42888 | ||
22 | # so ensure libgcc_s is loaded early on | ||
23 | import ctypes | ||
24 | libgcc_s = ctypes.CDLL('libgcc_s.so.1') | ||
18 | 25 | ||
19 | class BBHandledException(Exception): | 26 | class BBHandledException(Exception): |
20 | """ | 27 | """ |