From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/libselinux: fix build with python 3.8
Date: Tue, 22 Oct 2019 11:10:17 +0200 [thread overview]
Message-ID: <20191022111017.7607a729@windsurf> (raw)
In-Reply-To: <20191022094500.48f222d8@windsurf>
Hello,
+Matt Weber, SELinux stuff inside.
On Tue, 22 Oct 2019 09:45:00 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> So I believe the right fix is:
With this fix, the module builds properly. With
http://patchwork.ozlabs.org/patch/1181164/, it gets installed to the
target. However, importing the module fails:
Python 3.8.0 (default, Oct 21 2019, 21:15:12)
[GCC 4.9.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import selinux
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "usr/lib/python3.8/site-packages/selinux/__init__.py", line 13, in <module>
ImportError: cannot import name '_selinux' from partially initialized module 'selinux' (most likely due to a circular import) (/usr/lib/python3.8/site-packages/selinux/__init__.pyc)
One interesting thing is that the name of the _selinux module is incorrect:
_selinux.cpython-38-x86_64-linux-gnu.so
See the "x86_64-linux-gnu" ? A properly working module has the following name:
alsaaudio.cpython-38-arm-linux-gnueabi.so
You might think _selinux.cpython-38-x86_64-linux-gnu.so is built for
x86-64, but it's not, it's properly cross-compiled for ARM:
$ file _selinux.cpython-38-x86_64-linux-gnu.so
_selinux.cpython-38-x86_64-linux-gnu.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
More investigation is needed.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-10-22 9:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-20 20:31 [Buildroot] [PATCH 1/1] package/libselinux: fix build with python 3.8 James Hilliard
2019-10-21 8:06 ` Thomas Petazzoni
2019-10-21 15:18 ` James Hilliard
2019-10-21 19:06 ` Thomas Petazzoni
2019-10-21 19:25 ` James Hilliard
2019-10-21 21:18 ` Thomas Petazzoni
2019-10-21 21:42 ` James Hilliard
2019-10-22 7:40 ` Thomas Petazzoni
2019-10-22 7:45 ` Thomas Petazzoni
2019-10-22 9:10 ` Thomas Petazzoni [this message]
2019-10-25 9:28 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191022111017.7607a729@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox