Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467716 - sys-apps/iproute2-3.8.0: installed libnetlink.h requires linux-headers-3.8+
Summary: sys-apps/iproute2-3.8.0: installed libnetlink.h requires linux-headers-3.8+
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2013-04-28 10:20 UTC by Didier Barvaux
Modified: 2013-04-28 21:56 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Didier Barvaux 2013-04-28 10:20:51 UTC
The sys-apps/iproute2-3.8.0 ebuild on amd64 provides a broken /usr/include/libnetlink.h header file. The header file depends on /usr/include/linux/netconf.h that is not present on my system.

The linux/netconf.h header file seems to be introduced by the Linux kernel 3.8. However I got sys-kernel/linux-headers-3.7 installed on my system, and sys-apps/iproute2-3.8.0 does not depend on sys-kernel/linux-headers-3.8.

After installing sys-kernel/linux-headers-3.8 manually (with ACCEPT_KEYWORDS=~amd64), libnetlink.h is not broken anymore. However, other ebuilds/application may be broken by that change, so I had to revert it.

As far as I know, no ebuild seems broken by the problem described, but my own application is broken because of that problem.

Reproducible: Always

Steps to Reproduce:
1. Be sure to have <=sys-kernel/linux-headers-3.7 installed
2. emerge -v1 '=sys-apps/iproute2-3.8.0'
3. gcc -Wall -Werror -o test_libnetlink test_libnetlink.c

Actual Results:  
Console output for step 3:

In file included from test_libnetlink.c:4:0:
/usr/include/libnetlink.h:12:27: fatal error: linux/netconf.h: No such file or directory
compilation terminated.

Expected Results:  
No console output for step 3, then:
$ file test_libnetlink
test_libnetlink: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

Here is the small test file mentioned in steps to reproduce:

$ cat test_libnetlink.c

#include <stdlib.h>
#include <stdio.h>
#include <libnetlink.h>

int main(int argc, char *argv[])
	printf("test libnetlink.h\n");
	return 0;
Comment 1 Didier Barvaux 2013-04-28 10:21:56 UTC
# emerge --info
Portage (hardened/linux/amd64/no-multilib, gcc-4.5.4, glibc-2.15-r3, 3.8.4-gentoo-mout-01 x86_64)
System uname: Linux-3.8.4-gentoo-mout-01-x86_64-Intel-R-_Xeon-R-_CPU_E3-1245_V2_@_3.40GHz-with-gentoo-2.2
KiB Mem:    32916312 total,    378088 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Thu, 25 Apr 2013 17:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
CFLAGS="-march=nocona -O2 -pipe"
CONFIG_PROTECT="/etc /usr/lib64/python2.7/site-packages/buildbot/status/web /usr/share/gnupg/qualified.txt /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="acl acpi amd64 berkdb bzip2 cli cracklib crypt cxx dbus dri gdbm gpm hal hardened iconv ipv6 justify mmx modules mudflap ncurses nls nptl ntpl ntplonly openmp pam pax_kernel pcre readline session sse sse2 ssl tcpd unicode urandom 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user deflate dir expires ext_filter filter headers ident include log_config logio mime mime_magic negotiation rewrite setenvif so unique_id userdir vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" 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 ubx" GRUB_PLATFORMS="pc" 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 en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" 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"
Comment 2 SpanKY gentoo-dev 2013-04-28 16:49:48 UTC
we can probably delete the include from the installed header as it seems like only internal code needs it ...
Comment 3 SpanKY gentoo-dev 2013-04-28 17:07:27 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix building w/older linux-headers
Comment 4 Didier Barvaux 2013-04-28 18:17:04 UTC
Emerging again iproute2 fixed the problem. Thank you SpanKY!

If the include is not needed, maybe this should be fixed upstream. What do you think of?
Comment 5 SpanKY gentoo-dev 2013-04-28 18:19:07 UTC
(In reply to comment #4)

libnetlink is a bit of a gray area.  upstream doesn't install it, but some distros do.  the API can not be relied upon to be stable, and upstream keeps the header in a way that makes their lives building their code easy.
Comment 6 Didier Barvaux 2013-04-28 18:25:23 UTC
(In reply to comment #5)
> libnetlink is a bit of a gray area.  upstream doesn't install it, but some
> distros do.  the API can not be relied upon to be stable, and upstream keeps
> the header in a way that makes their lives building their code easy.

OK. Great to know! Do you know what's the "official" API recommended by upstream?
Comment 7 SpanKY gentoo-dev 2013-04-28 21:56:01 UTC
(In reply to comment #6)

i don't think there is one