Re: [PATCH v3] Support static-only builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Burgener <dburgener@xxxxxxxxxxxxxxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux