libvirt-6.8.0 fails compile /usr/local/include/linux/kvm.h:240:9: error: duplicate member ‘padding’ 240 | __u64 padding; | ^~~~~~~ ../libvirt-6.8.0/src/util/virhostcpu.c: In function ‘virHostCPUGetTscInfo’: ../libvirt-6.8.0/src/util/virhostcpu.c:1386:29: error: ‘KVM_GET_TSC_KHZ’ undeclared (first use in this function) 1386 | if ((rc = ioctl(vcpuFd, KVM_GET_TSC_KHZ)) < 0) { | ^~~~~~~~~~~~~~~ ../libvirt-6.8.0/src/util/virhostcpu.c:1386:29: note: each undeclared identifier is reported only once for each function it appears in ninja: build stopped: subcommand failed. * ERROR: app-emulation/libvirt-6.8.0::gentoo failed (compile phase): * ninja -v -j1 -l0 -C /var/tmp/portage/app-emulation/libvirt-6.8.0/work/libvirt-6.8.0-build failed Reproducible: Always Actual Results: FAILED: src/util/libvirt_util.a.p/virhostcpu.c.o gcc -Isrc/util/libvirt_util.a.p -Isrc/util -I../libvirt-6.8.0/src/util -Iinclude -I../libvirt-6.8.0/include -Isrc -I../libvirt-6.8.0/src -I. -I../libvirt-6.8.0 -I/usr/include/p11-kit-1 -I/usr/include/libnl3 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libxml2 -I/usr/include/yajl -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -fno-common -W -Wabsolute-value -Waddress -Waddress-of-packed-member -Waggressive-loop-optimizations -Wall -Wattribute-warning -Wattributes -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcannot-profile -Wcast-align -Wcast-align=strict -Wcast-function-type -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeclaration-after-statement -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wif-not-aligned -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-attributes -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-profile -Wmissing-prototypes -Wmultichar -Wmultistatement-macros -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wpacked-not-aligned -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wstringop-truncation -Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wno-sign-compare -Wno-cast-function-type -Wjump-misses-init -Wswitch-enum -Wno-format-nonliteral -Wno-format-truncation -Wframe-larger-than=4096 -fexceptions -fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -fstack-protector-strong -Wdouble-promotion -O2 -march=native -fomit-frame-pointer -fPIC -pthread -DIN_LIBVIRT '-Dabs_top_builddir="/var/tmp/portage/app-emulation/libvirt-6.8.0/work/libvirt-6.8.0-build"' '-Dabs_top_srcdir="/var/tmp/portage/app-emulation/libvirt-6.8.0/work/libvirt-6.8.0"' -MD -MQ src/util/libvirt_util.a.p/virhostcpu.c.o -MF src/util/libvirt_util.a.p/virhostcpu.c.o.d -o src/util/libvirt_util.a.p/virhostcpu.c.o -c ../libvirt-6.8.0/src/util/virhostcpu.c In file included from ../libvirt-6.8.0/src/util/virhostcpu.c:32: /usr/local/include/linux/kvm.h:240:9: error: duplicate member ‘padding’ 240 | __u64 padding; | ^~~~~~~ ../libvirt-6.8.0/src/util/virhostcpu.c: In function ‘virHostCPUGetTscInfo’: ../libvirt-6.8.0/src/util/virhostcpu.c:1386:29: error: ‘KVM_GET_TSC_KHZ’ undeclared (first use in this function) 1386 | if ((rc = ioctl(vcpuFd, KVM_GET_TSC_KHZ)) < 0) { | ^~~~~~~~~~~~~~~ ../libvirt-6.8.0/src/util/virhostcpu.c:1386:29: note: each undeclared identifier is reported only once for each function it appears in ninja: build stopped: subcommand failed.
Created attachment 663697 [details] build log
emerge --info '=app-emulation/libvirt-6.8.0::gentoo' Portage 3.0.8 (python 3.8.6-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.32-r2, 5.8.12-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.8.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-glibc2.2.5 KiB Mem: 32837352 total, 5064420 free KiB Swap: 6291452 total, 6290136 free Timestamp of repository gentoo: Sun, 04 Oct 2020 01:07:17 +0000 Head commit of repository gentoo: fbae33cd3d9bc903d2fbc6f1551da8f4d14e8854 Head commit of repository audio-overlay: 583472998a13e9344c18fc0380fd9d967ab500b8 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.1 p1) 2.35.1 app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0_rc2::gentoo dev-util/cmake: 3.18.3::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.2::gentoo sys-devel/binutils: 2.35.1::gentoo sys-devel/gcc: 10.2.0-r2::gentoo sys-devel/gcc-config: 2.3.2::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git priority: -1000 audio-overlay location: /usr/local/portage/audio-overlay sync-type: git sync-uri: https://github.com/gentoo-audio/audio-overlay.git masters: gentoo
tcgOverlay location: /usr/local/portage masters: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CC="gcc" CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" 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" CXX="g++" CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --autounmask-keep-masks" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O2 -Wl,--as-needed" LINGUAS="en_US en" MAKEOPTS="V=1 -j1" 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 --timeo ut=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac aalib acl acpi activities aes alsa amd64 amr apache2 audiofile avx bash-completion berkdb bluray branding btrfs bzip2 cairo caps cdaudio cdda cd db cdparanoia cdr cdrdao chm chromecast cleartype cli corefonts crypt cups curl dbus declarative djvu dri dssi dts dv dvb dvd dvdr ebook egl emboss encode exif fam fdk ffmpeg flac fortran gdbm gif gles2 gmp google gphoto2 gpm gstreamer gtk gtk3 gui iconv icu imagemagick imap imlib introspection ipv6 jack java jpeg jp eg2k kde kipi kpathsea kvm kwallet ladspa lame lash lcms libffi libglvnd libinput libnotify libtirpc linguas_en_US lv2 lzma mad marble midi mmap mmx mmxext mng mozilla mp3 mp4 mpeg mtp multimedia musicbrainz ncurses network nls nodrm nptl nsplugin nvenc nvidia ofx ogg opencl openexr opengl openmp opus pam pango pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qemu qml qt5 readline rtmp sasl scanner sdl seccomp semantic-desktop slp smp sndfile speex spell split-u sr sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg systemd theora threads tiff tk transparency truetype type1 udev udisks unicode unw ind upower usb v4l vaapi vcd vdpau vim-syntax vorbis vpx vst wav wavpack wayland webp widgets wmf wxwidgets x264 x265 xattr xcb xcomposite xine xkb xml xscreen saver xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" APACHE2_MODULES="authn_core aut hz_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_ho st 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="author braindum p flow karbon kexi krita sheets stage words" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk33 01 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INP UT_DEVICES="libinput wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presente r-console presenter-minimizer" NGINX_MODULES_HTTP="autoindex fancyindex fastcgi gzip" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" PO STGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="(-python2_7) (-python3_6) python3_7 python3_8" QEMU_SOFTMMU_TARGETS="x8 6_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="(-ruby23) (-ruby24) (-ruby25) (-ruby26) ruby27" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpm ac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to Chris Smith from comment #0) > libvirt-6.8.0 fails compile > /usr/local/include/linux/kvm.h:240:9: error: duplicate member ‘padding’ Would you mind to elaborate where '/usr/local/include/linux/kvm.h' comes from? Your userland should provide '/usr/include/linux/kvm.h' installed by sys-kernel/linux-headers-5.4-r1 (or later).
(In reply to Matthias Maier from comment #4) > (In reply to Chris Smith from comment #0) > > libvirt-6.8.0 fails compile > > /usr/local/include/linux/kvm.h:240:9: error: duplicate member ‘padding’ > > Would you mind to elaborate where '/usr/local/include/linux/kvm.h' comes > from? > Your userland should provide '/usr/include/linux/kvm.h' installed by > sys-kernel/linux-headers-5.4-r1 (or later). I'd love to but I haven't a clue. The file is dated 2008. This system was originally installed back in 2006, possibly earlier. At the least a testament to Gentoo's "rolling release" capabilities. I'll delete those files and try again. Thanks.
(In reply to Chris Smith from comment #5) > (In reply to Matthias Maier from comment #4) Removal of the /usr/local/include/linux/ directory (had 2 files in it) solved the issue. Nice catch!