-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
darwin: scdaemon built with gnupg21 crashes on startup #20484
Comments
Try this magic: DYLD_FRAMEWORK_PATH=/System/Library/Frameworks result/libexec/scdaemon --server --verbose --no-detach There's a not-entirely-obscene way to automate this but it takes some work. |
@copumpkin That works! So what does this mean?
|
Here's the output from scdaemon 2.0 (from GPGTools):
|
@copumpkin any idea what the issue is here or how to solve it properly? |
The issue is that we have two simultaneous versions of CoreFoundation.framework, one built purely, and the other one brought in transitively because we depend on an impure framework from the outside world (which in turn depends on the system CoreFoundation). I can't remember if that's an automatic recipe for failure (they do stuff at startup to global things, and might conflict there) or if things only go south if you pass a CF value allocated with one of the libraries to the other, but it generally gets unpleasant. I think the best solution we have for now is roughly as follows:
|
@copumpkin I'm pretty weary of the "wrappers upon wrappers" stuff. Even if it works, I like having actual binaries in /bin/ as opposed to scripts. |
@matthewbauer I don't know how to do it, if it's possible. If Apple allowed a custom |
I'd rather us do what we do for other system frameworks and turn CF into a skeleton derivation of headers with a symlink to the real dylib. I don't see the purpose of a CF library that will reliably exhibit this kind of behavior, purity-wise, especially if the accepted solution is to "just use the system one" which conflicts with the purity goal to begin with. |
@pikajude well, the difference is which programs you use the system one on. With the pure one, we get to have a pure(r) It might still not be worth the pain, but I wouldn't cast them as quite the same thing. |
A core part of "my view" for Nix for darwin is that I can pretty much use most "unixy" tools (i.e., things that aren't overly Mac-specific or have deep integration with the OS) with minimal impurities. As far as I know, we currently just have the kernel, libSystem, dyld, /bin/sh, and /usr/bin/env for the majority of the sorts of tools you'd find in homebrew. Homebrew cask is a whole other story, and is where this sort of CF impurity starts mattering. Of course there are a few awkward overlaps like this GPG tool that are materially worse under this world than an impurer one, and while I think we do have general solutions to it, they're not very appealing for now. |
I'm working on a solution for this that fixes the dylibs, it looks like only a few of the libraries like |
Is this confirmed fixed? |
I only tested it on a machine without xcode so that was without pinentry, but I'm pretty sure |
@matthewbauer & @LnL7 i am using gnupg with scdaemon 2.1.19 and pinentry-mac-0.9.4 from nixpkgs/master. It works like a charm without |
Sweet! |
If you build gnupg21 and then run:
It will immediately die with
Segmentation fault: 11
. Here is the stack trace:This prevents smart cards from being used with GnuPG 2.1. I'm able to use
scdaemon
from GPGTools just fine with Nix's gnupg21. Here are the binaries linked against Nix'sscdaemon
:The text was updated successfully, but these errors were encountered: