Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 09:45:00 +0200	[thread overview]
Message-ID: <20191022094500.48f222d8@windsurf> (raw)
In-Reply-To: <20191022094025.0ae71f35@windsurf>

Hello,

On Tue, 22 Oct 2019 09:40:25 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> So as you can see linking against libpython is *not* the solution, it
> is just a workaround for another real problem. I have not found (yet)
> what is the problem with the versioning script, but I guess we should
> research in this direction.

So, it is not the versioning script. In fact, when testing I removed
both the --version-script option and the -z defs option. But it is
actually the -z defs option that causes the problem.

And indeed:

       -z defs

           Report unresolved symbol references from regular object
           files.  This is done even if the linker is creating a
           non-symbolic shared library.  The switch
           --[no-]allow-shlib-undefined controls the behaviour for
           reporting unresolved references found in shared libraries
           being linked in.

Using -z defs in this particular case doesn't make any sense: we do
acknowledge that we can have remaining unresolved symbols. Then will be
provided by the Python interpreter.

So I believe the right fix is:

+++ src/Makefile	2019-10-22 09:44:26.700158005 +0200
@@ -165,7 +165,7 @@
 	$(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
 
 $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA)
-	$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) -Wl,-soname,audit2why.so,--version-script=audit2why.map,-z,defs
+	$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) -Wl,-soname,audit2why.so,--version-script=audit2why.map
 
 %.o:  %.c policy.h
 	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-10-22  7:45 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 [this message]
2019-10-22  9:10           ` Thomas Petazzoni
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=20191022094500.48f222d8@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