Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 758632 - sys-auth/polkit-0.118[elogind]: polkitunixsession-systemd.c:33:10: fatal error: systemd/sd-login.h: No such file or directory
Summary: sys-auth/polkit-0.118[elogind]: polkitunixsession-systemd.c:33:10: fatal erro...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-05 11:31 UTC by Andrew Savchenko
Modified: 2021-02-27 19:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (polkit-0.118:20201205-111215.log,104.59 KB, text/plain)
2020-12-05 11:31 UTC, Andrew Savchenko
Details
environment (environment,99.86 KB, text/plain)
2020-12-05 11:32 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,9.26 KB, text/plain)
2020-12-05 11:33 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2020-12-05 11:31:56 UTC
Created attachment 676777 [details]
build.log

Hi!

polkit fails to build with elogind:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src -DPACKAGE_LIBEXEC_DIR=\"/usr/libexec\" -DPACKAGE_SYSCONF_DIR=\"/etc\" -DPACKAGE_DATA_DIR=\"/usr/share\" -DPACKAGE_BIN_DIR=\"/usr/bin\" -DPACKAGE_LOCALSTATE_DIR=\"/var\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -DPACKAGE_LIB_DIR=\"/usr/lib64\" -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_POLKIT_COMPILATION -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/elogind -march=native -O3 -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=both -pipe -frecord-gcc-switches -c polkitunixsession-systemd.c  -fPIC -DPIC -o .libs/libpolkit_gobject_1_la-polkitunixsession-systemd.o
polkitunixsession-systemd.c:33:10: fatal error: systemd/sd-login.h: No such file or directory
   33 | #include <systemd/sd-login.h>
      |          ^~~~~~~~~~~~~~~~~~~~

See full build.log, environment and emerge --info below.

$ emerge -pvq sys-auth/polkit
[ebuild   R   ] sys-auth/polkit-0.118  USE="elogind gtk nls pam -examples -introspection* -jit -kde (-selinux) -systemd -test"
$ emerge -pvq elogind
[ebuild   R   ] sys-auth/elogind-243.7-r1  USE="acl pam policykit -audit -debug -doc (-selinux)"
Comment 1 Andrew Savchenko gentoo-dev 2020-12-05 11:32:25 UTC
Created attachment 676780 [details]
environment
Comment 2 Andrew Savchenko gentoo-dev 2020-12-05 11:33:04 UTC
Created attachment 676783 [details]
emerge --info
Comment 3 Andrew Savchenko gentoo-dev 2021-02-27 14:47:33 UTC
I've found the reason:

INSTALL_MASK="/*/systemd/"

elogind headers are now symlinks to /usr/include/systemd/ files which were purged by aforementioned install mask.

While this problem is my fault, it also indicates that "small files" policy is defective, because it becomes harder and harder to keep systemd "small files" out of a system. That's why a general mask was used, but such approach is no longer usable.
Comment 4 Mike Gilbert gentoo-dev 2021-02-27 15:35:18 UTC
My advice has always been to ignore the small files: they do no harm, and using INSTALL_MASK without care will cause problems like this one.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 15:38:12 UTC
(In reply to Mike Gilbert from comment #4)
> My advice has always been to ignore the small files: they do no harm, and
> using INSTALL_MASK without care will cause problems like this one.

Especially given *.unit or whatever else is valid.
Comment 6 Andrew Savchenko gentoo-dev 2021-02-27 19:29:18 UTC
(In reply to Sam James from comment #5)
> (In reply to Mike Gilbert from comment #4)
> > My advice has always been to ignore the small files: they do no harm, and
> > using INSTALL_MASK without care will cause problems like this one.
> 
> Especially given *.unit or whatever else is valid.

Unit-files should not be necessary on non-systemd systems.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 19:32:51 UTC
(In reply to Andrew Savchenko from comment #6)
> (In reply to Sam James from comment #5)
> > (In reply to Mike Gilbert from comment #4)
> > > My advice has always been to ignore the small files: they do no harm, and
> > > using INSTALL_MASK without care will cause problems like this one.
> > 
> > Especially given *.unit or whatever else is valid.
> 
> Unit-files should not be necessary on non-systemd systems.

They're not. So, add *.unit to your INSTALL_MASK.