Skip to content

Apple Silicon support - #234

Closed
jspiro wants to merge 2 commits into
gitx:masterfrom
jspiro:jono/2021-11-26/arm-support
Closed

jspiro wants to merge 2 commits into
gitx:masterfrom
jspiro:jono/2021-11-26/arm-support

Conversation

@jspiro

@jspiro jspiro commented Nov 26, 2021 •

Copy link
Copy Markdown
Member

Note: Objective-Git is linked to a branch: gitx/objective-git#15

Partially fixes #204.

@jspiro jspiro mentioned this pull request Nov 26, 2021
@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

Release build based on this PR, for those willing to trust me, or desperate enough to do so:
GitX.app.zip

@hannesa2

hannesa2 commented Nov 26, 2021 •

Copy link
Copy Markdown
Contributor

A: Binary
You binary works like a charm 👍, only when ever a release would be made, the info needs an update
image

B: Own build on M1
I'm no Apple-habitat(XCode) developer, that's why please be patient.
I checked your branch and submodule out and did exactly what the CI do

cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
xcodebuild -workspace GitX.xcworkspace -scheme GitX archive

but I run into
image

What I'm missing ?

@felixpalmer

Copy link
Copy Markdown

Really appreciate you making this work on M1. I tried the binary, but I'm getting and error:

Process:               GitX [79203]
Path:                  /private/var/folders/*/GitX 3.app/Contents/MacOS/GitX
Identifier:            net.phere.GitX
Version:               0.13 (0.13)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               502

Date/Time:             2021-11-26 11:02:53.9626 +0100
OS Version:            macOS 12.0.1 (21A559)
Report Version:        12
Anonymous UUID:        28BF1C42-73BC-44D8-AF54-4F2769AC8D6B

Sleep/Wake UUID:       34F903CA-2F09-45E6-8944-7EA4D704B657

Time Awake Since Boot: 78000 seconds
Time Since Wake:       2097 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: /opt/homebrew/*/libcrypto.3.dylib
Referenced from: /private/var/folders/*/GitX 3.app/Contents/Frameworks/ObjectiveGit.framework/Versions/A/ObjectiveGit
Reason: tried: '/opt/homebrew/*/libcrypto.3.dylib' (no such file), '/usr/local/lib/libcrypto.3.dylib' (no such file), '/usr/lib/libcrypto.3.dylib' (no such file)
(terminated at launch; ignore backtrace)

Application Specific Information:
Library not loaded: /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib
Referenced from: /private/var/folders/5_/c5x3n3t1691cpnnsp3dfhcqh0000gp/T/AppTranslocation/7AF86BA8-A022-4246-B450-0199042EF136/d/GitX 3.app/Contents/Frameworks/ObjectiveGit.framework/Versions/A/ObjectiveGit
Reason: tried: '/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib' (no such file), '/usr/local/lib/libcrypto.3.dylib' (no such file), '/usr/lib/libcrypto.3.dylib' (no such file)

This may be due to the fact that I have installed Homebrew only my current user in a different location. E.g. which brew gives me /Users/myuser/git/homebrew/bin/brew

@felixpalmer

Copy link
Copy Markdown

Brew for M1 is here located /opt/homebrew/bin/brew

By default yes, but a supported configuration method is to install it at another location. This is especially useful if you have multiple users and you don't want to install globally https://docs.brew.sh/Installation#untar-anywhere

@hannesa2

Copy link
Copy Markdown
Contributor

Maybe you need this ? brew install openssl

@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

@hannesa2 huh I wonder if I have a cached build somehow. I originally made the change bumping the minimum from 10.8 to 10.9; but after cleaning the build and removing that change I was still able to build.

I think we can finally drop support for 10.8...

Do a pull and try again.

@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

@felixpalmer We're already having trouble supporting the two canonical locations for brew, let alone custom. I wish I knew how to support whatever the default location was in an agnostic manner.

Typically brew --prefix is what you want, but that's only usable in scripts. It won't work everywhere in Xcode, I'm guessing.

@felixpalmer

Copy link
Copy Markdown

I can confirm that brew install openssl (executed using the system-wide Homebrew instance) fixed the issue. Thanks @hannesa2 & @jspiro !

@hannesa2

hannesa2 commented Nov 26, 2021 •

Copy link
Copy Markdown
Contributor

1: I did a git pull

image

2: Run this two commands

cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
xcodebuild -workspace GitX.xcworkspace -scheme GitX archive

3:

