geohot / qira

QEMU Interactive Runtime Analyser
MIT License
3.92k stars 471 forks source link

Can't install qira on fedora 30 : memfd_create error #236

Closed hetjagani closed 4 years ago

hetjagani commented 4 years ago

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....
Valoren commented 4 years ago

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$

meowmeowxw commented 4 years ago

Same error on arch linux

lumoe commented 3 years ago

@hetjagani Were you able to resolve this issue?

hetjagani commented 3 years ago

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

c10udlnk commented 3 years ago

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