xpack-dev-tools / qemu

A fork of the QEMU project, used to build the xPack QEMU ARM
Other
34 stars 16 forks source link

Fix Linux compilation #24

Closed vit9696 closed 2 years ago

vit9696 commented 2 years ago

memfd_create is provided by all relatively modern Linux distributions. Compiling QEMU on Debian 10 gives me a compiler error "static declaration follows non-static declaration for memfd_create".

ilg-ul commented 2 years ago

Does this still compile on Ubuntu 18.04?

vit9696 commented 2 years ago

Yes.

user@ubuntu:~/Desktop/qemu-stm32$ ./configure --disable-snappy --disable-lzo --disable-tools   --disable-nettle --disable-gcrypt --disable-gnutls --disable-guest-agent   --disable-vde --disable-slirp --disable-curl --disable-docs   --disable-libusb --disable-xfsctl --disable-werror --disable-vnc --disable-curses   --disable-werror --disable-stack-protector --target-list=gnuarmeclipse-softmmu --disable-sdl
user@ubuntu:~/Desktop/qemu-stm32$ make -j16
  ...
  CC      util/memfd.o
  AR      libqemuutil.a
  LINK    qemu-bridge-helper
  LINK    gnuarmeclipse-softmmu/qemu-system-gnuarmeclipse
user@ubuntu:~/Desktop/qemu-stm32$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
ilg-ul commented 2 years ago

Ok. Let's hope that it'll also build in my multi-platform environment, including Raspberry Pi OS. (Actually Ubuntu 18 running inside Docker on top of Raspberry Pi OS 32/64).