swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

swiftpm: error: manifest parse error(s) #58811

Closed ZiLingNiu closed 2 years ago

ZiLingNiu commented 2 years ago

Describe the bug Hi, I tried to build the toolchain and unfortunately failed. What can I do to improve it?

To Reproduce Steps to reproduce the behavior:

1. git clone --branch swift-5.5.2-RELEASE https://github.com/apple/swift
2. git clone --branch swift-5.5.2-RELEASE https://github.com/apple/llvm-project
3. ./swift/utils/update-checkout --tag swift-5.5.2-RELEASE --clone
update-checkout succeeded
cmake                              : skip                               
cmark                              : 9c8096a23f44794bde297452d87c455fc4f76d42
icu                                : skip                               
indexstore-db                      : e771994778265c2efe8d33a7ca30adf5f3d2065a
llbuild                            : 83c4bcb8dfca48cc065325287b55d08ff7b26428
llvm-project                       : c315411fac10439aa7a09dce976b5716af9f149c
ninja                              : e72d1d581c945c158ed68d9bc48911063022a2c6
sourcekit-lsp                      : 1abe633602f7974bc56569c7a362b277305e73c6
swift                              : 4c45f525dc315a618868caae7d976d95359700a4
swift-argument-parser              : 986d191f94cec88f6350056da59c2e59e83d1229
swift-corelibs-foundation          : 491a217baa8a0ef4ae9c8603c434c069cc090c50
swift-corelibs-libdispatch         : 5cc1c6679822fd18368664482a5bba57270467f4
swift-corelibs-xctest              : 39926a836fc49efb977f26b9046c830fc72b0750
swift-crypto                       : 0141f53dd525706c803b0c20aa8ad36f9ecd45e5
swift-driver                       : 86c54dacd270e0c43374c0cb9b2ceb2924c9ea72
swift-format                       : f872223e16742fd97fabd319fbf4a939230cc796
swift-integration-tests            : fe78b5eabe09fc4597c74d1ccd209b7192ca6273
swift-stress-tester                : 4aaabe1bebd00424ff1f041bfcfd4e44af6c3c07
swift-syntax                       : 2ca29758ed04c0a209221db59f922d4faf539f03
swift-tools-support-core           : 3b586ce12865db205081acdcea79fe5509b28152
swift-xcode-playground-support     : dd0d8c8d121d2f20664e4779a3d29482a55908bb
swiftpm                            : 7a1f113534689c77b3a4110288478580b7b8d91c
yams                               : 51ef46468fda5a0fa1a201b8843791d0149d3c01

5. ./swift/utils/build-toolchain tool

After hours of building, the nightly folder has been newly created, and almost succeeded with an error: swiftpm: error: manifest parse error(s).

Expected behavior I want to build the toolchain for iPhone device testing.

Screenshots

[29/29][100%][45.428s] Linking Swift executable bin/swift-run
Doing Post-Run Cleanup
--- bootstrap: note: install_name_tool -add_rpath /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/yams/lib /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build
--- bootstrap: note: install_name_tool -add_rpath /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-argument-parser/lib /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build
--- bootstrap: note: install_name_tool -add_rpath /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-driver/lib /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build
--- bootstrap: note: install_name_tool -add_rpath /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-crypto/lib /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build
--- bootstrap: note: Building SwiftPM (with a freshly built swift-build)
env SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk SWIFTCI_USE_LOCAL_DEPS=1 SWIFTPM_MACOS_DEPLOYMENT_TARGET=10.15 DYLD_LIBRARY_PATH=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/tsc/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/llbuild-macosx-x86_64/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/yams/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-argument-parser/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-driver/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-crypto/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/lib/swift/macosx:/usr/lib/swift SWIFT_EXEC=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/bin/swiftc SWIFT_DRIVER_SWIFT_EXEC=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/bin/swiftc SWIFTPM_PD_LIBS=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/pm /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build --disable-sandbox --build-path /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64 --configuration release -Xlinker -rpath -Xlinker @executable_path/../lib/swift/macosx --arch x86_64 --arch arm64 -Xswiftc -module-cache-path -Xswiftc /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/module-cache -Xmanifest -module-cache-path -Xmanifest /Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/module-cache
/Users/user/Documents/xcode13_llvm/swiftpm: error: manifest parse error(s):
Doing Post-Run Cleanup
--- bootstrap: error: Command '['env', 'SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk', 'SWIFTCI_USE_LOCAL_DEPS=1', 'SWIFTPM_MACOS_DEPLOYMENT_TARGET=10.15', 'DYLD_LIBRARY_PATH=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/tsc/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/llbuild-macosx-x86_64/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/yams/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-argument-parser/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-driver/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/swift-crypto/lib:/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/lib/swift/macosx:/usr/lib/swift', 'SWIFT_EXEC=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/bin/swiftc', 'SWIFT_DRIVER_SWIFT_EXEC=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-LOCAL-2022-05-10-a.xctoolchain/usr/bin/swiftc', 'SWIFTPM_PD_LIBS=/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/pm', '/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/bootstrap/bin/swift-build', '--disable-sandbox', '--build-path', '/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64', '--configuration', 'release', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/../lib/swift/macosx', '--arch', 'x86_64', '--arch', 'arm64', '-Xswiftc', '-module-cache-path', '-Xswiftc', '/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/module-cache', '-Xmanifest', '-module-cache-path', '-Xmanifest', '/Users/user/Documents/xcode13_llvm/build/buildbot_osx/swiftpm-macosx-x86_64/module-cache']' returned non-zero exit status 1.
ERROR: command terminated with a non-zero exit status 1, aborting

ERROR: command terminated with a non-zero exit status 1, aborting

Environment (please complete the following information):

ZiLingNiu commented 2 years ago

After downloading the python2 installation of the general architecture from the python official website, delete the build in the same level folder of swift and rebuild it with build-toolchain to continue.