0

I'm trying to upload build through GitHub action and fastlane. I'm stuck in the MapBox framework. I'm using Github LFS to upload the Mapbox framework. But in the last I'm getting error given below please check.

ld: ignoring file /Users/runner/Library/Developer/Xcode/DerivedData/test-dplpvtipvtqvtobqpvumxtffttst/Build/Intermediates.noindex/ArchiveIntermediates/test/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/MapboxCoreMaps/MapboxCoreMaps.framework/MapboxCoreMaps, building for iOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )

Error:-

❌ Undefined symbols for architecture arm64 Symbol: OBJC_CLASS$_MBMLayerPosition Referenced from: objc-class-ref in Style.o ❌ ld: symbol(s) not found for architecture arm64 ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)

▸ Linking FirebaseCoreDiagnostics ** ARCHIVE FAILED **

The following build commands failed: Ld /Users/runner/Library/Developer/Xcode/DerivedData/test-dplpvtipvtqvtobqpvumxtffttst/Build/Intermediates.noindex/ArchiveIntermediates/test/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/MapboxMaps.framework/MapboxMaps normal (in target 'MapboxMaps' from project 'Pods') (1 failure) [10:59:06]: Exit status: 65

Question:- Can someone please explain to me how to solve this issue.

Can someone please explain to me How to get Progress?

Any help would be greatly appreciated.

Thanks in advance.

Github LFS

Screen Shot

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59

2 Answers2

1

You're not running git lfs pull in your Github action. How do I know that? Because the error message you get says:

ld: ignoring file /Users/runner/Library/Developer/Xcode/DerivedData/test-dplpvtipvtqvtobqpvumxtffttst/Build/Intermediates.noindex/ArchiveIntermediates/test/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/MapboxCoreMaps/MapboxCoreMaps.framework/MapboxCoreMaps, building for iOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )

If you convert these (0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F) to ASCII, you get a string, namely: version https://, meaning that your framework file (/Users/runner/Library/Developer/Xcode/DerivedData/test-dplpvtipvtqvtobqpvumxtffttst/Build/Intermediates.noindex/ArchiveIntermediates/test/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/MapboxMaps.framework/MapboxMap) still has a string pointer inside, starting with version https:// and not the actual framework itself.

So, what you should do, is to run git lfs pull when you're pulling the repo in your github action config file.

Something like this:

- name: checkout
  uses: actions/checkout@v2
  with:
      lfs: 'true'
- name: checkoutLFS
  uses: actions/checkout@v2
- run: git lfs pull
Dharman
  • 30,962
  • 25
  • 85
  • 135
f4z3k4s
  • 966
  • 7
  • 13
  • Could you please check the attached screen shot. I'm doing correct or not, if not could you please correct me https://i.stack.imgur.com/wv53F.png – Sham Dhiman Feb 08 '22 at 15:08
  • i have tried but i got the error You have an error in your yaml syntax on line 24 Could you please check – Sham Dhiman Feb 08 '22 at 16:09
  • 1
    You already got the error message, try to understand it. It's on line 24 in your yaml file. Yaml is indentation sensitive, meaning that a space in the wrong place makes the file incorrect. You have your 24th line, starting with the 3rd `uses` indented too much. Delete the extra 1 or 2 spaces before the 3rd `uses` and it should work fine. I'd recommend using checkout@v2 instead of checkout@v1 as well as it doesn't pull all commit history unnecessariliy. – f4z3k4s Feb 09 '22 at 09:33
0

Thank you so much @f4z3k4s. I updated my YML file with the Github Action LFS value set to true.

Here is the Updated YML file:-

Updated YML file

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
  • 1
    You're welcome. Please upvote the original answer on my the original thread here as it belongs to there, not here: https://stackoverflow.com/questions/68196880/xcode-build-fails-with-undefined-symbols-for-architecture-arm64/68196881?noredirect=1#comment125520842_68196881 – f4z3k4s Feb 10 '22 at 17:11