Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 822054 - sys-fs/lvm2-2.03.14 - lvmlockd-core.c: fatal error: systemd/sd-daemon.h: No such file or directory
Summary: sys-fs/lvm2-2.03.14 - lvmlockd-core.c: fatal error: systemd/sd-daemon.h: No s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-06 08:18 UTC by Toralf Förster
Modified: 2022-11-21 19:53 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.55 KB, text/plain)
2021-11-06 08:18 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,397.46 KB, text/plain)
2021-11-06 08:18 UTC, Toralf Förster
Details
environment (environment,120.34 KB, text/plain)
2021-11-06 08:18 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,44.68 KB, application/x-bzip)
2021-11-06 08:18 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,15.93 KB, application/x-bzip)
2021-11-06 08:18 UTC, Toralf Förster
Details
sys-fs:lvm2-2.03.14:20211105-231657.log (sys-fs:lvm2-2.03.14:20211105-231657.log,202.19 KB, text/plain)
2021-11-06 08:18 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,43.40 KB, application/x-bzip)
2021-11-06 08:18 UTC, Toralf Förster
Details
emerge --info (emerge-info-sys-fs-lvm2-2.03.14-r4,6.85 KB, text/plain)
2022-11-21 11:33 UTC, Sandino Araico Sanchez
Details
build log (build.log.gz,30.27 KB, application/gzip)
2022-11-21 11:34 UTC, Sandino Araico Sanchez
Details
ebuild environment (environment,125.07 KB, text/plain)
2022-11-21 11:35 UTC, Sandino Araico Sanchez
Details

Note You need to log in before you can comment on or make changes to this bug.
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 *
/usr/lib/llvm/13
13.0.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 <repomirrorci@gentoo.org>
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]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-11-06 08:18:53 UTC
Created attachment 748947 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-11-06 08:18:54 UTC
Created attachment 748950 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-11-06 08:18:55 UTC
Created attachment 748953 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-11-06 08:18:56 UTC
Created attachment 748956 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-11-06 08:18:58 UTC
Created attachment 748959 [details]
sys-fs:lvm2-2.03.14:20211105-231657.log
Comment 7 Toralf Förster gentoo-dev 2021-11-06 08:18:59 UTC
Created attachment 748962 [details]
temp.tar.bz2
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/Makefile.in || die
		fi
	fi

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

PS:
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/Makefile.in, USE_SD_NOTIFY is hard-coded to yes. It should probably be populated by configure instead.
Comment 10 Sandino Araico Sanchez 2022-11-21 11:32:33 UTC
I have the same error on sys-fs/lvm2-2.03.14-r4

lvmlockd-core.c:35:10: fatal error: systemd/sd-daemon.h: No such file or directo
ry
   35 | #include <systemd/sd-daemon.h>
      |          ^~~~~~~~~~~~~~~~~~~~~


emerge -pqv '=sys-fs/lvm2-2.03.14-r4::gentoo'
[ebuild   R   ] sys-fs/lvm2-2.03.14-r4  USE="lvm readline sanlock* thin -lvm2cre
ate-initrd (-selinux) -static -static-libs -systemd -udev" 

The same error also on 2.03.16-r1, 2.03.16-r2 and 2.03.17
Comment 11 Sandino Araico Sanchez 2022-11-21 11:33:32 UTC
Created attachment 835487 [details]
emerge --info
Comment 12 Sandino Araico Sanchez 2022-11-21 11:34:05 UTC
Created attachment 835489 [details]
build log
Comment 13 Sandino Araico Sanchez 2022-11-21 11:35:01 UTC
Created attachment 835491 [details]
ebuild environment
Comment 14 Sandino Araico Sanchez 2022-11-21 11:48:50 UTC
(In reply to Mike Gilbert from comment #9)
> In daemons/lvmlockd/Makefile.in, USE_SD_NOTIFY is hard-coded to yes. It
> should probably be populated by configure instead.

Turning off the hardcoded USE_SD_NOTIFY=yes in daemons/lvmlockd/Makefile.in fixes the issue

@@ -103,6 +103,10 @@
 	# Users without systemd get no auto-activation of any logical volume
 	if ! use systemd ; then
 		eapply "${FILESDIR}"/${PN}-2.03.14-dm_lvm_rules_no_systemd.patch
+		# Fix for Bug #822054 https://bugs.gentoo.org/822054
+        if use sanlock ; then
+            sed -i -e "s:USE_SD_NOTIFY=yes:USE_SD_NOTIFY=no:" daemons/lvmlockd/Makefile.in || die
+		fi
 	fi
 
 	sed -i \
Comment 15 Larry the Git Cow gentoo-dev 2022-11-21 19:53:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05d2535777027dd8d43197b865768da4baf2126

commit a05d2535777027dd8d43197b865768da4baf2126
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-11-21 19:51:35 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-11-21 19:51:35 +0000

    sys-fs/lvm2: fix build with USE="sanlock -systemd"
    
    Closes: https://bugs.gentoo.org/822054
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-fs/lvm2/lvm2-2.03.14-r4.ebuild | 1 +
 sys-fs/lvm2/lvm2-2.03.16-r2.ebuild | 1 +
 sys-fs/lvm2/lvm2-2.03.17.ebuild    | 1 +
 3 files changed, 3 insertions(+)