qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function)
@ 2015-12-05 11:50 Paul Roland
  2015-12-05 16:23 ` Andrew Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Roland @ 2015-12-05 11:50 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 4966 bytes --]

Hi there, I am trying to create an rpm package out of qemu 2.4.1, thought
maybe it's something obvious and somebody could guide me in the right
direction

As soon as I add --enable-seccomp I get this error on compilation:

qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function)
make: *** [qemu-seccomp.o] Error 1
make: *** Waiting for unfinished jobs....

Other relevant info:

[root@devel SPECS]# rpm -qa | grep secc
libseccomp-2.2.3-0.fc23.x86_64
libseccomp-devel-2.2.3-0.fc23.x86_64
[root@devel SPECS]#

+ ./configure '--extra-cflags=-O2 -g -pipe -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIE -DPIE' --prefix=/usr
--libdir=/usr/lib64 --sysconfdir=/etc --interp-prefix=/usr/qemu-%M
--with-confsuffix=/qemu-kvm --localstatedir=/var --libexecdir=/usr/libexec
--target-list=x86_64-softmmu --disable-qom-cast-debug --disable-vhdx
--disable-libssh2 --disable-glusterfs --enable-seccomp --disable-usb-redir
--disable-libusb --disable-smartcard-nss --disable-libiscsi --disable-spice
--disable-docs --disable-vde --disable-guest-base --disable-bsd-user
--disable-rdma --disable-slirp --disable-bluez --disable-fdt --disable-curl
--disable-curses --disable-vnc-png --disable-vnc-jpeg --disable-vnc-sasl
--disable-vnc-tls --disable-brlapi --disable-xen-pci-passthrough
--disable-xen --disable-cocoa --disable-virtfs --disable-gtk --disable-sdl
--disable-debug-info --disable-debug-tcg --enable-vhost-net --enable-kvm
--enable-linux-user --disable-cap-ng
--block-drv-rw-whitelist=qcow2,raw,file,host_device
--block-drv-ro-whitelist=vmdk,vhdx,vpc --enable-guest-agent
--enable-libssh2 --enable-numa --enable-coroutine-pool --disable-tpm
--disable-snappy --disable-bzip2 --disable-lzo --disable-vnc-tls
--disable-gnutls --disable-vte
Install prefix    /usr
BIOS directory    /usr/share/qemu-kvm
binary directory  /usr/bin
library directory /usr/lib64
module directory  /usr/lib64/qemu-kvm
libexec directory /usr/libexec
include directory /usr/include
config directory  /etc
local state directory   /var
Manual directory  /usr/share/man
ELF interp prefix /usr/qemu-%M
Source path       /root/rpmbuild/BUILD/qemu-2.4.1
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
QEMU_CFLAGS       -I/usr/include/pixman-1    -fPIE -DPIE -m64 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fno-common  -O2 -g -pipe -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIE -DPIE
-Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition -Wtype-limits
-fstack-protector-all
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64
make              make
install           install
python            python -B
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       no
GTK support       no
GNUTLS support    no
GNUTLS hash       no
GNUTLS gcrypt     no
GNUTLS nettle     no ()
VTE support       no
curses support    no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) qcow2 raw file host_device
Block whitelist (ro) vmdk vhdx vpc
VirtFS support    no
VNC support       yes
VNC TLS support   no
VNC SASL support  no
VNC JPEG support  no
VNC PNG support   no
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
GUEST_BASE        no
PIE               yes
vde support       no
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
RDMA support      no
TCG interpreter   no
fdt support       no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
sigev_thread_id   yes
uuid support      yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backends    nop
spice support     no
rbd support       no
xfsctl support    no
nss used          no
libusb            no
usb net redir     no
OpenGL support    no
libiscsi support  no
libnfs support    no
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
seccomp support   yes
coroutine backend ucontext
coroutine pool    yes
GlusterFS support no
Archipelago support no
gcov              gcov
gcov enabled      no
TPM support       no
libssh2 support   yes
TPM passthrough   no
QOM debugging     no
vhdx              no
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support yes
tcmalloc support  no

[-- Attachment #2: Type: text/html, Size: 5872 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function)
  2015-12-05 11:50 [Qemu-devel] qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function) Paul Roland
@ 2015-12-05 16:23 ` Andrew Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Jones @ 2015-12-05 16:23 UTC (permalink / raw)
  To: Paul Roland; +Cc: qemu-devel

On Sat, Dec 05, 2015 at 11:50:36AM +0000, Paul Roland wrote:
> Hi there, I am trying to create an rpm package out of qemu 2.4.1, thought
> maybe it's something obvious and somebody could guide me in the right
> direction
> 
> As soon as I add --enable-seccomp I get this error on compilation:
> 
> qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function)
> make: *** [qemu-seccomp.o] Error 1
> make: *** Waiting for unfinished jobs....
> 
> Other relevant info:
> 
> [root@devel SPECS]# rpm -qa | grep secc
> libseccomp-2.2.3-0.fc23.x86_64
> libseccomp-devel-2.2.3-0.fc23.x86_64
> [root@devel SPECS]#

