can't compile on command line
I pulled the latest commit (
b884da7a) from the repo, but I also tried the one before
Libmacgpg compiles without issues. But when I do a
make in the
GPGKeychainAccess directory, I get an error:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/IOKit.framework/Headers/hidsystem/IOHIDTypes.h:40: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libkern/OSAtomic.h:43: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libkern/OSAtomicDeprecated.h:247:9: note: 'OSAtomicAdd64Barrier' has been explicitly marked deprecated here int64_t OSAtomicAdd64Barrier( int64_t __theAmount, ^ 18 warnings generated. Ld /Users/tessus/data/work/GPGTools/GPGKeychainAccess/build/Release/GPG\ Keychain.app/Contents/MacOS/GPG\ Keychain normal x86_64 (in target 'GPG Keychain' from project 'GPGKeychain') cd /Users/tessus/data/work/GPGTools/GPGKeychainAccess /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/GPGKeychainAccess/build/Release -F/Users/tessus/data/work/GPGTools/GPGKeychainAccess/build/Release -F/Users/tessus/data/work/GPGTools/GPGKeychainAccess/Dependencies/Libmacgpg/build/Release -F/Users/tessus/data/work/GPGTools/GPGKeychainAccess/Dependencies/Zxcvbn/build/Release -F/Library/Frameworks -F/Users/tessus/Library/Frameworks -filelist /Users/tessus/data/work/GPGTools/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/GPGKeychainAccess/Dependencies/Zxcvbn/build/Release/Zxcvbn.framework/Zxcvbn -Xlinker -dependency_info -Xlinker /Users/tessus/data/work/GPGTools/GPGKeychainAccess/build/GPGKeychain.build/Release/GPG\ Keychain.build/Objects-normal/x86_64/GPG\ Keychain_dependency_info.dat -o /Users/tessus/data/work/GPGTools/GPGKeychainAccess/build/Release/GPG\ Keychain.app/Contents/MacOS/GPG\ Keychain 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) ** BUILD FAILED ** The following build commands failed: Ld /Users/tessus/data/work/GPGTools/GPGKeychainAccess/build/Release/GPG\ Keychain.app/Contents/MacOS/GPG\ Keychain normal x86_64 (1 failure) make: *** [GPG Keychain] Error 65
Any idea, what's going on?
Building in Xcode UI works. But as soon as I try to
Archive I get the same error as described above:
ld: reference to bitcode symbol '_objc_destroyWeak' which LTO has not compiled in '-[GKMenuButton .cxx_destruct]' from /tmp/lto.o for architecture x86_64 Reference to bitcode symbol '_objc_destroyWeak' which LTO has not compiled in '-[GKMenuButton .cxx_destruct]' from /tmp/lto.o for architecture x86_64
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by Helmut K. C. Te... on 23 Jun, 2020 04:09 PM
Hello? Developers? Any idea how to fix this?
Support Staff 2 Posted by Luke Le on 24 Jun, 2020 03:23 PM
leider können wir dieses Problem nicht nachvollziehen.
Welche Version von Xcode verwendest du?
3 Posted by Helmut K. C. Te... on 24 Jun, 2020 05:11 PM
I tried on 2 machines:
macOS 10.15.5 19F101
Xcode 11.5 11E608c
macOS 10.14.6 18G5033
Xcode 11.3.1 11C504
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
Dependenciesdirectory. 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.....
Support Staff 4 Posted by Luke Le on 24 Jun, 2020 08:52 PM
git cloneshould be
git clone --recursiveso 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
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.
5 Posted by Helmut K. C. Te... on 25 Jun, 2020 02:42 PM
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
Dependenciesdirectory is empty and as soon as I do a
makethis is what happens:
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
And yes, I have the most recent GPG Tools (2020.1) installed on my machine.
Changing the build system to
Legacy Build Systemdoes not help either.
Support Staff 6 Posted by 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.
7 Posted by Helmut K. C. Te... on 25 Jun, 2020 02:50 PM
Yes, I updated my post a second before you sent your reply, because I forgot to add that info...
Changing the build system to
Legacy Build Systemdoes not help either.
Support Staff 8 Posted by Luke Le on 25 Jun, 2020 02:51 PM
git statussay? Are you on branch dev? If not, switch to
git checkout dev
9 Posted by Helmut K. C. Te... on 25 Jun, 2020 02:52 PM
Yes, I'm on dev.
It's really a weird problem. When the version before the most recent came out, I had no issues compiling... So something must have changed in between....
Support Staff 10 Posted by 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.
11 Posted by Helmut K. C. Te... on 29 Jun, 2020 10:54 PM
Awesome. This fixed the issue.
Since it doesn't happen for the debug build, but only the release branch (Release and Archive) it must have to do with that.
12 Posted by Helmut K. C. Te... on 30 Jun, 2020 02:08 PM
Unfortunately under Catalina I run into another problem:
13 Posted by Helmut K. C. Te... on 30 Jun, 2020 02:19 PM
maybe the framework is not codesigned in the build process?
14 Posted by Helmut K. C. Te... on 07 Jul, 2020 09:35 PM
Can you reproduce this on Catalina?
Support Staff 15 Posted by Luke Le on 08 Jul, 2020 05:21 PM
Did you try to deactivate any code signing at all?
16 Posted by Helmut K. C. Te... on 08 Jul, 2020 08:27 PM
This is not possible. You must at least select 'Sign to Run Locally'. There's no no signing option.
17 Posted by Helmut K. C. Te... on 08 Jul, 2020 09:13 PM
Found the solution: Remove the hardened runtime.
Steve closed this discussion on 27 Jul, 2020 12:26 PM.