For the mail (so it's easier to find than in a bug tracking system) the fix is
to specify the clang include headers either with an -I on the swift invocation
command line, or via the variables C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
setting the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment var
Just to update the record, Matthias M. Schneider posted a workaround on
bugs.swift.org.
By setting the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables to
point to the Clang headers directory, it is possible to both import Foundation
in the REPL (without using -I to pass the header i
I'm reviving this somewhat-old thread because it's still the most prominent
search result when googling this issue to debug it (other than the
below-referenced SR-3648).
The workaround of using -I to pass an include path to swift was working for me,
because as noted by Will Stanton below, the i
From https://bugs.swift.org/browse/SR-3648, the work-around seems to be passing
-I /path/to/extracted/usr/lib/swift/clang/include when invoking swift (credit
Lukas and others, SR-3794 is more active)
So, ex. `swift -I ~/a-swift/usr/lib/swift/clang/include/`
Fortunately, the issue has only come u
The installation instructions for Swift on Linux imply that the tarball can be
extracted anywhere, and the PATH set, and all should be well. But
unfortunately, while that's partly true, when I try to import packages, it
fails (Ubuntu 16.04 on Parallels on macOS 10.12.3):
$ swift
Welcome to Swif