Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511924 - sys-apps/systemd-213[-kmod] fails to build: src/libsystemd-network/network-internal.h:27:21: fatal error: libkmod.h: No such file or directory
Summary: sys-apps/systemd-213[-kmod] fails to build: src/libsystemd-network/network-in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL: http://lists.freedesktop.org/archives...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-31 06:21 UTC by Guillaume Castagnino
Modified: 2014-05-31 16:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2014-05-31 06:21:15 UTC
Hi,

It seems that udev-213 requires kmod headers even if kmod USE flag is disabled:

/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-fs/udev-213/work/systemd-213  -include ./config.h -DPKGSYSCONFDIR=\"/etc/systemd\" -DSYSTEM_CONFIG_UNIT_P
ATH=\"/etc/systemd/system\" -DSYSTEM_DATA_UNIT_PATH=\"/lib/systemd/system\" -DSYSTEM_SYSVINIT_PATH=\"/etc/init.d\" -DSYSTEM_SYSVRCND_PATH=\"/etc/rc.d\" -DUSER_CONFIG_UNIT_PATH=\"/etc/systemd/user\" -DUSER_DATA_UNIT_PATH=\"/usr/l
ib/systemd/user\" -DCATALOG_DATABASE=\"/var/lib/lib/systemd/catalog/database\" -DSYSTEMD_CGROUP_AGENT_PATH=\"/lib/systemd/systemd-cgroups-agent\" -DSYSTEMD_BINARY_PATH=\"/lib/systemd/systemd\" -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"/l
ib/systemd/systemd-shutdown\" -DSYSTEMD_SLEEP_BINARY_PATH=\"/lib/systemd/systemd-sleep\" -DSYSTEMCTL_BINARY_PATH=\"/bin/systemctl\" -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"/bin/systemd-tty-ask-password-agent\" -DSYSTEMD_S
TDIO_BRIDGE_BINARY_PATH=\"/usr/bin/systemd-stdio-bridge\" -DROOTPREFIX=\"\" -DRANDOM_SEED_DIR=\"/var/lib/lib/systemd/\" -DRANDOM_SEED=\"/var/lib/lib/systemd/random-seed\" -DSYSTEMD_CRYPTSETUP_PATH=\"/lib/systemd/systemd-cryptset
up\" -DSYSTEM_GENERATOR_PATH=\"/lib/systemd/system-generators\" -DUSER_GENERATOR_PATH=\"/usr/lib/systemd/user-generators\" -DSYSTEM_SHUTDOWN_PATH=\"/lib/systemd/system-shutdown\" -DSYSTEM_SLEEP_PATH=\"/lib/systemd/system-sleep\"
 -DSYSTEMD_KBD_MODEL_MAP=\"/usr/share/systemd/kbd-model-map\" -DX_SERVER=\"/usr/bin/X\" -DUDEVLIBEXECDIR=\"/lib/udev\" -DPOLKIT_AGENT_BINARY_PATH=\"/usr/bin/pkttyagent\" -DQUOTACHECK=\"/usr/sbin/quotacheck\" -DKEXEC=\"/usr/sbin/
kexec\" -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src -I ./src/shared -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/shared -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/network -I /var/tmp/portag
e/sys-fs/udev-213/work/systemd-213/src/login -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/journal -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/timedate -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213
/src/timesync -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/resolve -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/systemd -I ./src/core -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/core -I /var/
tmp/portage/sys-fs/udev-213/work/systemd-213/src/libudev -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/udev -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/udev/net -I ./src/udev -I /var/tmp/portage/sys-fs/ud
ev-213/work/systemd-213/src/libsystemd/sd-bus -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/libsystemd/sd-event -I /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/libsystemd/sd-rtnl -I /var/tmp/portage/sys-fs/ud
ev-213/work/systemd-213/src/libsystemd-network  -DFIRMWARE_PATH="\"/lib/firmware/updates/\", \"/lib/firmware/\""  -pipe -Wall -Wextra -Wno-inline -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wsign-compa
re -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarati
ons -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow -Wnested-externs
 -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -ffunction-sections -fdata-sections -fstack-protector -fPIE --param=ssp-buffer-size=4   -I/usr/include/blkid -I/usr/include/uuid   -marc
h=native -O2 -mtune=native -pipe -c -o src/udev/libudev_core_la-udev-builtin-firmware.lo `test -f 'src/udev/udev-builtin-firmware.c' || echo '/var/tmp/portage/sys-fs/udev-213/work/systemd-213/'`src/udev/udev-builtin-firmware.c
In file included from /var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/udev/net/link-config.c:41:0:
/var/tmp/portage/sys-fs/udev-213/work/systemd-213/src/libsystemd-network/network-internal.h:27:21: fatal error: libkmod.h: No such file or directory
 #include <libkmod.h>
                     ^
compilation terminated.
Makefile:13197: recipe for target 'src/udev/net/libudev_core_la-link-config.lo' failed
make: *** [src/udev/net/libudev_core_la-link-config.lo] Error 1
make: *** Attente des tâches non terminées....




# emerge --info udev
Portage 2.2.10 (hardened/linux/amd64/no-multilib, gcc-4.8.2, glibc-2.19, 3.14.4-hardened-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.14.4-hardened-r1-x86_64-Intel-R-_Atom-TM-_CPU_D510_@_1.66GHz-with-gentoo-2.2
KiB Mem:     2030488 total,    317748 free
KiB Swap:    1048704 total,   1046044 free
Timestamp of tree: Sat, 31 May 2014 05:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p47
dev-lang/python:          2.7.6-r1, 3.4.0
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo gcpan xwing local_portage
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://dagobah.xwing.info/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/     http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.tiscali.nl/"
LANG="fr_FR.utf8"
LC_ALL="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/gcpan-portage /usr/local/portage/portage /usr/local/portage/local-portage"
SYNC="rsync://dagobah.xwing.info/gentoo-portage"
USE="acl acpi adobe-cff amd64 bash-completion bashlogger bzip2 caps cli cracklib crypt cxx dri fontconfig fpm hardened iconv idn inotify iproute2 ipv6 ithreads jpeg justify mmx ncurses nls nptl openldap openmp openssl pam pax_kernel pcre png readline sasl session sieve sse sse2 sse3 ssl ssse3 tcpd threads tiff unicode urandom vim-pager vim-syntax xattr xtpax zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi gzip headers_more limit_req limit_conn map proxy realip referer rewrite stub_status upstream_ip_hash userid" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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"
USE_PYTHON="3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-fs/udev-212-r1 was built with the following:
USE="acl firmware-loader -doc -gudev -introspection -kmod (-selinux) -static-libs"
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-31 07:21:21 UTC
Library too, it seems.

I see three options:

1. disable networkd with USE=-kmod (could be a little confusing that kmod controls networkd),

2. add extra USE=networkd and REQUIRED_USE="networkd? ( kmod )". Not sure if there are other reasons to disable networkd,

3. enable kmod unconditionally since it's small and whatever.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-05-31 11:35:28 UTC
(I'll try to fix this later today I hope, but for now...)

Reported this here,

http://lists.freedesktop.org/archives/systemd-devel/2014-May/019634.html
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-05-31 14:07:17 UTC
I went with this for sys-fs/udev,

<snip>
This only works with --disable-networkd as it doesn't cover all of the files. As in, this is Gentoo specific
hack for >=sys-fs/udev-213 only.

http://lists.freedesktop.org/archives/systemd-devel/2014-May/019634.html
http://bugs.gentoo.org/511924

--- src/libsystemd-network/network-internal.c
+++ src/libsystemd-network/network-internal.c
@@ -327,6 +327,7 @@ int net_parse_inaddr(const char *address, unsigned char *family, void *dst) {
         return 0;
 }
 
+#if HAVE_KMOD
 int load_module(struct kmod_ctx *ctx, const char *mod_name) {
         struct kmod_list *modlist = NULL, *l;
         int r;
@@ -361,6 +362,7 @@ int load_module(struct kmod_ctx *ctx, const char *mod_name) {
 
         return r;
 }
+#endif
 
 void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses, size_t size) {
         unsigned i;
--- src/libsystemd-network/network-internal.h
+++ src/libsystemd-network/network-internal.h
@@ -24,7 +24,9 @@
 #include <netinet/ether.h>
 #include <netinet/in.h>
 #include <stdbool.h>
+#if HAVE_KMOD
 #include <libkmod.h>
+#endif
 
 #include "udev.h"
 #include "condition-util.h"
@@ -67,7 +69,9 @@ int net_parse_inaddr(const char *address, unsigned char *family, void *dst);
 
 int net_get_unique_predictable_data(struct udev_device *device, uint8_t result[8]);
 
+#if HAVE_KMOD
 int load_module(struct kmod_ctx *ctx, const char *mod_name);
+#endif
 
 void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses, size_t size);
 int deserialize_in_addrs(struct in_addr **addresses, size_t *size, const char *string);
</snip>

Therefore, reassigning to systemd@g.o, because they use also --enable-networkd, and this patch is not complete.
Comment 4 Mike Gilbert gentoo-dev 2014-05-31 16:49:04 UTC
+  31 May 2014; Mike Gilbert <floppym@gentoo.org> systemd-213.ebuild,
+  systemd-9999.ebuild:
+  Forcably enable kmod due to bug 511924.