Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518568 - app-emulation/libvirt-1.2.6 - util/virnuma.c:428:34: error: 'numa_nodes_ptr' undeclared (first use in this function)
Summary: app-emulation/libvirt-1.2.6 - util/virnuma.c:428:34: error: 'numa_nodes_ptr' ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-30 09:08 UTC by Bernd Feige
Modified: 2014-08-06 03:22 UTC (History)
5 users (show)

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


Attachments
build.log output (build.log,442.62 KB, text/plain)
2014-07-30 09:24 UTC, Bernd Feige
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2014-07-30 09:08:54 UTC
On a current ~amd64 system, compilation fails when trying to compile util/virnuma.c:
util/virnuma.c: In function 'virNumaNodeIsAvailable':
util/virnuma.c:428:5: warning: implicit declaration of function 'numa_bitmask_isbitset' [-Wimplicit-function-declaration]
     return numa_bitmask_isbitset(numa_nodes_ptr, node);
     ^
util/virnuma.c:428:5: warning: nested extern declaration of 'numa_bitmask_isbitset' [-Wnested-externs]
util/virnuma.c:428:34: error: 'numa_nodes_ptr' undeclared (first use in this function)
     return numa_bitmask_isbitset(numa_nodes_ptr, node);
                                  ^
util/virnuma.c:428:34: note: each undeclared identifier is reported only once for each function it appears in
util/virnuma.c: In function 'virNumaGetDistances':
util/virnuma.c:479:9: warning: implicit declaration of function 'numa_distance' [-Wimplicit-function-declaration]
         (*distances)[i] = numa_distance(node, i);
         ^
util/virnuma.c:479:9: warning: nested extern declaration of 'numa_distance' [-Wnested-externs]
util/virnuma.c: In function 'virNumaNodeIsAvailable':
util/virnuma.c:429:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:8640: recipe for target 'util/libvirt_util_la-virnuma.lo' failed


Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-30 09:13:09 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Bernd Feige 2014-07-30 09:23:14 UTC
Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.15.7-gentoo x86_64)
=================================================================
System uname: Linux-3.15.7-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9650_@_3.00GHz-with-gentoo-2.2
KiB Mem:     8106548 total,    668248 free
KiB Swap:    3903752 total,   3792140 free
Timestamp of tree: Wed, 30 Jul 2014 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.8, 3.4.1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo bfown science mysql
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/gentoo/packages/x64"
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="/diskB/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/gentoo/overlay /var/lib/layman/science /var/lib/layman/mysql"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext R X a52 aac acl acpi afs alsa amd64 audit bacula-clientonly bash-completion berkdb blas bluetooth btrfs bzip2 cairo caps cddb cdparanoia cdr cli clutter colord colorio cpudetection cracklib crypt cscope cups cxx dbus dga djvu dri dv dvd dvdr dvdread dvi eds enblend encode evo excel exif ext4 extrafilters faac ffmpeg fftw firefox flac fluidsynth fontconfig fortran fuse g3dvl gdbm gif gimp gmp gnome gnome-keyring gnutls graphics graphviz gs gstreamer gtk gtk3 hddtemp hdri iconv icu id3tag imagemagick ipv6 jabber jack java java6 javascript jbig jingle jpeg jpeg2k kerberos kpathsea ladspa lame lapack latex lcms ldap lensfun libnotify libsamplerate lm_sensors lyx lzma lzo mad matplotlib matroska md5sum midi mjpeg mmx mmxext mng modules mp2 mp3 mpeg multilib musepack nautilus ncurses networkmanager nls nptl ofx ogg openal opencv openexr opengl openmp otr pam pcre pda pdf playlist plotutils plugins png pnm policykit postgres postscript pulseaudio python qt3support quicktime radio rar readline real rtc rtmp sbsms scanner science sdl sendto session sift sndfile sound soundtouch speex spell sqlite sse sse2 ssl ssse3 svg systemd t1lib taglib tcpd theora threads tiff tivo tracker truetype twolame udev udisks umfpack unicode v4l vamp vim-syntax vim-with-x vorbis vpx webkit webp win32codecs wmf x264 xattr xcomposite xetex xinerama xml xmp xmpp xps xulrunner xv xvid xvmc zlib zoran" ABI_X86="64 32" 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="canon ptp2 samsung" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby21" SANE_BACKENDS="hp5590 mustek" USERLAND="GNU" VIDEO_CARDS="radeon" 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, USE_PYTHON
Comment 3 Bernd Feige 2014-07-30 09:24:21 UTC
Created attachment 381892 [details]
build.log output
Comment 4 Victor Roman Archidona 2014-07-30 09:44:56 UTC
This bug has been fixed upstream:

https://www.redhat.com/archives/libvir-list/2014-July/msg01076.html

Applying the provided patch in previous email fixes the compilation error when USE="-numa" (default).
Comment 5 Chris Smith 2014-07-30 16:52:09 UTC
Same problem here. Can we get this confirmed and the patch added?
Comment 6 Geaaru 2014-07-30 17:39:11 UTC
Hi,
if I insert patch (https://www.redhat.com/archives/libvir-list/2014-July/msg01076.html) under /etc/portage/patches directory than I resolve this problem relative to virnuma.c file.
However, I receive another error about wireshark library, probably libvirt-1.2.6 isn't compliant with wireshark-1.12.0_rc3.
Hereinafter, exception:

Makefile:1935: recipe for target 'libvirt_la-plugin.lo' failed
make[3]: *** [libvirt_la-plugin.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
packet-libvirt.c: In function 'dissect_libvirt_payload_xdr_data':
packet-libvirt.c:309:5: warning: passing argument 1 of 'tvb_memdup' from incompatible pointer type [enabled by default]
     payload_data = (caddr_t)tvb_memdup(payload_tvb, 0, payload_length);
     ^
In file included from /usr/include/wireshark/epan/proto.h:52:0,
                 from packet-libvirt.c:27:
/usr/include/wireshark/epan/tvbuff.h:448:55: note: expected 'struct wmem_allocator_t *' but argument is of type 'struct tvbuff_t *'
 WS_DLL_PUBLIC void *tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb,
                                                       ^
packet-libvirt.c:309:5: error: too few arguments to function 'tvb_memdup'
     payload_data = (caddr_t)tvb_memdup(payload_tvb, 0, payload_length);
     ^
In file included from /usr/include/wireshark/epan/proto.h:52:0,
                 from packet-libvirt.c:27:
/usr/include/wireshark/epan/tvbuff.h:448:55: note: declared here
 WS_DLL_PUBLIC void *tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb,
                                                       ^
packet-libvirt.c: In function 'dissect_libvirt':
packet-libvirt.c:426:5: warning: passing argument 7 of 'tcp_dissect_pdus' from incompatible pointer type [enabled by default]
     tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4, get_message_len, dissect_libvirt_message);
     ^
In file included from packet-libvirt.c:29:0:
/usr/include/wireshark/epan/dissectors/packet-tcp.h:111:1: note: expected 'new_dissector_t' but argument is of type 'void (*)(struct tvbuff_t *, struct packet_info *, struct proto_tree *)'
 tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 ^
packet-libvirt.c:426:5: error: too few arguments to function 'tcp_dissect_pdus'
     tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4, get_message_len, dissect_libvirt_message);
     ^
In file included from packet-libvirt.c:29:0:
/usr/include/wireshark/epan/dissectors/packet-tcp.h:111:1: note: declared here
 tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,


I try to downgrade to wireshark 1.10.8-rc1 and/or disable pcap use flag.
Comment 7 Geaaru 2014-07-30 17:58:15 UTC
I confirm that with patch and with a downgrade to wireshark-1.10.8-r1 all works fine.