I run into this

ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: warning: directory not found for option '-L/Users/hannes/git/gitx/External/objective-git/External/build/lib'
ld: warning: ignoring file External/libgit2.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/openssl/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/openssl/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/lib/libssh2.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_git_annotated_commit_free", referenced from:
      -[GTRepository(Merging) analyzeMerge:fromBranch:error:] in GTRepository+Merging.o
  "_git_annotated_commit_lookup", referenced from:
      -[GTRepository(Merging) annotatedCommit:fromCommit:error:] in GTRepository+Merging.o
  "_git_attr_cache_flush", referenced from:
      -[GTRepository flushAttributesCache] in GTRepository.o
  "_git_attr_get", referenced from:
      -[GTRepository(Attributes) attributeWithName:path:] in GTRepository+Attributes.o
  "_git_blame_file", referenced from:
      -[GTRepository(Blame) blameWithFile:options:error:] in GTRepository+Blame.o
  "_git_blame_free", referenced from:
      -[GTBlame dealloc] in GTBlame.o
  "_git_blame_get_hunk_byindex", referenced from:
      -[GTBlame hunkAtIndex:] in GTBlame.o
  "_git_blame_get_hunk_byline", referenced from:
      -[GTBlame hunkAtLineNumber:] in GTBlame.o
  "_git_blame_get_hunk_count", referenced from:
      -[GTBlame hunkCount] in GTBlame.o
  "_git_blob_create_frombuffer", referenced from:
      -[GTBlob initWithData:inRepository:error:] in GTBlob.o
  "_git_blob_create_fromdisk", referenced from:
      -[GTBlob initWithFile:inRepository:error:] in GTBlob.o
  "_git_blob_filtered_content", referenced from:
      -[GTBlob applyFiltersForPath:error:] in GTBlob.o
  "_git_blob_rawcontent", referenced from:
      -[GTBlob content] in GTBlob.o
      -[GTBlob data] in GTBlob.o
  "_git_blob_rawsize", referenced from:
      -[GTBlob size] in GTBlob.o
  "_git_branch_delete", referenced from:
      -[GTBranch deleteWithError:] in GTBranch.o
  "_git_branch_is_head", referenced from:
      -[GTBranch isHEAD] in GTBranch.o
  "_git_branch_iterator_free", referenced from:
      ___59-[GTRepository enumerateBranchesWithType:error:usingBlock:]_block_invoke in GTRepository.o
  "_git_branch_iterator_new", referenced from:
      -[GTRepository enumerateBranchesWithType:error:usingBlock:] in GTRepository.o
  "_git_branch_lookup", referenced from:
      -[GTRepository lookUpBranchWithName:type:success:error:] in GTRepository.o
  "_git_branch_move", referenced from:
      -[GTBranch rename:force:error:] in GTBranch.o
  "_git_branch_name", referenced from:
      -[GTBranch name] in GTBranch.o
      -[GTBranch shortName] in GTBranch.o
  "_git_branch_next", referenced from:
      -[GTRepository enumerateBranchesWithType:error:usingBlock:] in GTRepository.o
  "_git_branch_remote_name", referenced from:
      -[GTBranch remoteName] in GTBranch.o
  "_git_branch_set_upstream", referenced from:
      -[GTBranch updateTrackingBranch:error:] in GTBranch.o
  "_git_branch_upstream", referenced from:
      -[GTBranch trackingBranchWithError:success:] in GTBranch.o
  "_git_buf_contains_nul", referenced from:
      -[NSData(Git) git_containsNUL] in NSData+Git.o
  "_git_buf_free", referenced from:
      -[GTRepository preparedMessageWithError:] in GTRepository.o
      +[GTNote defaultReferenceNameForRepository:error:] in GTNote.o
      -[GTDiffPatch patchData] in GTDiffPatch.o
  "_git_buf_grow", referenced from:
      +[NSData(Git) git_dataWithBuffer:] in NSData+Git.o
  "_git_buf_is_binary", referenced from:
      -[NSData(Git) git_isBinary] in NSData+Git.o
  "_git_buf_set", referenced from:
      _GTFilterApply in GTFilter.o
  "_git_checkout_index", referenced from:
      -[GTRepository checkoutIndex:options:error:] in GTRepository.o
  "_git_checkout_tree", referenced from:
      -[GTRepository performCheckout:options:error:] in GTRepository.o
  "_git_clone", referenced from:
      +[GTRepository cloneFromURL:toWorkingDirectory:options:error:transferProgressBlock:] in GTRepository.o
  "_git_commit_author", referenced from:
      -[GTCommit author] in GTCommit.o
  "_git_commit_committer", referenced from:
      -[GTCommit committer] in GTCommit.o
  "_git_commit_create", referenced from:
      -[GTRepository(Committing) createCommitWithTree:message:author:committer:parents:updatingReferenceNamed:error:] in GTRepository+Committing.o
  "_git_commit_id", referenced from:
      -[GTCommit OID] in GTCommit.o
  "_git_commit_message", referenced from:
      -[GTCommit message] in GTCommit.o
  "_git_commit_parent", referenced from:
      -[GTCommit parents] in GTCommit.o
  "_git_commit_parent_id", referenced from:
      -[GTCommit parentOIDs] in GTCommit.o
  "_git_commit_parentcount", referenced from:
      -[GTCommit isMerge] in GTCommit.o
      -[GTCommit parentOIDs] in GTCommit.o
      -[GTCommit parents] in GTCommit.o
  "_git_commit_time", referenced from:
      -[GTCommit commitTime] in GTCommit.o
  "_git_commit_time_offset", referenced from:
      -[GTCommit commitTime] in GTCommit.o
  "_git_commit_tree", referenced from:
      -[GTCommit tree] in GTCommit.o
  "_git_config_delete_entry", referenced from:
      -[GTConfiguration deleteValueForKey:error:] in GTConfiguration.o
  "_git_config_foreach", referenced from:
      -[GTConfiguration configurationKeys] in GTConfiguration.o
  "_git_config_free", referenced from:
      -[GTConfiguration dealloc] in GTConfiguration.o
  "_git_config_get_bool", referenced from:
      -[GTConfiguration boolForKey:] in GTConfiguration.o
  "_git_config_get_int32", referenced from:
      -[GTConfiguration int32ForKey:] in GTConfiguration.o
  "_git_config_get_int64", referenced from:
      -[GTConfiguration int64ForKey:] in GTConfiguration.o
  "_git_config_get_string_buf", referenced from:
      -[GTConfiguration stringForKey:] in GTConfiguration.o
  "_git_config_open_default", referenced from:
      +[GTConfiguration defaultConfiguration] in GTConfiguration.o
  "_git_config_set_bool", referenced from:
      -[GTConfiguration setBool:forKey:] in GTConfiguration.o
  "_git_config_set_int32", referenced from:
      -[GTConfiguration setInt32:forKey:] in GTConfiguration.o
  "_git_config_set_int64", referenced from:
      -[GTConfiguration setInt64:forKey:] in GTConfiguration.o
  "_git_config_set_string", referenced from:
      -[GTConfiguration setString:forKey:] in GTConfiguration.o
  "_git_cred_ssh_key_memory_new", referenced from:
      +[GTCredential credentialWithUserName:publicKeyString:privateKeyString:passphrase:error:] in GTCredential.o
  "_git_cred_ssh_key_new", referenced from:
      +[GTCredential credentialWithUserName:publicKeyURL:privateKeyURL:passphrase:error:] in GTCredential.o
  "_git_cred_userpass_plaintext_new", referenced from:
      +[GTCredential credentialWithUserName:password:error:] in GTCredential.o
  "_git_diff_blob_to_buffer", referenced from:
      ___70+[GTDiffDelta diffDeltaFromBlob:forPath:toData:forPath:options:error:]_block_invoke in GTDiffDelta.o
  "_git_diff_blobs", referenced from:
      ___70+[GTDiffDelta diffDeltaFromBlob:forPath:toBlob:forPath:options:error:]_block_invoke in GTDiffDelta.o
  "_git_diff_buffers", referenced from:
      ___70+[GTDiffDelta diffDeltaFromData:forPath:toData:forPath:options:error:]_block_invoke in GTDiffDelta.o
  "_git_diff_find_similar", referenced from:
      -[GTDiff findSimilarWithOptions:] in GTDiff.o
  "_git_diff_free", referenced from:
      -[GTDiff dealloc] in GTDiff.o
  "_git_diff_get_delta", referenced from:
      ___39-[GTDiffDelta initWithDiff:deltaIndex:]_block_invoke in GTDiffDelta.o
  "_git_diff_index_to_index", referenced from:
      ___63+[GTDiff diffOldIndex:withNewIndex:inRepository:options:error:]_block_invoke in GTDiff.o
  "_git_diff_index_to_workdir", referenced from:
      ___64+[GTDiff diffIndexToWorkingDirectoryInRepository:options:error:]_block_invoke in GTDiff.o
  "_git_diff_merge", referenced from:
      +[GTDiff diffWorkingDirectoryToHEADInRepository:options:error:] in GTDiff.o
      -[GTDiff mergeDiffWithDiff:error:] in GTDiff.o
  "_git_diff_num_deltas", referenced from:
      -[GTDiff deltaCount] in GTDiff.o
  "_git_diff_num_deltas_of_type", referenced from:
      -[GTDiff numberOfDeltasWithType:] in GTDiff.o
  "_git_diff_tree_to_index", referenced from:
      ___62+[GTDiff diffOldTree:withNewIndex:inRepository:options:error:]_block_invoke in GTDiff.o
      ___55+[GTDiff diffIndexFromTree:inRepository:options:error:]_block_invoke in GTDiff.o
  "_git_diff_tree_to_tree", referenced from:
      ___61+[GTDiff diffOldTree:withNewTree:inRepository:options:error:]_block_invoke in GTDiff.o
  "_git_diff_tree_to_workdir", referenced from:
      ___66+[GTDiff diffWorkingDirectoryFromTree:inRepository:options:error:]_block_invoke in GTDiff.o
  "_git_filter_list_apply_to_blob", referenced from:
      -[GTFilterList applyToBlob:error:] in GTFilterList.o
  "_git_filter_list_apply_to_data", referenced from:
      -[GTFilterList applyToData:error:] in GTFilterList.o
  "_git_filter_list_apply_to_file", referenced from:
      -[GTFilterList applyToPath:inRepository:error:] in GTFilterList.o
  "_git_filter_list_free", referenced from:
      -[GTFilterList dealloc] in GTFilterList.o
  "_git_filter_list_load", referenced from:
      -[GTRepository filterListWithPath:blob:mode:options:success:error:] in GTRepository.o
  "_git_filter_register", referenced from:
      -[GTFilter registerWithPriority:error:] in GTFilter.o
  "_git_filter_source_id", referenced from:
      -[GTFilterSource initWithGitFilterSource:] in GTFilterSource.o
  "_git_filter_source_mode", referenced from:
      -[GTFilterSource initWithGitFilterSource:] in GTFilterSource.o
  "_git_filter_source_path", referenced from:
      -[GTFilterSource initWithGitFilterSource:] in GTFilterSource.o
  "_git_filter_source_repo", referenced from:
      -[GTFilterSource initWithGitFilterSource:] in GTFilterSource.o
  "_git_filter_unregister", referenced from:
      -[GTFilter unregister:] in GTFilter.o
  "_git_graph_ahead_behind", referenced from:
      -[GTRepository calculateAhead:behind:ofOID:relativeToOID:error:] in GTRepository.o
  "_git_index_add", referenced from:
      -[GTIndex addEntry:error:] in GTIndex.o
  "_git_index_add_all", referenced from:
      -[GTIndex addAll:] in GTIndex.o
  "_git_index_add_bypath", referenced from:
      -[GTIndex addFile:error:] in GTIndex.o
  "_git_index_add_frombuffer", referenced from:
      -[GTIndex addData:withPath:error:] in GTIndex.o
  "_git_index_clear", referenced from:
      -[GTIndex clear:] in GTIndex.o
  "_git_index_conflict_iterator_free", referenced from:
      ___56-[GTIndex enumerateConflictedFilesWithError:usingBlock:]_block_invoke in GTIndex.o
  "_git_index_conflict_iterator_new", referenced from:
      -[GTIndex enumerateConflictedFilesWithError:usingBlock:] in GTIndex.o
  "_git_index_conflict_next", referenced from:
      -[GTIndex enumerateConflictedFilesWithError:usingBlock:] in GTIndex.o
  "_git_index_entrycount", referenced from:
      -[GTIndex entryCount] in GTIndex.o
  "_git_index_find", referenced from:
      -[GTIndex entryWithPath:error:] in GTIndex.o
  "_git_index_free", referenced from:
      -[GTIndex dealloc] in GTIndex.o
  "_git_index_get_byindex", referenced from:
      -[GTIndex entryAtIndex:] in GTIndex.o
  "_git_index_has_conflicts", referenced from:
      -[GTIndex hasConflicts] in GTIndex.o
  "_git_index_new", referenced from:
      +[GTIndex inMemoryIndexWithRepository:error:] in GTIndex.o
  "_git_index_open", referenced from:
      +[GTIndex indexWithFileURL:repository:error:] in GTIndex.o
  "_git_index_path", referenced from:
      -[GTIndex fileURL] in GTIndex.o
  "_git_index_read", referenced from:
      -[GTIndex refresh:] in GTIndex.o
  "_git_index_read_tree", referenced from:
      -[GTIndex addContentsOfTree:error:] in GTIndex.o
  "_git_index_remove_bypath", referenced from:
      -[GTIndex removeFile:error:] in GTIndex.o
  "_git_index_update_all", referenced from:
      -[GTIndex updatePathspecs:error:passingTest:] in GTIndex.o
  "_git_index_write", referenced from:
      -[GTIndex write:] in GTIndex.o
  "_git_index_write_tree", referenced from:
      -[GTIndex writeTree:] in GTIndex.o
  "_git_index_write_tree_to", referenced from:
      -[GTIndex writeTreeToRepository:error:] in GTIndex.o
  "_git_libgit2_init", referenced from:
      _GTSetup in ObjectiveGit.o
  "_git_libgit2_opts", referenced from:
      +[GTRepository cloneFromURL:toWorkingDirectory:options:error:transferProgressBlock:] in GTRepository.o
  "_git_merge", referenced from:
      -[GTRepository(Merging) mergeBranchIntoCurrentBranch:withError:] in GTRepository+Merging.o
  "_git_merge_analysis", referenced from:
      -[GTRepository(Merging) analyzeMerge:fromBranch:error:] in GTRepository+Merging.o
  "_git_merge_base", referenced from:
      -[GTRepository mergeBaseBetweenFirstOID:secondOID:error:] in GTRepository.o
  "_git_merge_commits", referenced from:
      -[GTCommit merge:error:] in GTCommit.o
  "_git_merge_file", referenced from:
      -[GTRepository(Merging) contentsOfDiffWithAncestor:ourSide:theirSide:error:] in GTRepository+Merging.o
  "_git_merge_file_init_input", referenced from:
      -[GTRepository(Merging) contentsOfDiffWithAncestor:ourSide:theirSide:error:] in GTRepository+Merging.o
  "_git_merge_file_result_free", referenced from:
      -[GTRepository(Merging) contentsOfDiffWithAncestor:ourSide:theirSide:error:] in GTRepository+Merging.o
  "_git_merge_trees", referenced from:
      -[GTTree merge:ancestor:error:] in GTTree.o
  "_git_note_author", referenced from:
      -[GTNote author] in GTNote.o
  "_git_note_committer", referenced from:
      -[GTNote committer] in GTNote.o
  "_git_note_create", referenced from:
      -[GTRepository createNote:target:referenceName:author:committer:overwriteIfExists:error:] in GTRepository.o
  "_git_note_default_ref", referenced from:
      +[GTNote defaultReferenceNameForRepository:error:] in GTNote.o
  "_git_note_free", referenced from:
      -[GTNote dealloc] in GTNote.o
  "_git_note_id", referenced from:
      -[GTNote targetOID] in GTNote.o
  "_git_note_iterator_free", referenced from:
      ___65-[GTRepository enumerateNotesWithReferenceName:error:usingBlock:]_block_invoke in GTRepository.o
  "_git_note_iterator_new", referenced from:
      -[GTRepository enumerateNotesWithReferenceName:error:usingBlock:] in GTRepository.o
  "_git_note_message", referenced from:
      -[GTNote note] in GTNote.o
  "_git_note_next", referenced from:
      -[GTRepository enumerateNotesWithReferenceName:error:usingBlock:] in GTRepository.o
  "_git_note_read", referenced from:
      -[GTNote initWithTargetGitOID:repository:referenceName:error:] in GTNote.o
  "_git_note_remove", referenced from:
      -[GTRepository removeNoteFromObject:referenceName:author:committer:error:] in GTRepository.o
  "_git_object_free", referenced from:
      -[GTObject dealloc] in GTObject.o
  "_git_object_id", referenced from:
      -[GTObject isEqual:] in GTObject.o
      -[GTObject OID] in GTObject.o
  "_git_object_lookup", referenced from:
      -[GTRepository lookUpObjectByGitOid:objectType:error:] in GTRepository.o
      -[GTBlob initWithOid:inRepository:error:] in GTBlob.o
      -[GTObject(GTIndexEntry) initWithIndexEntry:error:] in GTIndexEntry.o
      -[GTTreeBuilder writeTree:] in GTTreeBuilder.o
  "_git_object_owner", referenced from:
      -[GTObject initWithObj:inRepository:] in GTObject.o
  "_git_object_peel", referenced from:
      -[GTObject objectByPeelingToType:error:] in GTObject.o
  "_git_object_type", referenced from:
      -[GTObject initWithObj:inRepository:] in GTObject.o
      -[GTObject type] in GTObject.o
  "_git_object_type2string", referenced from:
      -[GTObject initWithObj:inRepository:] in GTObject.o
      -[GTObject type] in GTObject.o
      -[GTTreeEntry typeString] in GTTreeEntry.o
  "_git_odb_exists", referenced from:
      -[GTObjectDatabase containsObjectWithOID:] in GTObjectDatabase.o
  "_git_odb_free", referenced from:
      -[GTObjectDatabase dealloc] in GTObjectDatabase.o
  "_git_odb_hash", referenced from:
      +[GTOID(GTObjectDatabase) OIDByHashingData:type:error:] in GTOID.o
  "_git_odb_object_data", referenced from:
      -[GTOdbObject data] in GTOdbObject.o
  "_git_odb_object_free", referenced from:
      -[GTOdbObject dealloc] in GTOdbObject.o
  "_git_odb_object_id", referenced from:
      -[GTOdbObject OID] in GTOdbObject.o
  "_git_odb_object_size", referenced from:
      -[GTOdbObject length] in GTOdbObject.o
  "_git_odb_object_type", referenced from:
      -[GTOdbObject type] in GTOdbObject.o
  "_git_odb_open_wstream", referenced from:
      -[GTObjectDatabase writeData:type:error:] in GTObjectDatabase.o
  "_git_odb_read", referenced from:
      -[GTObjectDatabase objectWithOID:error:] in GTObjectDatabase.o
  "_git_odb_stream_finalize_write", referenced from:
      -[GTObjectDatabase writeData:type:error:] in GTObjectDatabase.o
  "_git_odb_stream_free", referenced from:
      ___41-[GTObjectDatabase writeData:type:error:]_block_invoke in GTObjectDatabase.o
  "_git_odb_stream_write", referenced from:
      -[GTObjectDatabase writeData:type:error:] in GTObjectDatabase.o
  "_git_oid_cmp", referenced from:
      -[GTObject isEqual:] in GTObject.o
  "_git_oid_cpy", referenced from:
      -[GTOID initWithGitOid:] in GTOID.o
  "_git_oid_equal", referenced from:
      -[GTOID isEqual:] in GTOID.o
  "_git_oid_fromstr", referenced from:
      -[GTOID initWithSHACString:error:] in GTOID.o
  "_git_oid_iszero", referenced from:
      -[GTOID isZero] in GTOID.o
  "_git_oid_tostr", referenced from:
      -[GTRepository lookUpObjectByGitOid:objectType:error:] in GTRepository.o
  "_git_oid_tostr_s", referenced from:
      -[GTOID SHA] in GTOID.o
  "_git_patch_free", referenced from:
      -[GTDiffPatch dealloc] in GTDiffPatch.o
  "_git_patch_from_blob_and_buffer", referenced from:
      ___70+[GTDiffDelta diffDeltaFromBlob:forPath:toData:forPath:options:error:]_block_invoke_4 in GTDiffDelta.o
  "_git_patch_from_blobs", referenced from:
      ___70+[GTDiffDelta diffDeltaFromBlob:forPath:toBlob:forPath:options:error:]_block_invoke_2 in GTDiffDelta.o
  "_git_patch_from_buffers", referenced from:
      ___70+[GTDiffDelta diffDeltaFromData:forPath:toData:forPath:options:error:]_block_invoke_4 in GTDiffDelta.o
  "_git_patch_from_diff", referenced from:
      ___39-[GTDiffDelta initWithDiff:deltaIndex:]_block_invoke.56 in GTDiffDelta.o
  "_git_patch_get_hunk", referenced from:
      -[GTDiffHunk initWithPatch:hunkIndex:] in GTDiffHunk.o
  "_git_patch_get_line_in_hunk", referenced from:
      -[GTDiffHunk enumerateLinesInHunk:usingBlock:] in GTDiffHunk.o
  "_git_patch_line_stats", referenced from:
      -[GTDiffPatch initWithGitPatch:delta:] in GTDiffPatch.o
  "_git_patch_num_hunks", referenced from:
      -[GTDiffPatch hunkCount] in GTDiffPatch.o
  "_git_patch_size", referenced from:
      -[GTDiffPatch sizeWithContext:hunkHeaders:fileHeaders:] in GTDiffPatch.o
  "_git_patch_to_buf", referenced from:
      -[GTDiffPatch patchData] in GTDiffPatch.o
  "_git_push_init_options", referenced from:
      -[GTRepository(RemoteOperations) pushRefspecs:toRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_reference_create", referenced from:
      -[GTRepository createReferenceNamed:fromOID:message:error:] in GTRepository.o
  "_git_reference_delete", referenced from:
      -[GTReference deleteWithError:] in GTReference.o
  "_git_reference_free", referenced from:
      -[GTReference dealloc] in GTReference.o
  "_git_reference_is_branch", referenced from:
      -[GTReference isBranch] in GTReference.o
  "_git_reference_is_note", referenced from:
      -[GTReference isNote] in GTReference.o
  "_git_reference_is_remote", referenced from:
      -[GTReference isRemote] in GTReference.o
  "_git_reference_is_tag", referenced from:
      -[GTReference isTag] in GTReference.o
  "_git_reference_is_valid_name", referenced from:
      +[GTReference isValidReferenceName:] in GTReference.o
  "_git_reference_list", referenced from:
      -[GTRepository referenceNamesWithError:] in GTRepository.o
  "_git_reference_lookup", referenced from:
      -[GTRepository(References) lookUpReferenceWithName:error:] in GTRepository+References.o
  "_git_reference_name", referenced from:
      -[GTReference name] in GTReference.o
  "_git_reference_peel", referenced from:
      -[GTReference resolvedTarget] in GTReference.o
  "_git_reference_rename", referenced from:
      -[GTReference referenceByRenaming:error:] in GTReference.o
  "_git_reference_resolve", referenced from:
      -[GTReference initByResolvingSymbolicReference:error:] in GTReference.o
  "_git_reference_set_target", referenced from:
      -[GTReference referenceByUpdatingTarget:message:error:] in GTReference.o
  "_git_reference_symbolic_create", referenced from:
      -[GTRepository createReferenceNamed:fromReference:message:error:] in GTRepository.o
  "_git_reference_symbolic_set_target", referenced from:
      -[GTReference referenceByUpdatingTarget:message:error:] in GTReference.o
  "_git_reference_symbolic_target", referenced from:
      -[GTReference unresolvedTarget] in GTReference.o
  "_git_reference_target", referenced from:
      -[GTReference unresolvedTarget] in GTReference.o
      -[GTReference git_oid] in GTReference.o
  "_git_reference_type", referenced from:
      -[GTReference referenceType] in GTReference.o
      -[GTReference referenceByUpdatingTarget:message:error:] in GTReference.o
  "_git_reflog_append", referenced from:
      -[GTReflog writeEntryWithCommitter:message:error:] in GTReflog.o
  "_git_reflog_entry_byindex", referenced from:
      -[GTReflog entryAtIndex:] in GTReflog.o
  "_git_reflog_entry_committer", referenced from:
      -[GTReflogEntry committer] in GTReflogEntry.o
  "_git_reflog_entry_id_new", referenced from:
      -[GTReflogEntry updatedOID] in GTReflogEntry.o
  "_git_reflog_entry_id_old", referenced from:
      -[GTReflogEntry previousOID] in GTReflogEntry.o
  "_git_reflog_entry_message", referenced from:
      -[GTReflogEntry message] in GTReflogEntry.o
  "_git_reflog_entrycount", referenced from:
      -[GTReflog entryCount] in GTReflog.o
  "_git_reflog_free", referenced from:
      -[GTReflog dealloc] in GTReflog.o
  "_git_reflog_read", referenced from:
      -[GTReflog initWithReference:] in GTReflog.o
  "_git_reflog_write", referenced from:
      -[GTReflog writeEntryWithCommitter:message:error:] in GTReflog.o
  "_git_remote_add_fetch", referenced from:
      -[GTRemote addFetchRefspec:error:] in GTRemote.o
  "_git_remote_connect", referenced from:
      -[GTRepository(RemoteOperations) pushRefspecs:toRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_remote_connected", referenced from:
      -[GTRemote isConnected] in GTRemote.o
  "_git_remote_create", referenced from:
      _remoteCreate in GTRepository.o
      +[GTRemote createRemoteWithName:URLString:inRepository:error:] in GTRemote.o
  "_git_remote_delete", referenced from:
      -[GTRepository deleteRemoteNamed:error:] in GTRepository.o
  "_git_remote_disconnect", referenced from:
      ___83-[GTRepository(RemoteOperations) pushRefspecs:toRemote:withOptions:error:progress:]_block_invoke in GTRepository+RemoteOperations.o
  "_git_remote_fetch", referenced from:
      -[GTRepository(RemoteOperations) fetchRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_remote_free", referenced from:
      -[GTRemote dealloc] in GTRemote.o
  "_git_remote_get_fetch_refspecs", referenced from:
      -[GTRemote fetchRefspecs] in GTRemote.o
      -[GTRepository(RemoteOperations) fetchRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_remote_get_push_refspecs", referenced from:
      -[GTRemote pushRefspecs] in GTRemote.o
  "_git_remote_is_valid_name", referenced from:
      +[GTRemote isValidRemoteName:] in GTRemote.o
  "_git_remote_list", referenced from:
      -[GTRepository remoteNamesWithError:] in GTRepository.o
      -[GTConfiguration remotes] in GTConfiguration.o
  "_git_remote_lookup", referenced from:
      -[GTConfiguration remotes] in GTConfiguration.o
      +[GTRemote remoteWithName:inRepository:error:] in GTRemote.o
  "_git_remote_name", referenced from:
      -[GTRemote name] in GTRemote.o
      -[GTRemote rename:error:] in GTRemote.o
  "_git_remote_pushurl", referenced from:
      -[GTRemote pushURLString] in GTRemote.o
  "_git_remote_rename", referenced from:
      -[GTRemote rename:error:] in GTRemote.o
  "_git_remote_set_pushurl", referenced from:
      -[GTRemote setPushURLString:] in GTRemote.o
      -[GTRemote updatePushURLString:error:] in GTRemote.o
  "_git_remote_set_url", referenced from:
      -[GTRemote setURLString:] in GTRemote.o
      -[GTRemote updateURLString:error:] in GTRemote.o
  "_git_remote_update_tips", referenced from:
      -[GTRepository(RemoteOperations) pushRefspecs:toRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_remote_upload", referenced from:
      -[GTRepository(RemoteOperations) pushRefspecs:toRemote:withOptions:error:progress:] in GTRepository+RemoteOperations.o
  "_git_remote_url", referenced from:
      -[GTRemote URLString] in GTRemote.o
  "_git_repository_config", referenced from:
      -[GTRepository configurationWithError:] in GTRepository.o
  "_git_repository_fetchhead_foreach", referenced from:
      -[GTRepository(RemoteOperations) enumerateFetchHeadEntriesWithError:usingBlock:] in GTRepository+RemoteOperations.o
  "_git_repository_free", referenced from:
      -[GTRepository dealloc] in GTRepository.o
  "_git_repository_head", referenced from:
      -[GTRepository headReferenceWithError:] in GTRepository.o
  "_git_repository_head_detached", referenced from:
      -[GTRepository isHEADDetached] in GTRepository.o
  "_git_repository_head_unborn", referenced from:
      -[GTRepository isHEADUnborn] in GTRepository.o
  "_git_repository_index", referenced from:
      -[GTRepository indexWithError:] in GTRepository.o
  "_git_repository_init_ext", referenced from:
      +[GTRepository initializeEmptyRepositoryAtFileURL:options:error:] in GTRepository.o
  "_git_repository_is_bare", referenced from:
      -[GTRepository isBare] in GTRepository.o
  "_git_repository_is_empty", referenced from:
      -[GTRepository isEmpty] in GTRepository.o
  "_git_repository_mergehead_foreach", referenced from:
      -[GTRepository(Merging) enumerateMergeHeadEntriesWithError:usingBlock:] in GTRepository+Merging.o
  "_git_repository_message", referenced from:
      -[GTRepository preparedMessageWithError:] in GTRepository.o
  "_git_repository_odb", referenced from:
      -[GTObjectDatabase initWithRepository:error:] in GTObjectDatabase.o
  "_git_repository_open", referenced from:
      -[GTRepository initWithURL:error:] in GTRepository.o
  "_git_repository_open_ext", referenced from:
      -[GTRepository initWithURL:flags:ceilingDirs:error:] in GTRepository.o
  "_git_repository_path", referenced from:
      -[GTRepository gitDirectoryURL] in GTRepository.o
  "_git_repository_set_head", referenced from:
      -[GTRepository moveHEADToReference:error:] in GTRepository.o
  "_git_repository_set_head_detached", referenced from:
      -[GTRepository moveHEADToCommit:error:] in GTRepository.o
  "_git_repository_state", referenced from:
      -[GTRepository calculateState:withError:] in GTRepository.o
  "_git_repository_state_cleanup", referenced from:
      -[GTRepository cleanupStateWithError:] in GTRepository.o
  "_git_repository_workdir", referenced from:
      -[GTRepository fileURL] in GTRepository.o
      -[GTFilterSource initWithGitFilterSource:] in GTFilterSource.o
  "_git_reset", referenced from:
      -[GTRepository(Reset) resetToCommit:resetType:error:] in GTRepository+Reset.o
  "_git_reset_default", referenced from:
      -[GTRepository(Reset) resetPathspecs:toCommit:error:] in GTRepository+Reset.o
  "_git_revparse_single", referenced from:
      -[GTRepository lookUpObjectByRevParse:error:] in GTRepository.o
  "_git_revwalk_free", referenced from:
      -[GTEnumerator dealloc] in GTEnumerator.o
  "_git_revwalk_hide", referenced from:
      -[GTEnumerator hideSHA:error:] in GTEnumerator.o
  "_git_revwalk_hide_glob", referenced from:
      -[GTEnumerator hideGlob:error:] in GTEnumerator.o
  "_git_revwalk_hide_head", referenced from:
      -[GTEnumerator hideHEAD:] in GTEnumerator.o
  "_git_revwalk_hide_ref", referenced from:
      -[GTEnumerator hideReferenceName:error:] in GTEnumerator.o
  "_git_revwalk_new", referenced from:
      -[GTEnumerator initWithRepository:error:] in GTEnumerator.o
  "_git_revwalk_next", referenced from:
      -[GTEnumerator nextOIDWithSuccess:error:] in GTEnumerator.o
      -[GTEnumerator countRemainingObjects:] in GTEnumerator.o
  "_git_revwalk_push", referenced from:
      -[GTEnumerator pushSHA:error:] in GTEnumerator.o
  "_git_revwalk_push_glob", referenced from:
      -[GTEnumerator pushGlob:error:] in GTEnumerator.o
  "_git_revwalk_push_head", referenced from:
      -[GTEnumerator pushHEAD:] in GTEnumerator.o
  "_git_revwalk_push_ref", referenced from:
      -[GTEnumerator pushReferenceName:error:] in GTEnumerator.o
  "_git_revwalk_sorting", referenced from:
      -[GTEnumerator resetWithOptions:] in GTEnumerator.o
  "_git_signature_dup", referenced from:
      -[GTSignature initWithGitSignature:] in GTSignature.o
  "_git_signature_free", referenced from:
      -[GTSignature dealloc] in GTSignature.o
  "_git_signature_new", referenced from:
      -[GTSignature initWithName:email:time:] in GTSignature.o
  "_git_stash_apply", referenced from:
      -[GTRepository(Stashing) applyStashAtIndex:flags:checkoutOptions:error:progressBlock:] in GTRepository+Stashing.o
  "_git_stash_drop", referenced from:
      -[GTRepository(Stashing) dropStashAtIndex:error:] in GTRepository+Stashing.o
  "_git_stash_foreach", referenced from:
      -[GTRepository(Stashing) enumerateStashesUsingBlock:] in GTRepository+Stashing.o
  "_git_stash_pop", referenced from:
      -[GTRepository(Stashing) popStashAtIndex:flags:checkoutOptions:error:progressBlock:] in GTRepository+Stashing.o
  "_git_stash_save", referenced from:
      -[GTRepository(Stashing) stashChangesWithMessage:flags:error:] in GTRepository+Stashing.o
  "_git_status_byindex", referenced from:
      -[GTRepository(Status) enumerateFileStatusWithOptions:error:usingBlock:] in GTRepository+Status.o
  "_git_status_file", referenced from:
      -[GTRepository(Status) statusForFile:success:error:] in GTRepository+Status.o
  "_git_status_list_entrycount", referenced from:
      -[GTRepository(Status) enumerateFileStatusWithOptions:error:usingBlock:] in GTRepository+Status.o
  "_git_status_list_free", referenced from:
      ___72-[GTRepository(Status) enumerateFileStatusWithOptions:error:usingBlock:]_block_invoke in GTRepository+Status.o
  "_git_status_list_new", referenced from:
      -[GTRepository(Status) enumerateFileStatusWithOptions:error:usingBlock:] in GTRepository+Status.o
  "_git_status_should_ignore", referenced from:
      -[GTRepository(Status) shouldFileBeIgnored:success:error:] in GTRepository+Status.o
  "_git_strarray_free", referenced from:
      -[GTRepository remoteNamesWithError:] in GTRepository.o
      -[GTRepository referenceNamesWithError:] in GTRepository.o
      ___72-[GTRepository(Status) enumerateFileStatusWithOptions:error:usingBlock:]_block_invoke in GTRepository+Status.o
      -[GTConfiguration remotes] in GTConfiguration.o
      -[GTRemote rename:error:] in GTRemote.o
      ___25-[GTRemote fetchRefspecs]_block_invoke in GTRemote.o
      ___24-[GTRemote pushRefspecs]_block_invoke in GTRemote.o
      ...
  "_git_submodule_add_to_index", referenced from:
      -[GTSubmodule addToIndex:] in GTSubmodule.o
  "_git_submodule_foreach", referenced from:
      -[GTRepository enumerateSubmodulesRecursively:usingBlock:] in GTRepository.o
  "_git_submodule_free", referenced from:
      -[GTSubmodule dealloc] in GTSubmodule.o
  "_git_submodule_head_id", referenced from:
      -[GTSubmodule HEADOID] in GTSubmodule.o
  "_git_submodule_ignore", referenced from:
      -[GTSubmodule ignoreRule] in GTSubmodule.o
  "_git_submodule_index_id", referenced from:
      -[GTSubmodule indexOID] in GTSubmodule.o
  "_git_submodule_init", referenced from:
      -[GTSubmodule writeToParentConfigurationDestructively:error:] in GTSubmodule.o
  "_git_submodule_lookup", referenced from:
      -[GTRepository submoduleWithName:error:] in GTRepository.o
  "_git_submodule_name", referenced from:
      -[GTSubmodule submoduleByUpdatingIgnoreRule:error:] in GTSubmodule.o
      -[GTSubmodule name] in GTSubmodule.o
      -[GTSubmodule statusWithIgnoreRule:error:] in GTSubmodule.o
  "_git_submodule_open", referenced from:
      -[GTSubmodule submoduleRepository:] in GTSubmodule.o
  "_git_submodule_path", referenced from:
      -[GTSubmodule path] in GTSubmodule.o
  "_git_submodule_reload", referenced from:
      -[GTSubmodule reload:] in GTSubmodule.o
  "_git_submodule_set_ignore", referenced from:
      -[GTSubmodule submoduleByUpdatingIgnoreRule:error:] in GTSubmodule.o
  "_git_submodule_status", referenced from:
      -[GTSubmodule statusWithIgnoreRule:error:] in GTSubmodule.o
  "_git_submodule_sync", referenced from:
      -[GTSubmodule sync:] in GTSubmodule.o
  "_git_submodule_url", referenced from:
      -[GTSubmodule URLString] in GTSubmodule.o
  "_git_submodule_wd_id", referenced from:
      -[GTSubmodule workingDirectoryOID] in GTSubmodule.o
  "_git_tag_create", referenced from:
      -[GTRepository OIDByCreatingTagNamed:target:tagger:message:error:] in GTRepository.o
  "_git_tag_create_lightweight", referenced from:
      -[GTRepository createLightweightTagNamed:target:error:] in GTRepository.o
  "_git_tag_delete", referenced from:
      -[GTTag delete:] in GTTag.o
  "_git_tag_foreach", referenced from:
      -[GTRepository enumerateTags:block:] in GTRepository.o
  "_git_tag_message", referenced from:
      -[GTTag message] in GTTag.o
  "_git_tag_name", referenced from:
      -[GTTag name] in GTTag.o
  "_git_tag_peel", referenced from:
      -[GTTag objectByPeelingTagError:] in GTTag.o
  "_git_tag_tagger", referenced from:
      -[GTTag tagger] in GTTag.o
  "_git_tag_target", referenced from:
      -[GTTag target] in GTTag.o
  "_git_tag_target_type", referenced from:
      -[GTTag targetType] in GTTag.o
  "_git_tree_entry_byindex", referenced from:
      -[GTTree entryAtIndex:] in GTTree.o
  "_git_tree_entry_byname", referenced from:
      -[GTTree entryWithName:] in GTTree.o
  "_git_tree_entry_bypath", referenced from:
      -[GTTree entryWithPath:error:] in GTTree.o
  "_git_tree_entry_cmp", referenced from:
      -[GTTreeEntry isEqualToEntry:] in GTTreeEntry.o
  "_git_tree_entry_dup", referenced from:
      -[GTTreeEntry initWithEntry:parentTree:error:] in GTTreeEntry.o
  "_git_tree_entry_filemode", referenced from:
      -[GTTreeEntry attributes] in GTTreeEntry.o
  "_git_tree_entry_free", referenced from:
      -[GTTree entryWithPath:error:] in GTTree.o
      -[GTTreeEntry dealloc] in GTTreeEntry.o
  "_git_tree_entry_id", referenced from:
      -[GTTreeEntry OID] in GTTreeEntry.o
  "_git_tree_entry_name", referenced from:
      -[GTTreeEntry name] in GTTreeEntry.o
  "_git_tree_entry_to_object", referenced from:
      -[GTObject(GTTreeEntry) initWithTreeEntry:error:] in GTTreeEntry.o
  "_git_tree_entry_type", referenced from:
      -[GTTreeEntry type] in GTTreeEntry.o
      -[GTTreeEntry typeString] in GTTreeEntry.o
  "_git_tree_entrycount", referenced from:
      -[GTTree entryCount] in GTTree.o
  "_git_tree_walk", referenced from:
      -[GTTree enumerateEntriesWithOptions:error:block:] in GTTree.o
  "_git_treebuilder_clear", referenced from:
      -[GTTreeBuilder clear] in GTTreeBuilder.o
  "_git_treebuilder_entrycount", referenced from:
      -[GTTreeBuilder entryCount] in GTTreeBuilder.o
  "_git_treebuilder_filter", referenced from:
      -[GTTreeBuilder filter:] in GTTreeBuilder.o
  "_git_treebuilder_free", referenced from:
      -[GTTreeBuilder dealloc] in GTTreeBuilder.o
  "_git_treebuilder_get", referenced from:
      -[GTTreeBuilder entryWithFileName:] in GTTreeBuilder.o
  "_git_treebuilder_insert", referenced from:
      -[GTTreeBuilder addEntryWithOID:fileName:fileMode:error:] in GTTreeBuilder.o
  "_git_treebuilder_new", referenced from:
      -[GTTreeBuilder initWithTree:repository:error:] in GTTreeBuilder.o
  "_git_treebuilder_remove", referenced from:
      -[GTTreeBuilder removeEntryWithFileName:error:] in GTTreeBuilder.o
  "_git_treebuilder_write", referenced from:
      -[GTTreeBuilder writeTree:] in GTTreeBuilder.o
  "_giterr_last", referenced from:
      +[NSError(Git) git_descriptionForErrorCode:] in NSError+Git.o
  "_giterr_set_str", referenced from:
      _GTCredentialAcquireCallback in GTCredential.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **


The following build commands failed:
	Ld /Users/hannes/Library/Developer/Xcode/DerivedData/GitX-awximyutapdzbiaifesrdhkbxnfz/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/Binary/ObjectiveGit normal x86_64 (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
(1 failure)

\```

@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

Be sure you have updated the sub modules. git submodule update --init --recursive

I fixed that in the other PR. Or it looks like the same issue I had.

@simoncozens

Copy link
Copy Markdown

In case you want to do without homebrew, this script which I made for pygit2, will compile Universal builds of openssl, libssh2 and libgit2 on a CI host - which I guess you could probably ... bundle into your ObjectiveGit framework? ...somehow?

Like I said, I don't enjoy Xcode, I just hack things into place....

@hannesa2

hannesa2 commented Nov 26, 2021 •

Copy link
Copy Markdown
Contributor

Be sure you have updated the sub modules. git submodule update --init --recursive

I did this, that's why I post the output of git status (I expected this suggestion) in my previous post

image

Nothing to do
image

In which issue did you run into ?

@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

@hannesa2 double-check that you have the right SHAs and have done a pull in both. Also clean your Xcode DerivedData folder. The missing ARM calls in the static linking is what I had fixed and saw in your comment.

@jspiro

jspiro commented Nov 26, 2021

Copy link
Copy Markdown
Member Author

@hannesa2 It looks like you have my remote, but definitely double-check. It's a sketchy PR to have a submodule referring to a SHA in a fork of another PR :-)

@jspiro

jspiro commented Nov 27, 2021

Copy link
Copy Markdown
Member Author

@hannesa2 You may need to run objective-git/scripts/bootstrap–it creates softlinks in /usr/local. I really dislike this approach–I'm not yet sure how we'll create universal binaries with this hard-coding.

@jspiro

jspiro commented Nov 27, 2021

Copy link
Copy Markdown
Member Author

I'm working on objective-git's PR, we gotta get the CI build working somehow, then get universal working, then we can get universal working in this PR.

@hannesa2

Copy link
Copy Markdown
Contributor

@hannesa2 It looks like you have my remote, but definitely double-check. It's a sketchy PR to have a submodule referring to a SHA in a fork of another PR :-)

I use your remote
image
and in submodule I'm in the right as well
image

I did

git submodule foreach git clean -xdf
git clean -xdf
cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
xcodebuild -workspace GitX.xcworkspace -scheme GitX archive

Maybe you can run this on your side too ?

@hannesa2

Copy link
Copy Markdown
Contributor

@jspiro
Please can you run this commands to see if a shiny new checkout works on your side.

git clone [email protected]:jspiro/gitx.git gitX-M1-build
cd gitX-M1-build
git checkout jono/2021-11-26/arm-support
git submodule update --init --recursive
cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
xcodebuild -workspace GitX.xcworkspace -scheme GitX archive

I will do the same on my second M1

@hannesa2

Copy link
Copy Markdown
Contributor
git clone [email protected]:jspiro/gitx.git gitX-M1-build
cd gitX-M1-build
git checkout jono/2021-11-26/arm-support
git submodule update --init --recursive
cd External/objective-git && script/bootstrap && script/update_libgit2 && cd ../..
xcodebuild -workspace GitX.xcworkspace -scheme GitX archive

I will do the same on my second M1

Same error on my second M1. (I use a M1 and a M1 PRO)

@tcurdt

tcurdt commented Dec 3, 2021

Copy link
Copy Markdown

I am also getting a linker error (M1 Pro)

Ld /Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/Binary/ObjectiveGit normal x86_64 (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
    cd /Users/tcurdt/Downloads/gitX-M1-build/External/objective-git
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.9 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -L/Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/BuildProductsPath/Release -L. -LExternal -L/usr/local/opt/openssl/lib -L/opt/homebrew/opt/openssl/lib -L/Users/tcurdt/Downloads/gitX-M1-build/External/objective-git/External/build/lib -F/Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/BuildProductsPath/Release -filelist /Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit.LinkFileList -install_name @rpath/ObjectiveGit.framework/ObjectiveGit -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -object_path_lto -Xlinker /Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_lto.o -fobjc-arc -fobjc-link-runtime -fapplication-extension -lgit2 -force_load External/libgit2.a /opt/homebrew/lib/libssh2.a -lcrypto -lssl -lcurl -lz -liconv -lgit2 -framework Cocoa -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat -o /Users/tcurdt/Library/Developer/Xcode/DerivedData/GitX-edjqhftnxqqlhdfjpmvffmwlewka/Build/Intermediates.noindex/ArchiveIntermediates/GitX/IntermediateBuildFilesPath/ObjectiveGitFramework.build/Release/ObjectiveGit-Mac.build/Objects-normal/x86_64/Binary/ObjectiveGit
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: warning: directory not found for option '-L/opt/homebrew/opt/openssl/lib'
ld: warning: directory not found for option '-L/Users/tcurdt/Downloads/gitX-M1-build/External/objective-git/External/build/lib'
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **

The clang -target x86_64-apple-macos10.9 looks a bit fishy - or is this just one part for a universal build?

@jspiro

jspiro commented Dec 4, 2021

Copy link
Copy Markdown
Member Author

@ronaldtse

Copy link
Copy Markdown

I'm using the build that @jspiro provided and it works like a charm on my M1! Perhaps this repository could start publishing the built GitX.app in releases, given that the other published builds are all very out of date.

And perhaps the double surprise is that this is the Jono I went to school together!? 😉

@jspiro

jspiro commented Dec 10, 2021 •

Copy link
Copy Markdown
Member Author

I'm using the build that @jspiro provided and it works like a charm on my M1! Perhaps this repository could start publishing the built GitX.app in releases, given that the other published builds are all very out of date.

Awesome! Is your M1 setup from an Intel backup or a clean M1 install? Trying to ensure this will run on vanilla M1s out of the box.

That said, the right approach is a universal binary... as soon as I can figure out how to produce one...

And perhaps the double surprise is that this is the Jono I went to school together!? 😉

Haha, indeed! 👋🏻 Hiya! It's almost like GitHub should form some kind of social network based on what schools you want to and you would have a wall of contributions, and you can post patches on other people's walls.

Glad you're a GitXer!

@ronaldtse

Copy link
Copy Markdown

Awesome! Is your M1 setup from an Intel backup or a clean M1 install? Trying to ensure this will run on vanilla M1s out of the box.

Mine is from an Intel backup, but I see this app is already Apple Silicon without Intel?

It's almost like GitHub should form some kind of social network based on what schools you want to and you would have a wall of contributions, and you can post patches on other people's walls.

Now that GitHub and LinkedIn are both under the same umbrella who knows when that will happen? 😜

Have been using GitX for years, tried all the other open-source alternatives but never found one that is as intuitive. Thank you (and the other devs, of course) for getting this back on track!

@hannesa2

Copy link
Copy Markdown
Contributor

I'm using the build that @jspiro provided and it works like a charm on my M1! Perhaps this repository could start publishing the built GitX.app in releases, given that the other published builds are all very out of date.

I can confirm the arm64 build works like a charm. But unfortunately nobody (@tcurdt and I) can reproduce this arm64 build locally from @jspiro

If there is someone else who can build this pull request local on his M1 please answer in this pull request.

@jspiro

jspiro commented Dec 13, 2021

Copy link
Copy Markdown
Member Author

I can't work on this again yet. Still recovering and have log4j to deal with. Use my build for now and we'll get this going again later in the month.

@hannesa2

hannesa2 commented Feb 11, 2022 •

Copy link
Copy Markdown
Contributor

@hannesa2 hannesa2 mentioned this pull request Feb 11, 2022
@hannesa2

Copy link
Copy Markdown
Contributor

Ahh, I see you used openssl@3 to link

@hannesa2

hannesa2 commented Feb 13, 2022 •

Copy link
Copy Markdown
Contributor

I applied all changes to recent master and we are able to build with x86 too, but when I try build local on my M1

xcodebuild -workspace GitX.xcworkspace -scheme GitX -archivePath ./GitX archive ARCHS="arm64"

image

@jspiro @ronaldtse @felixpalmer @tcurdt
Please can you try this ?
Does someone knows how to get rid of it ?

@hannesa2

Copy link
Copy Markdown
Contributor

After this #273 the recent master looks like this on my M1

image

@claytonrcarter

Copy link
Copy Markdown
Collaborator

I don't have an M1 to test, but that looks like the same error as #239 (comment). That boiled down to /usr/local/lib/openssl pointing to openssl@3 instead of [email protected]. Is it possible to also add -L/opt/homebrew/opt/[email protected]/lib, like is being done w/ -L/usr/local/opt/[email protected]/lib?

@hannesa2

hannesa2 commented Feb 13, 2022 •

Copy link
Copy Markdown
Contributor

YES !

image

This made it work

image

It's not beautiful to specify exactly 1.1.1m , but it's better then nothing

@hannesa2

Copy link
Copy Markdown
Contributor

It builds now locally with a M1 #275

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

Successfully merging this pull request may close these issues.

Apple Silicon M1 arm cpu

7 participants