Uploaded image for project: 'Swift'
  1. Swift
  2. SR-1412

Cannot compile Foundation on ARM

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Foundation
    • Labels:
    • Environment:

      OS: Ubuntu 16.04 xenial
      Kernel: armv7l Linux 4.4.0-1009-raspi2
      CPU: ARMv7 rev 5 (v7l) @ 900MHz

      Description

      While compiling CFString on ARM (Raspberry Pi 2) I am running into a perplexing issue. It appears that the va_list typedef is being defined multiple times.

      <module-includes>:1:10: note: in file included from <module-includes>:1:
      #include "CoreFoundation.h"
               ^
      /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CoreFoundation.h:58:10: note: in file included from /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CoreFoundation.h:58:
      #include <CoreFoundation/CFCalendar.h>
               ^
      /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CFCalendar.h:21:10: note: in file included from /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CFCalendar.h:21:
      #include <CoreFoundation/CFTimeZone.h>
               ^
      /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CFTimeZone.h:23:10: note: in file included from /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CFTimeZone.h:23:
      #include <CoreFoundation/CFString.h>
               ^
      /home/ryan/Source/swift-corelibs-foundation/../build/Ninja-ReleaseAssert/foundation-linux-armv7/Foundation/usr/lib/swift/CoreFoundation/CFString.h:265:123: error: reference to 'va_list' is ambiguous
      CFStringRef CFStringCreateWithFormatAndArguments(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef format, va_list arguments) CF_FORMAT_FUNCTION(3,0);
                                                                                                                                ^
      /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.

        Attachments

        1. stdio.h
          31 kB
        2. stdarg.h
          2 kB
        3. 0001-A-proposed-fix.patch
          0.9 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rlovelett Ryan Lovelett
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: