Attempting emerge --update, dev-db/redis-6.0.9-r100 fails in compilation due to missing header file x86_64-pc-linux-gnu-gcc -std=c11 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe -DENABLE_CJSON_GLOBAL -I../deps/hiredis -I../deps/linenoise -I/usr/include/lua5.1 -DHAVE_LIBSYSTEMD -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -MMD -o zmalloc.o -c zmalloc.c In file included from server.c:30: server.h:54:10: fatal error: systemd/sd-daemon.h: No such file or directory 54 | #include <systemd/sd-daemon.h> | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. I have a systemd-free gentoo build, using "-systemd" in make.conf and have sys-auth/elogind installed. emerge --info: Portage 3.0.13 (python 3.7.9-final-0, default/linux/amd64/17.0, gcc-9.3.0, glibc-2.32-r5, 5.10.6-gentoo x86_64) ================================================================= System uname: Linux-5.10.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-4810MQ_CPU_@_2.80GHz-with-gentoo-2.7 KiB Mem: 16299588 total, 6260952 free KiB Swap: 53513300 total, 53513300 free Timestamp of repository gentoo: Tue, 26 Jan 2021 09:30:01 +0000 Head commit of repository gentoo: 4827b00977b4373ed05e98ece169ee11ceabf1fa sh bash 5.0_p18 ld GNU ld (Gentoo 2.34 p6) 2.34.0 app-shells/bash: 5.0_p18::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 2.7.18-r6::gentoo, 3.6.12-r2::gentoo, 3.7.9-r2::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo, 3.10.0_alpha4::gentoo dev-util/cmake: 3.19.3::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.3-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo, 2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo, 2.30-r4::gentoo, 2.31.1-r6::gentoo, 2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34-r2::gentoo sys-devel/gcc: 4.5.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo, 7.2.0-r1::gentoo, 8.2.0-r6::gentoo, 8.3.0-r3::gentoo, 9.1.0-r1::gentoo, 9.2.0-r4::gentoo, 9.3.0-r2::gentoo, 10.2.0-r5::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 science location: /var/lib/layman/science masters: gentoo priority: 1 unity-gentoo location: /var/lib/layman/unity-gentoo masters: gentoo priority: 2 crossdev location: /opt/portage masters: gentoo science priority: 3 x-portage location: /local/portage masters: gentoo priority: 4 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/lib/i2pd/certificates" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://147.251.48.205/pub/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://86.49.49.49/pub/gentoo/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://141.76.119.131/pub/mirrors/gentoo ftp://ftp.sh.cvut.cz/MIRRORS/gentoo ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.supp.name/ rsync://gentoo.mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/" LANG="C" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/scratch/tmp" USE="X acl aes alsa amd64 berkdb bluetooth bzip2 cli crypt cups dri fortran gcj gdbm hal iconv ipv6 lapack latex libglvnd libtirpc linguas_cs linguas_de linguas_en linguas_nl linguas_sk mbox mmx multilib multislot ncurses nls nptl openmp pam pcre readline seccomp split-usr sse sse2 sse3 sse4 ssl static-libs systemtap tcpd tetex unicode webp xattr zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7 python3_8 python3_9" RUBY_TARGETS="ruby25 ruby26 ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau vesa nv fbdev v4l vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
-DHAVE_LIBSYSTEMD Odd, my own build doesn't have that and builds fine without systemd. Seems the build system looks for "pkg-config --exists libsystemd && echo exists", does it say exists for you? Perhaps you have partial leftover files confusing the build system. Also please attach full build.log when reporting build failures, helps in figuring these things out. That aside, I guess this package could explicitly pass USE_SYSTEMD=yes/no env so it's not automagic.
"pkg-config --exists libsystemd && echo exists" returns "exists" I have a libsystemd.pc, which is however not leftover, but from the elogind package installed on the system: lrwxrwxrwx 1 root root 13 Dec 17 20:44 /usr/lib/pkgconfig/libsystemd.pc -> libelogind.pc I have found a workaround: cd /usr/include; ln -s elogind/systemd systemd Then the include file is found and compilation successfull. I guess the build system should be more strict in distinguishing elogind from systemd, or elogind package shoud be fixed to provide symbolic link to /usr/include/systemd as well.
Hm, elogind doesn't install a libsystemd.pc for me, only a libelogind.pc and no symlink. Maybe something odd to do with still being on a 17.0 profile? Unless something else I don't know about.
(In reply to Ionen Wolkens from comment #3) > Hm, elogind doesn't install a libsystemd.pc for me, only a libelogind.pc and > no symlink. Maybe something odd to do with still being on a 17.0 profile? > Unless something else I don't know about. Please migrate to 17.1, ensure everything is clean, including nothing in /usr/local/*, and we can proceed from there.