-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redirecting incorrect #include <sys/poll.h> to <poll.h> , compilation failed #5447
Comments
It says "gcc 5.4.0 detected" which I think means it is not using emcc. So it is compiling using the wrong compiler, and you may need to run a configure script or something like that. Might be best to ask the MAME project directly, I believe their emscripten port is upstream (another possible place is the jsmess irc channel on EFNet, some people working on that port are usually there i believe). |
The GCC message is not meaningful, the MAME build system prints it even when compiling under Emscripten and I haven't bothered figuring out why. The poll.h error on the other hand is real and I get it as well. It can be worked around by adding NOWERROR=1 to the make command line. MAME does not have a configure script. |
Un-commenting NOWERROR=1 in the makefile of the mame directory solved the problem. |
The history of that warning is that at least POSIX.1-2001, POSIX.1-2008 and Single Unix Specification (at http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.h.html) state that the include directive should be Looking at Android's implementation, there exist both https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/+/jb-dev/sysroot/usr/include/sys/poll.h Perhaps we should then just drop the warning as well, it looks a bit pedantic in nature, given that other platforms support the nonstandard(?) |
….h> as opposed to the POISX and Unix standard #include <poll.h>, and keep supporting both. This is what Android glibc does as well, see emscripten-core#5447.
Oh, on other thought, it looks like that warning is not an Emscripten-specific added warning, but comes directly from upstream musl: https://git.musl-libc.org/cgit/musl/tree/include/sys/poll.h. So perhaps we don't want to change this then. Would it be possible for MAME to change to using the standard(?) |
It's not MAME code, it comes from upstream asio. It seems to have recently been fixed there so we should be able to just update: chriskohlhoff/asio@5adce6e |
The commit mentioned above does not actually fix the problem for Emscripten but I have created a pull request that does: chriskohlhoff/asio#260 |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
`poll.h` is the POSIX standard include location, and MUSL libc issues a warning (which infnoise's `-Werror` in CFLAGS makes into an error). For more context: - [Linux manpage for `poll(2)`][1] - [Open Group UNIX Specification][2] - [Relevant discussion over at the `emscripten` project][3] [1]: https://man7.org/linux/man-pages/man2/poll.2.html [2]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.h.html [3]: emscripten-core/emscripten#5447 (comment)
I'm trying to compile MAME (https://github.com/mamedev/mame) but this is what I get. The first time I tried to compile, it converted, compressed, compiled some stuff, then it threw this error. Now every time I try to compile, I get the same error right away.
I haven't run ./configure by the way, because I can't figure a proper way to do it.
The text was updated successfully, but these errors were encountered: