error: reference to 'va_list' is ambiguous


(Ryan Lovelett) #1

While compiling foundation on ARM (Raspberry Pi 2) I running into a
perplexing issue.

When it goes to compile CFString the signature:

CFStringRef CFStringCreateWithFormatAndArguments(CFAllocatorRef alloc,
CFDictionaryRef formatOptions, CFStringRef format, va_list arguments)
CF_FORMAT_FUNCTION(3,0);

Fails to resolve with the error: reference to 'va_list' is ambiguous.

The note from the compiler says:

/home/ryan/Source/build/Ninja-ReleaseAssert/swift-linux-armv7/lib/swift/clang/include/stdarg.h:30:27:
note: candidate found by name lookup is 'va_list'
typedef __builtin_va_list va_list;
                          ^
/usr/include/stdio.h:79:20: note: candidate found by name lookup is
'va_list'
typedef _G_va_list va_list;

It would seem that va_list is being defined by multiple things in the
include path. This is unexpected because I would figure it would be
included in the system path for Clang.

Tips/tricks/pointers?