The issue doesn't reproduce for me when just building v2.4.1 from the source
dir, using your configure line below. I built on an up-to-date F23 guest
using the same libseccomp packages you point out above.

Maybe it's something with the rpmbuild? Somehow not including kernel
headers?

drew


> 
> + ./configure '--extra-cflags=-O2 -g -pipe -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIE -DPIE' --prefix=/usr
> --libdir=/usr/lib64 --sysconfdir=/etc --interp-prefix=/usr/qemu-%M
> --with-confsuffix=/qemu-kvm --localstatedir=/var --libexecdir=/usr/libexec
> --target-list=x86_64-softmmu --disable-qom-cast-debug --disable-vhdx
> --disable-libssh2 --disable-glusterfs --enable-seccomp --disable-usb-redir
> --disable-libusb --disable-smartcard-nss --disable-libiscsi --disable-spice
> --disable-docs --disable-vde --disable-guest-base --disable-bsd-user
> --disable-rdma --disable-slirp --disable-bluez --disable-fdt --disable-curl
> --disable-curses --disable-vnc-png --disable-vnc-jpeg --disable-vnc-sasl
> --disable-vnc-tls --disable-brlapi --disable-xen-pci-passthrough
> --disable-xen --disable-cocoa --disable-virtfs --disable-gtk --disable-sdl
> --disable-debug-info --disable-debug-tcg --enable-vhost-net --enable-kvm
> --enable-linux-user --disable-cap-ng
> --block-drv-rw-whitelist=qcow2,raw,file,host_device
> --block-drv-ro-whitelist=vmdk,vhdx,vpc --enable-guest-agent
> --enable-libssh2 --enable-numa --enable-coroutine-pool --disable-tpm
> --disable-snappy --disable-bzip2 --disable-lzo --disable-vnc-tls
> --disable-gnutls --disable-vte
> Install prefix    /usr
> BIOS directory    /usr/share/qemu-kvm
> binary directory  /usr/bin
> library directory /usr/lib64
> module directory  /usr/lib64/qemu-kvm
> libexec directory /usr/libexec
> include directory /usr/include
> config directory  /etc
> local state directory   /var
> Manual directory  /usr/share/man
> ELF interp prefix /usr/qemu-%M
> Source path       /root/rpmbuild/BUILD/qemu-2.4.1
> C compiler        cc
> Host C compiler   cc
> C++ compiler      c++
> Objective-C compiler cc
> ARFLAGS           rv
> CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> QEMU_CFLAGS       -I/usr/include/pixman-1    -fPIE -DPIE -m64 -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
> -fno-strict-aliasing -fno-common  -O2 -g -pipe -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIE -DPIE
> -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
> -Wold-style-declaration -Wold-style-definition -Wtype-limits
> -fstack-protector-all
> LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64
> make              make
> install           install
> python            python -B
> module support    no
> host CPU          x86_64
> host big endian   no
> target list       x86_64-softmmu
> tcg debug enabled no
> gprof enabled     no
> sparse enabled    no
> strip binaries    yes
> profiler          no
> static build      no
> pixman            system
> SDL support       no
> GTK support       no
> GNUTLS support    no
> GNUTLS hash       no
> GNUTLS gcrypt     no
> GNUTLS nettle     no ()
> VTE support       no
> curses support    no
> curl support      no
> mingw32 support   no
> Audio drivers     oss
> Block whitelist (rw) qcow2 raw file host_device
> Block whitelist (ro) vmdk vhdx vpc
> VirtFS support    no
> VNC support       yes
> VNC TLS support   no
> VNC SASL support  no
> VNC JPEG support  no
> VNC PNG support   no
> xen support       no
> brlapi support    no
> bluez  support    no
> Documentation     no
> GUEST_BASE        no
> PIE               yes
> vde support       no
> netmap support    no
> Linux AIO support yes
> ATTR/XATTR support yes
> Install blobs     yes
> KVM support       yes
> RDMA support      no
> TCG interpreter   no
> fdt support       no
> preadv support    yes
> fdatasync         yes
> madvise           yes
> posix_madvise     yes
> sigev_thread_id   yes
> uuid support      yes
> libcap-ng support no
> vhost-net support yes
> vhost-scsi support yes
> Trace backends    nop
> spice support     no
> rbd support       no
> xfsctl support    no
> nss used          no
> libusb            no
> usb net redir     no
> OpenGL support    no
> libiscsi support  no
> libnfs support    no
> build guest agent yes
> QGA VSS support   no
> QGA w32 disk info no
> seccomp support   yes
> coroutine backend ucontext
> coroutine pool    yes
> GlusterFS support no
> Archipelago support no
> gcov              gcov
> gcov enabled      no
> TPM support       no
> libssh2 support   yes
> TPM passthrough   no
> QOM debugging     no
> vhdx              no
> lzo support       no
> snappy support    no
> bzip2 support     no
> NUMA host support yes
> tcmalloc support  no

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-05 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-05 11:50 [Qemu-devel] qemu-seccomp.c:216: error: '__NR_getcpu' undeclared here (not in a function) Paul Roland
2015-12-05 16:23 ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).