Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Failed to build Carthage dependencies with Xcode 12.4 #70

Open
MintSet opened this issue Apr 26, 2021 · 1 comment
Open

Failed to build Carthage dependencies with Xcode 12.4 #70

MintSet opened this issue Apr 26, 2021 · 1 comment

Comments

@MintSet
Copy link

MintSet commented Apr 26, 2021

I try to build project with carthage dependencies using terminal:
carthage bootstrap --platform macOS --no-use-binaries --cache-builds

But receive error:

*** Building scheme "Realm" in Realm.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users//Develop/Xcode_projects/NPS-Browser-macOS/Carthage/Checkouts/realm-cocoa/Carthage/Realm.xcworkspace -scheme Realm -configuration Release -derivedDataPath /Users//Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/realm-cocoa/v3.21.0 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/mp/8z1h7h_x56q3b5c_w2tsq84m0000gn/T/realm-cocoa SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/***/Develop/Xcode_projects/NPS-Browser-macOS/Carthage/Checkouts/realm-cocoa)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/mp/8z1h7h_x56q3b5c_w2tsq84m0000gn/T/carthage-xcodebuild.qPhqFI.log

The last message in log file:

NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** ARCHIVE FAILED **

Possible solution:

  1. Update Realm dependencies version to 5.5.1
  2. Update Realm object creation in RealmStorageContext.swift:74 (change update parameter from false to .error)
  3. Install carthage dependencies with carthage bootstrap --platform macOS --no-use-binaries --cache-builds --use-xcframeworks
  4. Replace frameworks with xcframeworks in Frameworks, Libraries, and Embedded Content in project settings
@danieltarazona
Copy link

Please take a look of #74

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

No branches or pull requests

2 participants