Fixed
Created: Nov 16, 2023
Updated: Mar 7, 2024
Resolved Date: Mar 7, 2024
Found In Version: 10.22.33.14
Severity: Standard
Applicable for: Wind River Linux LTS 22
Component/s: Userspace
Symptom Details
****************************
Get example from section "Usage" of python3-systemd README.
[https://github.com/systemd/python-systemd/tree/main#readme]
Try to run it on target:
root@intel-x86-64:~# cat test_python3-systemd.py
from systemd import journal
j = journal.Reader()
j.add_match('_EXE=/usr/bin/vim')
for entry in j:
print(entry['MESSAGE'])
root@intel-x86-64:~# python3 test_python3-systemd.py
Traceback (most recent call last):
File "/root/test_python3-systemd.py", line 3, in <module>
j.add_match('_EXE=/usr/bin/vim')
File "/usr/lib64/python3.10/site-packages/systemd/journal.py", line 244, in add_match
super(Reader, self).add_match(arg)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
root@intel-x86-64:~# echo $?
1
8. Steps To Reproduce
****************************
1. build
$ setup.sh --machine intel-x86-64 --dl-layers --distro wrlinux --templates feature/xfce feature/LAMP feature/aws feature/azure feature/docker feature/gcc-sanitizers feature/gperftools feature/grpc feature/ipv6 feature/krb5 feature/kubernetes feature/lttng feature/mariadb feature/network-bond-libteam feature/nfsd feature/ntp feature/opencv feature/package-management feature/pam-faillock feature/podman feature/python-tkinter feature/sftp-server feature/snmp feature/software-entropy feature/sysklogd feature/system-stats feature/systemd-bootchart feature/target-toolchain feature/tcpslice feature/xfce --layers meta-cloud-services meta-filesystems meta-iot-cloud meta-security-compliance meta-virtualization --dl-layers
$ . ./environment-setup-x86_64-wrlinuxsdk-linux
$ . ./oe-init-build-env
2. Build
$ vim conf/local.conf
IMAGE_INSTALL:append = " python3-systemd"
$ bitbake wrlinux-image-std
4. Boot up target and run test code
root@intel-x86-64:~# cat test_python3-systemd.py
from systemd import journal
j = journal.Reader()
j.add_match('_EXE=/usr/bin/vim')
for entry in j:
print(entry['MESSAGE'])
root@intel-x86-64:~# python3 test_python3-systemd.py