<div dir="ltr">Not that it&#39;s something that I&#39;d generally recommend, but I ended up just commenting out that #import in AVFoundation.h and the build was able to complete successfully (enough for what I needed).<div><br></div><div>Since the only thing I&#39;m currently using Xcode 9 beta for is building Swift and I&#39;m not doing anything specific with AVFoundation, that hack was much faster than downloading and reinstalling Xcode 9b4 :)</div><div><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 16, 2017 at 3:42 AM Toni Suter via swift-dev &lt;<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: <span style="font-family:SFMono-Regular,Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;color:rgb(36,41,46)">utils/build-script -r -t</span></div><div>Unfortunately, the build fails on my Mac (macOS 10.12.6). I noticed that the README.md still lists Xcode 9.0 beta 4 as a system requirement.</div><div>However, I already updated to beta 5. Could this be the problem?</div><div><br></div><div>Here&#39;s the error message I get:</div><div><br></div><div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:88:9: error: &#39;AVFoundation/AVRouteDetector.h&#39; file not found</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">#import &lt;AVFoundation/AVRouteDetector.h&gt;</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">        ^</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module &#39;AVFoundation&#39;</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">@_exported import AVFoundation // Clang module</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">                  ^</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc </span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation &amp;&amp; /usr/local/Cellar/cmake/3.9.1/bin/cmake -E remove -f /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule &amp;&amp; /usr/local/Cellar/cmake/3.9.1/bin/cmake -E remove -f /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftdoc &amp;&amp; /usr/bin/python /Users/tonisuter/Projects/swift-source/swift/utils/line-directive @/Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation/XuChu.txt -- /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./bin/swiftc -emit-module -o /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -target x86_64-apple-macosx10.9 -resource-dir /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/../../../Developer/Library/Frameworks -O -g -D INTERNAL_CHECKS_ENABLED -I /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -module-cache-path /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -swift-version 3 -autolink-force-load -warn-swift3-objc-inference-complete -Xfrontend -sil-serialize-witness-tables -Fsystem /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/PrivateFrameworks/ -module-link-name swiftAVFoundation -force-single-frontend-invocation -parse-as-library @/Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation/XuChu.txt</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">&lt;module-includes&gt;:1:9: note: in file included from &lt;module-includes&gt;:1:</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">#import &quot;Headers/AVFoundation.h&quot;</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">        ^</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:88:9: error: &#39;AVFoundation/AVRouteDetector.h&#39; file not found</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">#import &lt;AVFoundation/AVRouteDetector.h&gt;</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">        ^</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module &#39;AVFoundation&#39;</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">@_exported import AVFoundation // Clang module</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">                  ^</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">ninja: build stopped: subcommand failed.</span></div><div style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(197,200,198);background-color:rgb(22,23,25)"><span style="font-variant-ligatures:no-common-ligatures">utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting</span></div></div><div><br></div><div><br></div><div>Thanks and best regards</div><div><br></div><div>Toni</div></div>_______________________________________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br>
</blockquote></div></div></div>