From: Alyssa Ross <hi@alyssa.is>
To: Daniel Burgener <dburgener@linux.microsoft.com>
Cc: Nicolas Iooss <nicolas.iooss@m4x.org>, selinux@vger.kernel.org
Subject: Re: [PATCH v3] Support static-only builds
Date: Wed, 12 Feb 2025 10:16:27 +0100 [thread overview]
Message-ID: <87a5aro74k.fsf@alyssa.is> (raw)
In-Reply-To: <9316b48f-64f0-469b-8dde-1386aa13d384@linux.microsoft.com>
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
Daniel Burgener <dburgener@linux.microsoft.com> writes:
> On 2/11/2025 4:16 PM, Alyssa Ross wrote:
>> diff --git a/policycoreutils/Makefile b/policycoreutils/Makefile
>> index 32ad0201..7acd51dd 100644
>> --- a/policycoreutils/Makefile
>> +++ b/policycoreutils/Makefile
>> @@ -1,5 +1,10 @@
>> SUBDIRS = setfiles load_policy newrole run_init secon sestatus semodule setsebool scripts po man hll unsetfiles
>>
>> +PKG_CONFIG ?= pkg-config
>> +
>> +LIBSELINUX_LDLIBS := $(shell $(PKG_CONFIG) --libs libselinux)
>> +export LIBSELINUX_LDLIBS
>> +
>
> I think that in the DISABLE_SHARED case, the pkg-config command needs
> --static as well. I tried your patch, and I get errors that the
> downstream users of libselinux have undefined references to libpcre2,
> and they are being build without -lpcre2-8. Based on the pkg-config man
> page, it looks like Requires.private libraries are only included if the
> --static flag is passed.
I think it's generally expected that the user set
PKG_CONFIG="pkg-config --static" when they want static linking. See
e.g. <https://bugs.freedesktop.org/show_bug.cgi?id=19541#c3>.
> I also see that restorecond is not including -lpcre2-8. It probably
> needs the same treatment as policycoreutils/*.
Does it fail to build for you? It builds DISABLE_SHARED=y for me
> Finally, I was unable to get the install-rubywrap and install-pywrap
> targets to build with DISABLE_SHARED=y. I wasn't able to figure out the
> ultimate issue there.
I think Ruby and Python bindings need to be shared libraries, so it
doesn't make sense to build them with DISABLE_SHARED=y.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2025-02-12 9:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 21:16 [PATCH v3] Support static-only builds Alyssa Ross
2025-02-11 22:11 ` Daniel Burgener
2025-02-12 9:16 ` Alyssa Ross [this message]
2025-02-12 15:11 ` Daniel Burgener
2025-02-12 16:11 ` Daniel Burgener
2025-02-13 11:48 ` Alyssa Ross
2025-03-31 15:38 ` James Carter
2025-04-07 18:04 ` James Carter
2025-06-23 12:34 ` [PATCH v3] Support static-only builds - unconditional `-laudit -lbz2` in non-static policycoreutils build Petr Lautrbach
2025-06-25 10:41 ` [PATCH 1/2] libsemanage: add missing libaudit private library Alyssa Ross
2025-06-25 10:41 ` [PATCH 2/2] policycoreutils: use pkg-config for libsemanage Alyssa Ross
2025-06-26 16:54 ` James Carter
2025-06-27 15:04 ` Alyssa Ross
2025-06-27 18:07 ` James Carter
2025-06-28 8:37 ` Alyssa Ross
2025-07-01 15:12 ` James Carter
2025-07-01 15:12 ` [PATCH 1/2] libsemanage: add missing libaudit private library James Carter
2025-07-02 17:34 ` James Carter
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=87a5aro74k.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=dburgener@linux.microsoft.com \
--cc=nicolas.iooss@m4x.org \
--cc=selinux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.