[swift-corelibs-dev] error: reference to 'va_list' is ambiguous

Ryan Lovelett swift-dev at ryan.lovelett.me
Wed May 4 13:42:52 CDT 2016


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?


More information about the swift-corelibs-dev mailing list