Current (git) libvirt doesn't compile with --enable-compile-warnings=error because of /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined Various distros fixed this by simply removing the inline keyword, which is what the attached patch does as well. Reproducible: Always Steps to Reproduce: 1. git clone libvirt 2. autogen.sh --enable-compile-warnings=error 3. make # emerge --info Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, libc-0-r0, 2.6.38.4t x86_64) ================================================================= System uname: Linux-2.6.38.4t-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-gentoo-1.12.14 Timestamp of tree: Fri, 06 May 2011 05:15:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.4.6, 2.5.4-r4, 2.6.6-r2, 2.7.1-r1 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.4_p6-r1, 1.5-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 sys-kernel/linux-headers: 2.6.38 sys-libs/glibc: 2.11.3 virtual/os-headers: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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="-march=core2 -O2 -pipe -msse3" DISTDIR="/gentoo/distfiles" FEATURES="assume-digests binpkg-logs collision-protect distlocks fakeroot fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="" GENTOO_MIRRORS="ftp://ftp.fit.vutbr.cz/pub/systems/gentoo http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="cs_CZ.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/gentoo/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/gentoo/temp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/gentoo/overlay" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X aac acl acpi alsa amd64 bash-completion berkdb bluetooth bzip2 cli cracklib crypt cups cxx dri exif fam fortran gdbm gpm gtk iconv ipv6 jpeg lcms libnotify logrotate lzma mmx mmxext mng modules mp3 mudflap multilib ncurses nptl nptlonly ogg opengl openmp pam pcre perl png pppd python raw readline resolvconf sdl session sse sse2 ssl ssse3 svg sysfs tcpd tiff truetype unicode vim-syntax vorbis wma wmf xinerama xorg xv zlib" ALSA_CARDS="hda-intel" 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 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" 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" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="net epson epson2" USERLAND="GNU" VIDEO_CARDS="intel" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 272585 [details, diff] Additional patch to libnl-1.1
diff -u libnl-1.1-r2.ebuild libnl-1.1-r3.ebuild --- libnl-1.1-r2.ebuild 2011-03-29 16:31:07.000000000 +0200 +++ libnl-1.1-r3.ebuild 2011-05-09 10:38:08.097406937 +0200 @@ -22,6 +22,7 @@ epatch "${FILESDIR}"/${P}-minor-leaks.patch epatch "${FILESDIR}"/${P}-glibc-2.8-ULONG_MAX.patch epatch "${FILESDIR}"/${P}-flags.patch + epatch "${FILESDIR}"/${P}-inline.patch } src_compile() {
latest libvirt still have warning: /usr/include/netlink/object.h:58:23: warning: inline function 'nl_object_priv' declared but never defined /usr/include/netlink/object.h:58:23: warning: inline function 'nl_object_priv' declared but never defined Libvrit compiles with gcc -std=c99 flag. In libnl specified extern inline function nl_object_priv and function body specified in .c file. This is wrong for c99 standard and it is problem of libnl, not of libvirt Is it possible to push this patch for libnl to the upstream? This patch developed 1 y ago, and still not in upstream P.S. I tested patch, it works fine
DEPEND in the libvirt ebuilds suggests that it should work fine with any dev-libs/libnl in the tree, including the 3.* series.
(In reply to comment #4) > DEPEND in the libvirt ebuilds suggests that it should work fine with any > dev-libs/libnl in the tree, including the 3.* series. Scratch that. Sorry.
Fixed in dev-libs/libnl-1.1-r3.
Jeroen Roovers, thanks