Fatal error when executing ./utils/build-script -x


(Matthew An) #1

HI guys,

I followed the instruction on Readme of the swift project https://github.com/apple/swift, and i got this error when executing ./utils/build-script -x. Does anyone have idea about this?

Here is some information about dev environment:

Mac OS: 10.12.5 (16F73)
Xcode: Version 8.3.2 (8E2002)
CMake: 3.8.1
Ninja installed by HomeBrew: brew install cmake ninja

Below is the output of the command. Thanks for your help in advance!
hailin-mac-pro-vodafone-2:swift matthew$ ./utils/build-script -x
+ mkdir -p /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert
+ env HOST_VARIABLE_macosx_x86_64__SWIFT_BENCHMARK_TARGETS=swift-benchmark-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_RUN_BENCHMARK_TARGETS=check-swift-benchmark-macosx-x86_64 'HOST_VARIABLE_macosx_x86_64__SWIFT_SDKS=IOS IOS_SIMULATOR OSX TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR' HOST_VARIABLE_macosx_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_TEST_TARGETS= caffeinate /Users/matthew/githubs/swift-source/swift/utils/build-script-impl --workspace /Users/matthew/githubs/swift-source --build-dir /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert --install-prefix /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --host-target macosx-x86_64 --stdlib-deployment-targets 'macosx-x86_64 iphonesimulator-i386 iphonesimulator-x86_64 appletvsimulator-x86_64 watchsimulator-i386 iphoneos-armv7 iphoneos-armv7s iphoneos-arm64 appletvos-arm64 watchos-armv7k' --host-cc '/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' --host-cxx '/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /Applications/CMake.app/Contents/bin/cmake --cmark-build-type Debug --llvm-build-type Debug --swift-build-type Debug --swift-stdlib-build-type Debug --lldb-build-type Debug --foundation-build-type Debug --libdispatch-build-type Debug --libicu-build-type Debug --xctest-build-type Debug --swiftpm-build-type Debug --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Xcode --build-jobs 8 '--common-cmake-options=-G Xcode '"'"'-DCMAKE_C_COMPILER:PATH=/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'"'"' '"'"'-DCMAKE_CXX_COMPILER:PATH=/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'"'"' '"'"'-DCMAKE_CONFIGURATION_TYPES=Debug;Release;MinSizeRel;RelWithDebInfo'"'"' -DLLVM_VERSION_MAJOR:STRING=4 -DLLVM_VERSION_MINOR:STRING=0 -DLLVM_VERSION_PATCH:STRING=0 -DCLANG_VERSION_MAJOR:STRING=4 -DCLANG_VERSION_MINOR:STRING=0 -DCLANG_VERSION_PATCH:STRING=0' '--build-args=-parallelizeTargets -jobs 8' --cmark-cmake-options= '--llvm-cmake-options=-DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64;PowerPC;SystemZ' '--swift-cmake-options=-DSWIFT_STDLIB_ENABLE_SIL_OWNERSHIP=FALSE -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DSWIFT_FORCE_OPTIMIZED_TYPECHECKER=FALSE' --build-stdlib-deployment-targets all --ninja-bin=/usr/local/bin/ninja --skip-build-foundation --skip-build-xctest --skip-build-lldb --skip-build-llbuild --skip-build-libdispatch --skip-build-libicu --skip-build-swiftpm --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-swift --skip-test-cmark --skip-test-lldb --skip-test-llbuild --skip-test-swiftpm --skip-test-xctest --skip-test-foundation --skip-test-libdispatch --skip-test-libicu --skip-test-playgroundlogger --skip-test-playgroundsupport --skip-test-linux --skip-test-freebsd --skip-test-cygwin --skip-test-osx --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --toolchain-prefix /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --host-lipo '/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo' --host-libtool '/Applications/Xcode copy.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool' --llvm-lit-args=-sv
Building the standard library for: swift-test-stdlib-macosx-x86_64
cmark: using standard linker
+ /Applications/CMake.app/Contents/bin/cmake --build /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64 --target ZERO_CHECK --config Debug
Build settings from command line:
    TOOLCHAINS = default

=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution CMake\ Rules /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ZERO_CHECK.build/Script-DC79F19F983D42398FAB9F87.sh
    cd /Users/matthew/githubs/swift-source/cmark
    /bin/sh -c /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ZERO_CHECK.build/Script-DC79F19F983D42398FAB9F87.sh
echo ""

make -f /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/CMakeScripts/ReRunCMake.make
make[1]: `/Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/CMakeFiles/cmake.check_cache' is up to date.

** BUILD SUCCEEDED **

+ /Applications/CMake.app/Contents/bin/cmake --build /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64 --target ZERO_CHECK --config Debug -- -parallelizeTargets -jobs 8 -target ALL_BUILD
User defaults from command line:
    IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

Build settings from command line:
    TOOLCHAINS = default

Build Preparation
Build task concurrency set to 8 via user default IDEBuildOperationMaxNumberOfConcurrentCompileTasks

=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution CMake\ Rules /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ZERO_CHECK.build/Script-DC79F19F983D42398FAB9F87.sh
    cd /Users/matthew/githubs/swift-source/cmark
    /bin/sh -c /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ZERO_CHECK.build/Script-DC79F19F983D42398FAB9F87.sh
echo ""

make -f /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/CMakeScripts/ReRunCMake.make
make[1]: `/Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/CMakeFiles/cmake.check_cache' is up to date.

=== BUILD TARGET libcmark OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution CMake\ PostBuild\ Rules /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/src/cmark.build/Debug/libcmark.build/Script-63F1B78224AA4BDD8D60831D.sh
    cd /Users/matthew/githubs/swift-source/cmark
    /bin/sh -c /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/src/cmark.build/Debug/libcmark.build/Script-63F1B78224AA4BDD8D60831D.sh
echo "Creating symlinks"
Creating symlinks
/Applications/CMake.app/Contents/bin/cmake -E cmake_symlink_library /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/src/Debug/libcmark.0.22.0.dylib /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/src/Debug/libcmark.0.22.0.dylib /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/src/Debug/libcmark.dylib

=== BUILD TARGET libcmark_static OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET cmark OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET api_test OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD AGGREGATE TARGET ALL_BUILD OF PROJECT cmark WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution CMake\ Rules /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ALL_BUILD.build/Script-D3E6297A9FE7459FA1568B3A.sh
    cd /Users/matthew/githubs/swift-source/cmark
    /bin/sh -c /Users/matthew/githubs/swift-source/build/Xcode-DebugAssert/cmark-macosx-x86_64/cmark.build/Debug/ALL_BUILD.build/Script-D3E6297A9FE7459FA1568B3A.sh
echo ""

echo Build\ all\ projects
Build all projects

** BUILD SUCCEEDED **

llvm: using standard linker
usage: dirname path
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting