Then I tried to start over with cloning the repo from scratch. The compile run failed with another error. The dependencies are missing in the Dependencies directory. One has to manually create symbolic links. I think you have to update the README how to properly setup a dev environment. Something is certainly off.
After solving the dependencies issues, I still get the same error.
Please setup a new VM with macOS and just follow your readme how to compile GPG Keychain. You will run into several issues.....
Luke Le on 24 Jun, 2020 08:52 PM
git clone should be git clone --recursive so submodules are checked out as well. No other dependencies are needed, if you have Libmacgpg installed from GPG Suite. Otherwise you will need to compile Libmacgpg and install it in /Library/Frameworks
About your error, please check in Xcode › File › Project Settings… if the Build System is set to Legacy Build System. If not, set it to Legacy Build System. That's the only thing I could think of that might result in the problem you are seeing. Apple is doing some strange things in non legacy build system and it's not well documented last time I checked.
Thanks for your reply, but I think you mix up repositories. I tried --recursive, but it can't do anything in the GPGKeychainAccess repo (https://github.com/GPGTools/GPGKeychainAccess.git), since it does not have any sub modules defined.
So as suspected, the Dependencies directory is empty and as soon as I do a make this is what happens:
Ld /Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/Release/GPG\ Keychain.app/Contents/MacOS/GPG\ Keychain normal x86_64 (in target 'GPG Keychain' from project 'GPGKeychain')
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/Release -F/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/Release -F/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/Dependencies/Libmacgpg/build/Release -F/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/Dependencies/Zxcvbn/build/Release -F/Library/Frameworks -F/Users/tessus/Library/Frameworks -filelist /Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/GPGKeychain.build/Release/GPG\ Keychain.build/Objects-normal/x86_64/GPG\ Keychain.LinkFileList -Xlinker -rpath -Xlinker @executable_path/../Frameworks -fobjc-arc -fobjc-link-runtime -lsqlite3 -framework QuartzCore -framework CoreImage -framework ScriptingBridge -framework Security -weak_framework Libmacgpg -framework Cocoa /Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/Dependencies/Zxcvbn/build/Release/Zxcvbn.framework/Zxcvbn -Xlinker -dependency_info -Xlinker /Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/GPGKeychain.build/Release/GPG\ Keychain.build/Objects-normal/x86_64/GPG\ Keychain_dependency_info.dat -o /Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/build/Release/GPG\ Keychain.app/Contents/MacOS/GPG\ Keychain
ld: warning: directory not found for option '-F/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/Dependencies/Libmacgpg/build/Release'
ld: reference to bitcode symbol '_objc_destroyWeak' which LTO has not compiled in '-[GKMenuButton .cxx_destruct]' from /tmp/lto.o for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/tessus/data/work/GPGTools/new/GPGKeychainAccess/Resources/Info.plist'. (in target 'GPG Keychain' from project 'GPGKeychain')
** BUILD FAILED **
Do you see the part where the linker tries to access Dependencies/Libmacgpg/build/Release? After checkout of the repo there is no such directory, even when using --recursive (which can't work for the reason I mentioned above: no submodules in this repo).
Btw, the README does not mention recursive either.
And yes, I have the most recent GPG Tools (2020.1) installed on my machine.
Changing the build system to Legacy Build System does not help either.
Luke Le on 25 Jun, 2020 02:48 PM
Ah right, I thought Zxcvbn was added as a submodule, but that's no longer the case. So --recursive is in fact not required.
Did you check Project Settings?
The reference to Dependencies/Libmacgpg/build/Release is only one of all possible search paths for Frameworks. In your case /Library/Framework works fine, since Libmacgpg.framework is installed there (at least it normally is). The linker error is something else.
Luke Le on 29 Jun, 2020 10:07 AM
So I've looked into that again and it appears that a file which is no longer necessary is still compiled in and creates an issue under certain configurations (not yet clear when). Remove the file PLWeakCompatibilityStubs.m from the list of files to be compiled, or generally from the project. After that it might work.
Unfortunately under Catalina I run into another problem:
Process: GPG Keychain 
Path: /Applications/GPG Keychain.app/Contents/MacOS/GPG Keychain
Version: 1.6.1 (1620)
Code Type: X86-64 (Native)
Parent Process: ??? 
Responsible: GPG Keychain 
User ID: 502
Date/Time: 2020-06-30 10:07:13.892 -0400
OS Version: Mac OS X 10.15.5 (19F101)
Report Version: 12
Bridge OS Version: 4.5 (17P5300)
Anonymous UUID: 8978A6E7-3C54-43CD-60CE-105246DB01E4
Sleep/Wake UUID: A03009A4-2957-4FEA-81B9-AE9D3DCFD656
Time Awake Since Boot: 800000 seconds
Time Since Wake: 5500 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x5] Code Signature
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: @rpath/Zxcvbn.framework/Versions/A/Zxcvbn
Referenced from: /Applications/GPG Keychain.app/Contents/MacOS/GPG Keychain
Reason: no suitable image found. Did find:
/Applications/GPG Keychain.app/Contents/MacOS/../Frameworks/Zxcvbn.framework/Versions/A/Zxcvbn: code signature in (/Applications/GPG Keychain.app/Contents/MacOS/../Frameworks/Zxcvbn.framework/Versions/A/Zxcvbn) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/Applications/GPG Keychain.app/Contents/MacOS/../Frameworks/Zxcvbn.framework/Versions/A/Zxcvbn: stat() failed with errno=1