迦太基档案内容:
github "SwiftyJSON/SwiftyJSON"错误:
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build/Intermediates.noindex/ArchiveIntermediates/SwiftyJSON\ tvOS/IntermediateBuildFilesPath/UninstalledProducts/appletvos/SwiftyJSON.framework/SwiftyJSON /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build/Products/Release-appletvsimulator/SwiftyJSON.framework/SwiftyJSON -output /Users/samrezikram/Downloads/CarthageApp/Carthage/Build/tvOS/SwiftyJSON.framework/SwiftyJSON
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/px/jx4gljpj47j06qr7blw6b4w80000gn/T/carthage-xcodebuild.1NVy7o.log发布于 2020-09-22 22:05:43
这是一个迦太基& Xcode 12期。不幸的是,目前还没有迦太基小组的最新情况来解决这个问题。但是,您可以运行一个shell脚本来解除阻塞。对我来说很管用。您可以跟踪迦太基github帐户上的线程。https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323
carthage-build.sh并将其放在您的Xcode项目中#!/usr/bin/env bash
# carthage.sh
# Usage example: ./carthage-build.sh build --platform iOS
set -euo pipefail
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"$ ./carthage-build.sh build --platform iOS您的框架应该能够更新和编译。
FYI -我没有写这个脚本,而是归功于 https://github.com/rastersize。
有关此问题的最新消息,请按这里的内容进行。https://github.com/Carthage/Carthage/issues/3019
发布于 2020-09-21 00:31:28
为了在更新Carthage时避免/usr/bin/xcrun lipo -create问题,我们必须修改工作区配置。
Xcode 12.0
curl https://gist.githubusercontent.com/skymobilebuilds/61f4a95bd62a3db36b52719aeab7e0d5/raw/4ba422e5f3a5e7e37cdcb1e232058c5431fc59fc/carthage-xc12.sh -o wcarthage && chmod +x wcarthageXcode 12.0.1
curl https://gist.githubusercontent.com/skymobilebuilds/61f4a95bd62a3db36b52719aeab7e0d5/raw/f638b57097897b38fc0b1e62a527a814952968d7/carthage-xc12.sh -o wcarthage && chmod +x wcarthageXcode 12.2
在wcarthage文件中使用此脚本。
#!/bin/sh -e
echo "Carthage wrapper"
echo "Applying Xcode 12 workaround..."
xcconfig="/tmp/xc12-carthage.xcconfig"
# Xcode 12.x
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' > $xcconfig
# General stuff
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
echo 'ONLY_ACTIVE_ARCH=NO' >> $xcconfig
echo 'VALID_ARCHS = $(inherited) x86_64' >> $xcconfig
export XCODE_XCCONFIG_FILE="$xcconfig"
echo "Workaround applied. xcconfig here: $XCODE_XCCONFIG_FILE"
carthage $@./wcarthage update --platform iOS --cache-builds或./wcarthage bootstrap --platform iOS --cache-builds我在空中移动建筑找到了这个修复程序
发布于 2021-02-17 01:52:39
我也遇到了同样的问题--这通常表明项目本身无法编译。
这是Xcode 12的一个问题。
在你的终端使用中,
curl https://gist.githubusercontent.com/skymobilebuilds/61f4a95bd62a3db36b52719aeab7e0d5/raw/61affe5b13efaeb83ba3aaf5ef2cb97bab893485/carthage-xc12.sh -o wcarthage && chmod +x wcarthage 那么用法是,
./wcarthage update --platform iOS https://stackoverflow.com/questions/63978083
复制相似问题