jpsim / SourceKitten

An adorable little framework and command line tool for interacting with SourceKit.
MIT License
2.31k stars 226 forks source link

Failure to build with Xcode 15 #793

Closed fxcoudert closed 1 year ago

fxcoudert commented 1 year ago

Seen during testing of Homebrew:

Extracts from the build log:

error: -static-stdlib is no longer supported for Apple platforms
make: *** [build_with_disable_sandbox] Error 1
Longer make output with warnings
  ==> make prefix_install PREFIX=/usr/local/Cellar/sourcekitten/0.34.1 TEMPORARY_FOLDER=/private/tmp/sourcekitten-20230915-4894-pjouxw/SourceKitten.dst
  rm -f "SourceKitten.pkg"
  swift build --disable-sandbox --configuration release -Xswiftc -static-stdlib
  rm -rf "/private/tmp/sourcekitten-20230915-4894-pjouxw/SourceKitten.dst"
  swift package clean
  warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features.
  warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features.
  warning: /Users/brew/Library/Caches/org.swift.swiftpm is not accessible or not writable, disabling user-level cache features.
  warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features.
  warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features.
  warning: /Users/brew/Library/Caches/org.swift.swiftpm is not accessible or not writable, disabling user-level cache features.
  warning: 'sourcekitten-20230915-4894-pjouxw': failed loading cached manifest for 'sourcekitten-20230915-4894-pjouxw': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000034809f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'sourcekitten-20230915-4894-pjouxw': failed storing manifest for 'sourcekitten-20230915-4894-pjouxw' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x600003480f90 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'sourcekitten-20230915-4894-pjouxw': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000034811a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'sourcekitten-20230915-4894-pjouxw': failed loading cached manifest for 'sourcekitten-20230915-4894-pjouxw': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000034811a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'sourcekitten-20230915-4894-pjouxw': failed storing manifest for 'sourcekitten-20230915-4894-pjouxw' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x600003481830 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'sourcekitten-20230915-4894-pjouxw': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x600003481a10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  Fetching https://github.com/apple/swift-argument-parser.git
  Fetching https://github.com/jpsim/Yams.git
  Fetching https://github.com/drmohundro/SWXMLHash.git
  [1/2736] Fetching swxmlhash
  [2737/13627] Fetching swxmlhash, swift-argument-parser
  [4262/22379] Fetching swxmlhash, swift-argument-parser, yams
  Fetched https://github.com/drmohundro/SWXMLHash.git (5.03s)
  Fetched https://github.com/jpsim/Yams.git (5.03s)
  Fetched https://github.com/apple/swift-argument-parser.git (5.03s)
  Computing version for https://github.com/jpsim/Yams.git
  warning: 'yams': failed loading cached manifest for 'yams': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e5170 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed storing manifest for 'yams' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e0210 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e02d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  Computed https://github.com/jpsim/Yams.git at 5.0.5 (1.58s)
  Computing version for https://github.com/drmohundro/SWXMLHash.git
  warning: 'swxmlhash': failed loading cached manifest for 'swxmlhash': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e05a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed storing manifest for 'swxmlhash' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035f08d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035f0180 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  Computed https://github.com/drmohundro/SWXMLHash.git at 7.0.1 (2.26s)
  Computing version for https://github.com/apple/swift-argument-parser.git
  warning: 'swift-argument-parser': failed loading cached manifest for 'swift-argument-parser': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035d8870 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed storing manifest for 'swift-argument-parser' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e03f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e05d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  Computed https://github.com/apple/swift-argument-parser.git at 1.2.1 (2.39s)
  warning: 'yams': failed loading cached manifest for 'yams': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b9710 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed storing manifest for 'yams' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b9bf0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b93e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed loading cached manifest for 'swxmlhash': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035f4420 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed storing manifest for 'swxmlhash' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035f0120 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035f0150 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed loading cached manifest for 'swift-argument-parser': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035d83f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed storing manifest for 'swift-argument-parser' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b9860 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b9a10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  Creating working copy for https://github.com/jpsim/Yams.git
  Working copy of https://github.com/jpsim/Yams.git resolved at 5.0.5
  Creating working copy for https://github.com/apple/swift-argument-parser.git
  Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.2.1
  Creating working copy for https://github.com/drmohundro/SWXMLHash.git
  Working copy of https://github.com/drmohundro/SWXMLHash.git resolved at 7.0.1
  warning: 'swift-argument-parser': failed loading cached manifest for 'swift-argument-parser': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b4600 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed loading cached manifest for 'swxmlhash': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b5380 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed loading cached manifest for 'yams': Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b5620 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed storing manifest for 'yams' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035da880 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'yams': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035da7c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed storing manifest for 'swxmlhash' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b12f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swxmlhash': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035b1200 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed storing manifest for 'swift-argument-parser' in cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e47e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  warning: 'swift-argument-parser': failed closing cache: Error Domain=NSCocoaErrorDomain Code=4 "The file “manifests” doesn’t exist." UserInfo={NSFilePath=/Users/brew/Library/Caches/org.swift.swiftpm/manifests, NSUnderlyingError=0x6000035e4870 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
  [1/1] Compiling plugin GenerateManual
  Building for production...
  [1/10] Compiling SourceKit SourceKit.c
  [2/10] Compiling Clang_C Clang_C.c
  remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
  remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
  error: -static-stdlib is no longer supported for Apple platforms
  [3/10] Compiling reader.c
  [3/10] Compiling writer.c
  [3/10] Compiling scanner.c
  [3/10] Compiling parser.c
  error: -static-stdlib is no longer supported for Apple platforms
  make: *** [build_with_disable_sandbox] Error 1
jpsim commented 1 year ago

Thanks for flagging! Fixed on main now.