swift 3 on linux (ubuntu 16.04) vs ibm swift sandbox

Runnning the following swift code in the IBM swift sandbox works just fine

(https://swiftlang.ng.bluemix.net/#/repl)


import Foundation

let d=Date()

print(d)

print(d.timeIntervalSince1970)


However if I want to use my own swift 3.0 installation locally (on Linux) it fails with:

swift date.swift

<module-includes>:1:10: note: in file included from <module-includes>:1:

#include "CoreFoundation.h"

^

/opt/swift-3.0-RELEASE-ubuntu15.10/usr/lib/swift/CoreFoundation/CoreFoundation.h:52:10: error: 'CoreFoundation/CFBase.h' file not found

#include <CoreFoundation/CFBase.h>

^

<unknown>:0: error: could not build Objective-C module 'CoreFoundation'


Any ideas?

Sorry so stupid, I just needed to fix some permissions like:


chmod o+r /opt/swift/usr/lib/swift/CoreFoundation/*


and it would work.

swift 3 on linux (ubuntu 16.04) vs ibm swift sandbox
 
 
Q