Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

./build_qemu_support.sh broken on debian buster #14

Closed
dbrumley opened this issue Aug 26, 2019 · 10 comments
Closed

./build_qemu_support.sh broken on debian buster #14

dbrumley opened this issue Aug 26, 2019 · 10 comments

Comments

@dbrumley
Copy link

When I compile on debian buster (I used dockerhub), qemu fails to build due a conflict with memfd_create (perhaps due to newer libc's including this name). I've not been following qemu dev, so it could just be the version used by AFL needs to be updated.

Here is the build error:

 CC      util/memfd.o
util/memfd.c:40: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:117,
                 from /usr/include/x86_64-linux-gnu/bits/mman.h:49,
                 from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
                 from /workdir/AFL-2.53b/qemu_mode/qemu-2.10.0/include/sysemu/os-posix.h:29,
                 from /workdir/AFL-2.53b/qemu_mode/qemu-2.10.0/include/qemu/osdep.h:104,
                 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;
     ^~~~~~~~~~~~
make: *** [/workdir/AFL-2.53b/qemu_mode/qemu-2.10.0/rules.mak:66: util/memfd.o] Error 1

(Sorry for no patch; limit time :( )

@Dor1s
Copy link
Contributor

Dor1s commented Aug 26, 2019

Thanks for the report! @pietroferretti I'm wondering if your patch could've caused this? If yes, should we revert or could you think of a follow up fix please?

@pietroferretti
Copy link
Contributor

I'm a little confused, since the patch was supposed to fix this exact issue. I'm going to try on Debian Buster and see if I can reproduce.

@Dor1s
Copy link
Contributor

Dor1s commented Aug 26, 2019

Oh, I see. @dbrumley were you using the master branch OR the latest release of AFL? In case of the latter, it doesn't have the aforementioned fix, but it is merged in on master.

@Dor1s
Copy link
Contributor

Dor1s commented Aug 26, 2019

(GitHub's autocomplete almost ruined my previous comment, should be fixed now, sorry for the spam)

@pietroferretti
Copy link
Contributor

I have no issues when compiling from master on Debian buster, FYI.

@Dor1s
Copy link
Contributor

Dor1s commented Aug 26, 2019

Thanks a lot for checking! Now waiting for David to confirm whether he still runs into the issue on the latest master or not. If not, I think we should release a new version including the fix.

@dbrumley
Copy link
Author

I made a mistake. I pulled the current release, not master, and it gave me the issue. Can confirm master is honkey-dorey and works.

@Dor1s
Copy link
Contributor

Dor1s commented Aug 27, 2019

Thank you, @dbrumley ! I'm releasing a new version then, given the importance of the fix landed by @pietroferretti (thanks again!).

@jedav
Copy link
Collaborator

jedav commented Sep 3, 2019

Would it be worth adding some tests in travis that we build properly in various distros? Possibly via docker?

@Dor1s
Copy link
Contributor

Dor1s commented Sep 8, 2019

Would it be worth adding some tests in travis that we build properly in various distros? Possibly via docker?

I'm not sure. That doesn't sound too simple, and having more supported configurations means more maintenance burden. Is it worth it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants