問題
ServerSideSwiftのPerfectででサンプル動かそうとしたらbuildで落ちる
<unknown>:0: error: could not build Objective-C module 'Foundation'
<unknown>:0: error: build had 1 command failures
error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/tantakan/src/github.com/PerfectExamples/Perfect-Turnstile-MySQL-Demo/.build/debug.yaml
とか
<unknown>:0: error: could not build Objective-C module 'Foundation'
<unknown>:0: error: build had 1 command failures
error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/tantakan/src/github.com/PerfectExamples/Perfect-ToDo-iOS-Demo/.build/debug.yaml
とか、PerfectCURLを使ってるものが落ちる
解決策
$ brew uninstall pkg-config
$ swift build
これで解決
ちなみにこれっぽい
https://bugs.swift.org/browse/SR-3129
つまり、pkg-configをbrewで入れてるとダメっぽい