Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 822054

Summary: sys-fs/lvm2-2.03.14 - lvmlockd-core.c: fatal error: systemd/sd-daemon.h: No such file or directory
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: agk, robbat2
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt

Description Toralf Förster gentoo-dev 2021-11-06 08:18:50 UTC
  fi \
) > .exported_symbols_generated
lvmlockd-core.c:35:10: fatal error: systemd/sd-daemon.h: No such file or directory
   35 | #include <systemd/sd-daemon.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../make.tmpl:464: lvmlockd-core.o] Error 1


  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-j4-20211030-090004


gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.0 *
Python 3.9.7
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.56.1
  [2]   rust-1.56.1 *
The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:
  [1]   php7.4
  [2]   php8.0 *

  HEAD of ::gentoo
commit 8eb79a71239cbf46c4f9b7619be05db0b93739cc
Author: Repository mirror & CI <>
Date:   Fri Nov 5 23:06:34 2021 +0000

    2021-11-05 23:06:33 UTC

emerge -qpvO sys-fs/lvm2
[ebuild     U ] sys-fs/lvm2-2.03.14 [2.02.188-r2] USE="lvm2create_initrd readline sanlock udev -device-mapper-only (-selinux) -static -static-libs -systemd -thin"
Comment 1 Toralf Förster gentoo-dev 2021-11-06 08:18:51 UTC
Created attachment 748944 [details]
Comment 2 Toralf Förster gentoo-dev 2021-11-06 08:18:53 UTC
Created attachment 748947 [details]
Comment 3 Toralf Förster gentoo-dev 2021-11-06 08:18:54 UTC
Created attachment 748950 [details]
Comment 4 Toralf Förster gentoo-dev 2021-11-06 08:18:55 UTC
Created attachment 748953 [details]
Comment 5 Toralf Förster gentoo-dev 2021-11-06 08:18:56 UTC
Created attachment 748956 [details]
Comment 6 Toralf Förster gentoo-dev 2021-11-06 08:18:58 UTC
Created attachment 748959 [details]
Comment 7 Toralf Förster gentoo-dev 2021-11-06 08:18:59 UTC
Created attachment 748962 [details]
Comment 8 Remus-Gabriel Chelu 2021-11-10 18:47:35 UTC
Hello, I had the same problem, which is due to the use of flags: sanlock (-systemd); and I have solved it by doing a new ebuild, which contains the following lines, inside the src_prepare () section, before the 'eautoreconf' line:
	if ! use systemd ; then
        if use sanlock ; then
            sed -i -e "s:systemd/sd-daemon.h:elogind/systemd/sd-daemon.h:" daemons/lvmlockd/lvmlockd-core.c || die
            sed -i -e "s:libsystemd:libelogind:" daemons/lvmlockd/ || die

Good luck, I hope I have been of help to someone...

This happens because you don't like 'systemd' and refuse to have it installed on your machine...  :)
Comment 9 Mike Gilbert gentoo-dev 2021-11-10 20:11:17 UTC
In daemons/lvmlockd/, USE_SD_NOTIFY is hard-coded to yes. It should probably be populated by configure instead.