Bye
Comment 8 Victor Roman Archidona 2014-07-30 18:39:00 UTC
(In reply to Geaaru from comment #7)
> I confirm that with patch and with a downgrade to wireshark-1.10.8-r1 all
> works fine.
> 
> Bye

Hi,

I think the wireshark thing must be treated as a separate bug report, we may wait until some Gentoo dev decides.

In the meanwhile you can try this patch which should fix your wireshark issue:

https://www.redhat.com/archives/libvir-list/2014-July/msg00362.html
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-31 08:13:12 UTC
(In reply to Victor Roman Archidona from comment #8)
> I think the wireshark thing must be treated as a separate bug report, we may
> wait until some Gentoo dev decides.

That's bug #508336.
Comment 10 Juergen Rose 2014-07-31 09:48:06 UTC
(In reply to Victor Roman Archidona from comment #8)
> (In reply to Geaaru from comment #7)
> > I confirm that with patch and with a downgrade to wireshark-1.10.8-r1 all
> > works fine.
> > 
> > Bye
> 
> Hi,
> 
> I think the wireshark thing must be treated as a separate bug report, we may
> wait until some Gentoo dev decides.
> 
> In the meanwhile you can try this patch which should fix your wireshark
> issue:
> 
> https://www.redhat.com/archives/libvir-list/2014-July/msg00362.html

Neither this patch nor the patches referenced at Comment 5 of https://bugs.gentoo.org/show_bug.cgi?id=508336 help me to compile libvirt-1.2.[56] with wireshark-1.12.0_rc*. I get everytime:


plugin.c:16:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 WS_DLL_PUBLIC_NOEXTERN void
                        ^
plugin.c:21:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 WS_DLL_PUBLIC_NOEXTERN void
                        ^
Makefile:1940: recipe for target 'libvirt_la-plugin.lo' failed
make[3]: *** [libvirt_la-plugin.lo] Error 1
Comment 11 Juergen Rose 2014-07-31 09:56:21 UTC
(In reply to Juergen Rose from comment #10)
> (In reply to Victor Roman Archidona from comment #8)
> > (In reply to Geaaru from comment #7)
> > > I confirm that with patch and with a downgrade to wireshark-1.10.8-r1 all
> > > works fine.
> > > 
> > > Bye
> > 
> > Hi,
> > 
> > I think the wireshark thing must be treated as a separate bug report, we may
> > wait until some Gentoo dev decides.
> > 
> > In the meanwhile you can try this patch which should fix your wireshark
> > issue:
> > 
> > https://www.redhat.com/archives/libvir-list/2014-July/msg00362.html
> 
> Neither this patch nor the patches referenced at Comment 5 of
> https://bugs.gentoo.org/show_bug.cgi?id=508336 help me to compile
> libvirt-1.2.[56] with wireshark-1.12.0_rc*. I get everytime:
> 
> 
> plugin.c:16:24: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'void'
>  WS_DLL_PUBLIC_NOEXTERN void
>                         ^
> plugin.c:21:24: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'void'
>  WS_DLL_PUBLIC_NOEXTERN void
>                         ^
> Makefile:1940: recipe for target 'libvirt_la-plugin.lo' failed
> make[3]: *** [libvirt_la-plugin.lo] Error 1


Maybe I should be a little bit more verbose. It fails with:

libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../src -I../../../include -I../../../gnulib/lib -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/bin/../include/wireshark -march=native -O2 -pipe -c plugin.c  -fPIC -DPIC -o .libs/libvirt_la-plugin.o
plugin.c:12:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
 WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION;
                        ^
plugin.c:16:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 WS_DLL_PUBLIC_NOEXTERN void


So it can be seen that the include pathes are as expected from the patch.
Comment 12 Yury Katuar 2014-07-31 22:35:54 UTC
> libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I.
> -I../../.. -I../../.. -I../../../src -I../../../include
> -I../../../gnulib/lib -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/bin/../include/wireshark -march=native -O2 -pipe -c plugin.c  -fPIC
> -DPIC -o .libs/libvirt_la-plugin.o
> plugin.c:12:24: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'const'
>  WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION;


Confirm the same problem compiling on x86 with wireshark-1.12.0_rc3:

libtool: compile:  i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/bin/../include/wireshark -march=core2 -O2 -pipe -fomit-frame-pointer -c plugin.c  -fPIC -DPIC -o .libs/libvirt_la-plugin.o
plugin.c:12:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
 WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION;
                        ^
plugin.c:16:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 WS_DLL_PUBLIC_NOEXTERN void
                        ^
plugin.c:21:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 WS_DLL_PUBLIC_NOEXTERN void
                        ^
Makefile:1935: recipe for target 'libvirt_la-plugin.lo' failed
Comment 13 Patrick Lauer gentoo-dev 2014-08-06 03:22:33 UTC
+  06 Aug 2014; Patrick Lauer <patrick@gentoo.org>
+  +files/libvirt-1.2.6-numa.patch, libvirt-1.2.6.ebuild:
+  Add upstream patch to fix USE=-numa #518568
+