[swift-dev] Compiling Swift macOS 10.12.4 Xcode 9 beta 4

Mark Lacey mark.lacey at apple.com
Thu Aug 10 11:21:22 CDT 2017



> On Aug 10, 2017, at 8:28 AM, Trevör ANNE DENISE via swift-dev <swift-dev at swift.org> wrote:
> 
> Hello everyone,
> 
> 
> I followed the instructions on the Swift GitHub for installing and building Swift on my Mac but there is an error that I don't know how to fix (I am using the build-script -x command). Here is the error:
> 
> ** BUILD FAILED **
> 
> The following build commands failed:
> 	PhaseScriptExecution CMake\ Rules /Users/trevorannedenise/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/SwiftRemoteMirror/Swift.build/Debug/swiftRemoteMirror-macosx.build/Script-340A90BA4E604C08A26364A6.sh
> (1 failure)
> utils/build-script: fatal error: command terminated with a non-zero exit status 65, aborting
> 
> 
> There are also these errors a few lines before:
> xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" cannot be located.
> codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
> /Users/trevorannedenise/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/Debug/lib/swift/macosx/libswiftRemoteMirror.dylib: the codesign_allocate helper tool cannot be found or used
> make: *** [/Users/trevorannedenise/swift-source/build/Xcode-DebugAssert/swift-macosx-x86_64/Debug/lib/swift/macosx/libswiftRemoteMirror.dylib] Error 1
> Command /bin/sh failed with exit code 2
> 
> I had forgot to do xcode-select, so I thought it was that but even as I selected the beta version of Xcode the error persists. What surprises me is that the utility searches for 10.12 SDK under Xcode.app which is Xcode 8 and not Xcode 9 even tough I did select Xcode 9 using xcode-select.
> 
> Do you have any idea of what is happening ?

It looks like you need to pass --reconfigure to build-script, in order to get it to pick up the changes to which build tools you have selected. You do this by passing it directly to build-script-impl, which is done by adding it after a pair of dashes in the command-line, e.g.:
  build-script -x -- --reconfigure

After doing this once, I would expect that a normal “build-script -x” will work in the future.

If for some reason this doesn’t work for you then you probably need to remove the build directory and start over.

Mark


> 
> Thank you
> 
> Trevör
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170810/44f13139/attachment.html>


More information about the swift-dev mailing list