You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building gitx I got this error building the ObjectiveGit.framework in xcode 13.2.1 on macos 11.6.3.
Undefined symbols for architecture x86_64:
"_EVP_PKEY_id", referenced from:
__libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
ld: symbol(s) not found for architecture x86_64
Building succeeded adding LDFLAGS="-L/usr/local/opt/[email protected]/lib" to the ObjectiveGit.framework target build settings.
$ git show
commit 972f9aad0e276d30547fdb0a3b93e26407c29a2a (HEAD -> openssl1.1, origin/master, origin/HEAD, master)
Merge: 845bab0e 8f1da7a8
Author: Hannes Achleitner <[email protected]>
Date: Sun Feb 6 16:23:55 2022 +0100
Merge pull request #29 from gitx/Xcode_13.2.1
Xcode 13.2.1
Opened ObjectiveGitFramework.xcworkspace in xcode 13.2.1 on macos 11.6.3 and got this error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0.
Opened ObjectiveGitFramework.xcworkspace in xcode 13.2.1 on macos 11.6.3 and got this error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0.
Undefined symbols for architecture x86_64:
"_EVP_PKEY_id", referenced from:
__libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
More complete output from log:
Ld /Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
cd /Users/stephen/dev/macos/objgit/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.1.sdk -L/Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Products/Debug -L. -LExternal -L/usr/local/opt/openssl/lib -L/Users/stephen/dev/macos/objgit/objective-git/External/build/lib -F/Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Products/Debug -filelist /Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/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/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -fapplication-extension -lgit2 -force_load External/libgit2.a External/libssh2.a -lcrypto -lssl -lcurl -lz -liconv -lgit2 -framework Cocoa -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Intermediates.noindex/ObjectiveGitFramework.build/Debug/ObjectiveGit-Mac.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat -o /Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit
ld: warning: dylib (/usr/local/opt/openssl/lib/libcrypto.dylib) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: dylib (/usr/local/opt/openssl/lib/libssl.dylib) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libcrypto.dylib
ld: warning: linking against a dylib which is not safe for use in application extensions: /usr/local/opt/openssl/lib/libssl.dylib
ld: warning: object file (External/libssh2.a(agent.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(channel.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(global.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(hostkey.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(session.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(userauth.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(misc.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(openssl.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(kex.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(packet.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(transport.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(keepalive.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(comp.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(mac.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(pem.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(bcrypt_pbkdf.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(crypt.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(blowfish.o)) was built for newer macOS version (11.0) than being linked (10.9)
Undefined symbols for architecture x86_64:
"_EVP_PKEY_id", referenced from:
__libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Then tried with and without test in the xcodebuild invocation:
xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" test archive ARCHS="x86_64"
Same error when building in xcode app:
Undefined symbols for architecture x86_64:
"_EVP_PKEY_id", referenced from:
__libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
ld: symbol(s) not found for architecture x86_64
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/stephen/Library/Developer/Xcode/DerivedData/ObjectiveGitFramework-fyaphaesxegukpfgkwopelgpztry/Build/Intermediates.noindex/ArchiveIntermediates/ObjectiveGit\ Mac/IntermediateBuildFilesPath/UninstalledProducts/macosx/ObjectiveGit.framework/Versions/A/ObjectiveGit normal (in target 'ObjectiveGit-Mac' from project 'ObjectiveGitFramework')
Hmm, I guess you need to run xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" archive ARCHS="x86_64" | tee outputx86_64.log
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../libgit2.a(auth_negotiate.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../libgit2.a(winhttp.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../libgit2.a(auth_negotiate.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../libgit2.a(winhttp.c.o) has no symbols
Which ends into this finally
ld: warning: object file (External/libssh2.a(crypt.o)) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: object file (External/libssh2.a(blowfish.o)) was built for newer macOS version (11.0) than being linked (10.9)
Undefined symbols for architecture x86_64:
"_EVP_PKEY_id", referenced from:
__libssh2_ed25519_new_private_frommemory in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfile in libssh2.a(openssl.o)
__libssh2_pub_priv_keyfilememory in libssh2.a(openssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The big question is: Why do your objects have no symbols ?
It's only related to your local machine, because CI can build and link it
Do you have an x86_64 mac? If so can you attach a log from your build that is successful.
Does ./External/libgit2.a in your build dir have symbols for auth_negotiate and winhttp?
$ nm -gC ./External/libgit2.a | grep auth_negotiate
./External/libgit2.a:auth_negotiate.c.o: no symbols
./External/libgit2.a(auth_negotiate.c.o):
./External/libgit2.a:winhttp.c.o: no symbols
I also noticed in the last clang invocation which generates the Undefined symbols for architecture x86_64: "_EVP_PKEY_id" error a nonexistent directory is included.
ld: warning: directory not found for option '-L/Users/stephen/dev/macos/objgit/objective-git/External/build/lib'
Activity
hannesa2 commentedon Feb 8, 2022
When I do this on my x86 Mac it still fails with same error.
To be able to verify your changes locally, please can you put your changes into a pull request ?
stepheneb commentedon Feb 8, 2022
Have master checked out separately from gitx.
Opened
ObjectiveGitFramework.xcworkspacein xcode 13.2.1 on macos 11.6.3 and got this error:SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0.hannesa2 commentedon Feb 11, 2022
I guess this should solved now with
@stepheneb please give it a try on recent master
hannesa2 commentedon Feb 11, 2022
On my side your primary message disappeared after a simple
brew reinstall openssl@3stepheneb commentedon Feb 11, 2022
Got further:
error: no such file or directory: 'External/libssh2.a'Steps:
brew reinstall openssl@3.git submodule update --init --recursiveObjectiveGitFramework.xcworkspacein xcode 13.2.1hannesa2 commentedon Feb 11, 2022
you need to run
./script/bootstrapin advance.Wrong or not, I do all in command line
stepheneb commentedon Feb 11, 2022
What are your commands to build completely from the command line?
After clone I presume they start like this:
Now getting this error:
More complete output from log:
hannesa2 commentedon Feb 11, 2022
I do almost the same like this https://github.com/gitx/objective-git/blob/master/.github/workflows/BuildPR.yml#L21-L24
But I only build
arm64(I use a M1) withoutx86_64hannesa2 commentedon Feb 11, 2022
I could swear, it was working before lunch, but the test doesn't work anymore, but this works
xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" archive ARCHS="arm64"This is all dirty :
And should be solved only by (architecture dependent) search path. I spent the half day with this, but still no success...
What's your output of
find /opt/homebrew -name "libssh*.a"?hannesa2 commentedon Feb 11, 2022
Ahh, on your side the output of
find /usr/local -name "libssh*.a"?stepheneb commentedon Feb 11, 2022
In tests below I am now doing this to setup for building:
Then tried with and without
testin thexcodebuildinvocation:Same error when building in xcode app:
Different (but probably related??):
hannesa2 commentedon Feb 11, 2022
And do you have these files ?
find . -name "libss*.a" | xargs ls -lastepheneb commentedon Feb 11, 2022
I only seem to have:
./External/libssh2.ahannesa2 commentedon Feb 12, 2022
Ahh sorry, this was a pointer into the wrong direction. It was a leftover from an other try. You don't need it

This is how it looks like on my side
I tried it again in a new directory, without
test(don't work for locally for arm64) and forarm64(CI does it withx86_64)For me it looks like the issue is somehow related outside of the repo ? brew ?
Please can you share your output outputARM64.log to be able todo a file compare.
stepheneb commentedon Feb 12, 2022
I've attached
outputARM64.log. The build seems to have completed successfully. Building withARCHS="x86_64"still fails as it did before.outputARM64.log
FYI: here's what's in
./External:hannesa2 commentedon Feb 12, 2022
Hmm, I guess you need to run
xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" archive ARCHS="x86_64" | tee outputx86_64.logor do you own an Apple Silicon ?
stepheneb commentedon Feb 12, 2022
Don't have a newer mac.
Here's the
ARCHS="x86_64"log: outputx86_64.loghannesa2 commentedon Feb 12, 2022
I see this as a probably major issue

Which ends into this finally
The big question is: Why do your objects have no symbols ?
It's only related to your local machine, because CI can build and link it
stepheneb commentedon Feb 12, 2022
Thanks for all the help.
Do you have an
x86_64mac? If so can you attach a log from your build that is successful.Does
./External/libgit2.ain your build dir have symbols forauth_negotiateandwinhttp?I also noticed in the last
clanginvocation which generates theUndefined symbols for architecture x86_64: "_EVP_PKEY_id"error a nonexistent directory is included.hannesa2 commentedon Feb 12, 2022
arm64
hannesa2 commentedon Feb 12, 2022
local x86
(today I've access)
Unfortunately the same like on your local machine
CI x86
hannesa2#39
Sorry, I don't understand why CI builds properly.
hannesa2 commentedon Feb 12, 2022
Ci comes only with

[email protected]only !So I removed local
brew remove openssl@3and now, it looks like different
This missing openssl directory is interesting ...
hannesa2 commentedon Feb 12, 2022
I made it work locally ! Thank you, this ticket helped me to understand the problem, even gitx/gitx#239 works now.
Btw, there is no reason to
brew remove openssl@3anymorestepheneb commentedon Feb 12, 2022
Just tried again from scratch and the objective-git build also works for me! Thanks for your hard work!