It’s preloading the library so I think it Won’t have unintended side effects therefore can be applied regardless I would imagine
On Wed, Dec 27, 2023 at 10:30 AM Joshua Watt <[email protected]> wrote: > On Wed, Dec 27, 2023 at 4:28 AM Richard Purdie > <[email protected]> wrote: > > > > I wanted to write down some thoughts on this which I have all the > > pieces handy. > > > > We saw a nightly layer check fail for meta-openembedded: > > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio > > > > INFO: > ====================================================================== > > INFO: ERROR: test_show_environment (common.CommonCheckLayer) > > INFO: > ---------------------------------------------------------------------- > > INFO: Traceback (most recent call last): > > File > "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", > line 48, in test_show_environment > > check_command('Layer %s failed to show environment.' % > self.tc.layer['name'], > > File > "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", > line 287, in check_command > > raise RuntimeError(msg) > > RuntimeError: Layer meta-gnome failed to show environment. > > Command: bitbake -e > > Output: > > libgcc_s.so.1 must be installed for pthread_cancel to work > > Aborted (core dumped) > > > > which unsurprisingly is on ubuntn 20.04. We've also seen issues like > > this on Debian 11. > > > > I noticed: > > > > > https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work > > > > and: > > > > https://bugs.ams1.psf.io/issue42888 > > > > which led me to try: > > ubuntu2004-ty-1:~$ wget > https://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ echo $? > > 0 > > rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > libgcc_s.so.1 must be installed for pthread_cancel to work > > Aborted (core dumped) > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > libgcc_s.so.1 must be installed for pthread_cancel to work > > Aborted (core dumped) > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > libgcc_s.so.1 must be installed for pthread_cancel to work > > Aborted (core dumped) > > > > (1 in 4 success) > > > > Then adding to the script: > > import ctypes > > libgcc_s = ctypes.CDLL('libgcc_s.so.1') > > > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py > > ubuntu2004-ty-1:~$ python3 --version > > Python 3.8.10 > > > > I also tried this on debian 11: > > > > debian11-ty-1:~$ python3 pthread_cancel_bug.py > > libgcc_s.so.1 must be installed for pthread_cancel to work > > Aborted > > > > debian11-ty-1:~$ python3 --version > > Python 3.9.2 > > > > where the above workaround using ctypes also seems to work. > > > > I'm therefore tempted for python 3.8/3.9 to preload libgcc_s as a > > workaround for this... > > Seems reasonable to me, as long as we can restrict it to a specific > version range of python and have a nice comment explaining why > > > > > Cheers, > > > > Richard > > > > > > > > > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#193078): https://lists.openembedded.org/g/openembedded-core/message/193078 Mute This Topic: https://lists.openembedded.org/mt/103388962/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
