-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix building on linux (arm) #399
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
Conversation
Thanks for working on this, @karwa. It's weird that this appeared. I'm curious what caused it to happen. |
I don't think we can merge this change as is; the include is needed by Foundation and other projects that include that on Darwin. It would be better that if this is somehow a failure on linux to include this header that perhaps we gate that include somehow? That way the change is actually mergeable into the Darwin builds of Foundation/CoreFoundation. |
Fixes building on linux (arm)
@phausler Actually, turns out we only need to remove it from the Is that better? |
What is defining the second |
@gribozavr It's in the bug report. This isn't really a fix, more of a workaround.
|
Hm, I'm still not sure about this one. |
Yeah- I can confirm the duplicate definition of va_args is causing Foundation and libDispatch to fail when building on ARM (like Ubuntu Mate for Raspberry Pi). Commenting out stdio.h fixes it. As an alternative, adding the following to #ifndef _VA_LIST
#include <_G_config.h> //Adding this line
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif |
I think I have some more context to add to this.
Is the complete text of the same error in libdispatch (see swiftlang/swift-corelibs-libdispatch#155 ). If you look at the system /usr/include/stdio.h it defines va_list, but it makes a feeble attempt to make sure it's only defined if using GNU C:
Before |
This has been superseded by #603. |
[pull] swiftwasm from main
Without this, we're unable to build on Debian (armv7) because of a conflicting va_list definition.
The include doesn't seem to be required, and removing needless includes is usually a good idea anyway.
See: https://bugs.swift.org/browse/SR-1412