Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed at xcrun dwarfdump --uuid on xcode 13 #3273

Open
zhaosanlong opened this issue May 27, 2022 · 0 comments
Open

Build failed at xcrun dwarfdump --uuid on xcode 13 #3273

zhaosanlong opened this issue May 27, 2022 · 0 comments

Comments

@zhaosanlong
Copy link

zhaosanlong commented May 27, 2022

  • carthage install method: homebrew
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.38.0
  • xcodebuild -version: Xcode 13.2.1, Build version 13C100
  • Are you using --no-build? NO
  • Are you using --no-use-binaries? YES
  • Are you using --use-submodules? NO
  • Are you using --cache-builds? NO
  • Are you using --new-resolver? NO
  • Are you using --use-xcframeworks? YES

Cartfile
github "krzyzanowskim/CryptoSwift"

Carthage Output

./build-static-carthage.sh build "CryptoSwift" --no-use-binaries --use-xcframeworks --platform ios
****** Carthage --- Applying Xcode 13 workaround ******

Building static frameworks with Xcode temporary xconfig file:
/tmp/static.xcconfig.qv3LmL

With contents:
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300 = arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300__BUILD_13C100 = arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)_NATIVE_ARCH_64_BIT$(NATIVE_ARCH_64_BIT)_XCODE$(XCODE_VERSION_MAJOR))
MACH_O_TYPE = staticlib
DEBUG_INFORMATION_FORMAT = dwarf
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
FRAMEWORK_SEARCH_PATHS = $(inherited) ./Carthage/Build/iOS/**

*** xcodebuild output can be found in /var/folders/1n/hfq4zzq97t76ddkwgwg9_xt80000gp/T/carthage-xcodebuild.qmNFhr.log
*** Building scheme "CryptoSwift" in CryptoSwift.xcodeproj
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun dwarfdump --uuid /Users/zhaosanlong/Library/Caches/org.carthage.CarthageKit/DerivedData/13.2.1_13C100/CryptoSwift/1.5.1/Build/Intermediates.noindex/ArchiveIntermediates/CryptoSwift/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/CryptoSwift.framework/CryptoSwift

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/1n/hfq4zzq97t76ddkwgwg9_xt80000gp/T/carthage-xcodebuild.qmNFhr.log

build-static-carthage.sh

#!/usr/bin/env bash

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

FMWK_SEARCH_PATHS="\$(inherited) "
FMWK_SEARCH_PATHS+="./Carthage/Build/iOS/**"

echo "****** Carthage --- Applying Xcode 13 workaround ******"
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300__BUILD_$CURRENT_XCODE_VERSION = 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
echo "MACH_O_TYPE = staticlib" >> $xcconfig
echo "DEBUG_INFORMATION_FORMAT = dwarf" >> $xcconfig
echo 'BUILD_LIBRARY_FOR_DISTRIBUTION=YES' >> $xcconfig
echo "FRAMEWORK_SEARCH_PATHS = $FMWK_SEARCH_PATHS" >>$xcconfig

echo
echo "Building static frameworks with Xcode temporary xconfig file:"
echo $xcconfig
echo
echo "With contents:"
while read line; do
    echo "$line"
done <$xcconfig
echo
    
export XCODE_XCCONFIG_FILE="$xcconfig"
carthage build "$@"

Other
build xcframework successfully with "MACH_O_TYPE = mh_dylib"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant