claygarrett / SwiftVoxel

A voxel engine written in Swift
34 stars 6 forks source link

ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a #4

Open NorseGaud opened 1 year ago

NorseGaud commented 1 year ago

Seems to have started recently in Xcode 14.3

#!/usr/bin/env bash
set -exo pipefail
cd "${HOME}"
if [[ "${*}" =~ "prep" ]]; then
  [[ ! -d SwiftVoxel ]] && git clone https://github.com/claygarrett/SwiftVoxel.git
fi
if [[ "${*}" =~ "build" ]]; then
  cd SwiftVoxel
  xcrun simctl list --json devices available; sleep 20 # fix a weird bug where xcrun simctl list --json devices available is empty the first run
  SIM_VER="$(xcrun simctl list --json devices available | grep name | grep Pro | head -1 | cut -d'"' -f4)"
  xcodebuild -workspace SwiftVoxel.xcworkspace -derivedDataPath /tmp/ -scheme SwiftVoxel -destination "platform=iOS Simulator,name=${SIM_VER}" build
  SIMID=$(xcrun simctl create test "com.apple.CoreSimulator.SimDeviceType.$(echo ${SIM_VER} | sed 's/ /-/g')")
  xcrun simctl boot "${SIMID}"
  sleep 120
  open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
  xcrun simctl install test /tmp/Build/Products/Debug-iphonesimulator/SwiftVoxel.app
  BUNDLE_ID="$(defaults read /tmp/Build/Products/Debug-iphonesimulator/SwiftVoxel.app/Info.plist CFBundleIdentifier)"
  xcrun simctl launch test "${BUNDLE_ID}"
  sleep 300 # Sleep 5 minutes to make sure the VM doesn't crash
fi
+ xcodebuild -workspace SwiftVoxel.xcworkspace -derivedDataPath /tmp/ -scheme SwiftVoxel -destination 'platform=iOS Simulator,name=iPhone 14 Pro' build
2023-04-26 13:58:34.190 xcodebuild[763:5550] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace SwiftVoxel.xcworkspace -derivedDataPath /tmp/ -scheme SwiftVoxel -destination "platform=iOS Simulator,name=iPhone 14 Pro" build

User defaults from command line:
    IDEDerivedDataPathOverride = /tmp
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: d1e0990e3ac35d10e417a5d5933452b9
Build description path: /tmp/Build/Intermediates.noindex/XCBuildData/d1e0990e3ac35d10e417a5d5933452b9.xcbuilddata

. . . 

Ld /tmp/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/RxSwift normal (in target 'RxSwift' from project 'Pods')
    cd /Users/anka/SwiftVoxel/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target x86_64-apple-ios8.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk -L/tmp/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/tmp/Build/Products/Debug-iphonesimulator/RxSwift -F/tmp/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/tmp/Build/Products/Debug-iphonesimulator/RxSwift -filelist /tmp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/RxSwift.LinkFileList -install_name @rpath/RxSwift.framework/RxSwift -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /tmp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/RxSwift_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /tmp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/RxSwift.swiftmodule -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /tmp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RxSwift.build/Objects-normal/x86_64/RxSwift_dependency_info.dat -o /tmp/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/RxSwift
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

/Users/anka/SwiftVoxel/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'RxRelay' from project 'Pods')
/Users/anka/SwiftVoxel/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'RxCocoa' from project 'Pods')
/Users/anka/SwiftVoxel/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to 16.4.99. (in target 'RxSwift' from project 'Pods')
** BUILD FAILED **

The following build commands failed:
    Ld /tmp/Build/Products/Debug-iphonesimulator/RxSwift/RxSwift.framework/RxSwift normal (in target 'RxSwift' from project 'Pods')
NorseGaud commented 1 year ago

Related: https://developer.apple.com/forums/thread/728088

NorseGaud commented 1 year ago

Looks to be solved with

❯ sed -i '' 's/IPHONEOS_DEPLOYMENT_TARGET = 8.0/IPHONEOS_DEPLOYMENT_TARGET = 11.0/g' Pods/Pods.xcodeproj/project.pbxproj