Build Failure with Xcode 9.0 beta 5

Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation && /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 && /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 && /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Thanks and best regards

Toni

Hi Toni,

This is known issue, master and swift-4.0-branch branch can only be built with Xcode 9 beta 4 as of right now.

Thanks,
Mishal Shah

···

On Aug 16, 2017, at 3:41 AM, Toni Suter via swift-dev <swift-dev@swift.org> wrote:

Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation && /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 && /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 && /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Thanks and best regards

Toni
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

I missed the 4th beta release, and couldn't find it on Apple's site (I could find the command line tools for Xcode 9 beta 4 in the "other downloads" section, but not Xcode 9 beta 4 itself). For anyone else who needs it and is having trouble finding it, the URL is the same as Xcode 9 beta 5's, but with both occurrences of "5" (there are two) in the URL changed to "4".

Does it hurt anything to have both betas installed? I'm in the process of installing the 4th beta now. Once that's done, I'm going to build the Xcode project. I'd like to reinstall beta 5 after that, but not if that'll keep me from compiling the compiler.

Out of curiosity, what's the actual issue, here? Is the glitch in the beta 5 toolchain, or in the swift repo (source code, build script, etc)?

- Dave Sweeris

···

On Aug 16, 2017, at 10:36, Mishal Shah via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi Toni,

This is known issue, master and swift-4.0-branch branch can only be built with Xcode 9 beta 4 as of right now.

Thanks,
Mishal Shah

On Aug 16, 2017, at 3:41 AM, Toni Suter via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation && /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 && /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 && /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Thanks and best regards

Toni
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

Hi Mishal,

Ok. Thanks for the reply!

Best regards
Toni

···

Am 16.08.2017 um 19:36 schrieb Mishal Shah <mishal_shah@apple.com>:

Hi Toni,

This is known issue, master and swift-4.0-branch branch can only be built with Xcode 9 beta 4 as of right now.

Thanks,
Mishal Shah

On Aug 16, 2017, at 3:41 AM, Toni Suter via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation && /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 && /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 && /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Thanks and best regards

Toni
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

Not that it's something that I'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).

Since the only thing I'm currently using Xcode 9 beta for is building Swift
and I'm not doing anything specific with AVFoundation, that hack was much
faster than downloading and reinstalling Xcode 9b4 :slight_smile:

···

On Wed, Aug 16, 2017 at 3:42 AM Toni Suter via swift-dev < swift-dev@swift.org> wrote:

Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub
and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19:
error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating
/Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule
lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd
/Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation
&& /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
&& /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
&& /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19:
error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling
/Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit
status 1, aborting

Thanks and best regards

Toni
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

It’s totally fine to have multiple versions of Xcode installed. You can use the command-line ‘xcode-select’ tool to select between them.

Slava

···

On Aug 16, 2017, at 6:21 PM, David Sweeris via swift-dev <swift-dev@swift.org> wrote:

Does it hurt anything to have both betas installed? I'm in the process of installing the 4th beta now. Once that's done, I'm going to build the Xcode project. I'd like to reinstall beta 5 after that, but not if that'll keep me from compiling the compiler.

Thanks guys! It worked!

Best regards
Toni

···

Am 17.08.2017 um 00:25 schrieb Tony Allevato <tony.allevato@gmail.com>:

Not that it's something that I'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).

Since the only thing I'm currently using Xcode 9 beta for is building Swift and I'm not doing anything specific with AVFoundation, that hack was much faster than downloading and reinstalling Xcode 9b4 :slight_smile:

On Wed, Aug 16, 2017 at 3:42 AM Toni Suter via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:
Hi,

I tried to build the Swift compiler. I followed the instructions on GitHub and used the following command: utils/build-script -r -t
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.
However, I already updated to beta 5. Could this be the problem?

Here's the error message I get:

/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[4/417] Generating /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/AVFoundation.swiftmodule
FAILED: lib/swift/macosx/x86_64/AVFoundation.swiftmodule lib/swift/macosx/x86_64/AVFoundation.swiftdoc
cd /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/AVFoundation && /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 && /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 && /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
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/AVFoundation.h"
        ^
/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: 'AVFoundation/AVRouteDetector.h' file not found
#import <AVFoundation/AVRouteDetector.h>
        ^
/Users/tonisuter/Projects/swift-source/swift/stdlib/public/SDK/AVFoundation/AVCaptureDevice.swift:13:19: error: could not build Objective-C module 'AVFoundation'
@_exported import AVFoundation // Clang module
                  ^
[9/417] Compiling /Users/tonisuter/Projects/swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/stdlib/public/SDK/SceneKit/macosx/x86_64/SceneKit.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Thanks and best regards

Toni
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev