JK3Y / NPS-Browser-macOS

macOS version of NPS Browser
The Unlicense
182 stars 21 forks source link

Failed to build Carthage dependencies with Xcode 12.4 #70

Open MintSet opened 3 years ago

MintSet commented 3 years ago

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 commented 5 months ago

Please take a look of https://github.com/JK3Y/NPS-Browser-macOS/pull/74