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+
Status: VERIFIED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


Attachments

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 2.1.11.62 (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
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
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"
DISTDIR="/usr/portage/distfiles"
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"
GENTOO_MIRRORS="ftp://mirror.ovh.net/gentoo-distfiles/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="fr_FR.utf8@euro"
LC_ALL="fr_FR.utf8@euro"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
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
http://sources.gentoo.org/sys-apps/iproute2/iproute2-3.8.0.ebuild?r1=1.11&r2=1.12
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