geohot/qira

Can't install qira on fedora 30 : memfd_create error

hetjagani opened this issue · 5 comments

I have fetched and installed all the dependencies that are required because I thought that might be the problem. But then too the following error is coming in the install process. Please improve the install process to completely support fedora. Below is the error :

util/memfd.c:43:12: error: static declaration of ‘memfd_create’ follows non-static declaration
   43 | static int memfd_create(const char *name, unsigned int flags)
      |            ^~~~~~~~~~~~
In file included from /usr/include/bits/mman-linux.h:111,
                 from /usr/include/bits/mman.h:34,
                 from /usr/include/sys/mman.h:41,
                 from /home/het/qira-1.3/tracers/qemu/qemu-latest/include/qemu/osdep.h:142,
                 from util/memfd.c:28:
/usr/include/bits/mman-shared.h:50:5: note: previous declaration of ‘memfd_create’ was here
   50 | int memfd_create (const char *__name, unsigned int __flags) __THROW;
      |     ^~~~~~~~~~~~
make: *** [/home/het/qira-1.3/tracers/qemu/qemu-latest/rules.mak:57: util/memfd.o] Error 1
make: *** Waiting for unfinished jobs....

Same error when installing under WSL on Windows 10 with Ubuntu.

util/memfd.c:43:12: error: static declaration of ‘memfd_create’ follows non-static declaration
static int memfd_create(const char *name, unsigned int flags)
^~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
from /mnt/c/Users/mique_000/Desktop/qira/tracers/qemu/qemu/include/qemu/osdep.h:142,
from util/memfd.c:28:
/usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
int memfd_create (const char *__name, unsigned int __flags) __THROW;
^~~~~~~~~~~~
CC util/bitmap.o
/mnt/c/Users/mique_000/Desktop/qira/tracers/qemu/qemu/rules.mak:57: recipe for target 'util/memfd.o' failed
make: *** [util/memfd.o] Error 1
make: *** Waiting for unfinished jobs....
CC util/bitops.o
miquel@Miquel:/mnt/c/Users/mique_000/Desktop/qira$

Same error on arch linux

lumoe commented

@hetjagani Were you able to resolve this issue?

Try removing static from util/memfd.c:43:12

I used apt install qemu to install QEMU separately and commented out the statement for installing QEMU in ./install.sh. Then the error did not recur. (WSL too)
(but unluckily another error happened in the following process. X_X