Skip to content
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

Unable to load library 'PCSC' on macOS Big Sur #9

Open
Baco9 opened this issue Nov 25, 2020 · 1 comment
Open

Unable to load library 'PCSC' on macOS Big Sur #9

Baco9 opened this issue Nov 25, 2020 · 1 comment

Comments

@Baco9
Copy link

Baco9 commented Nov 25, 2020

In macOS Big Sur, the system-provided libraries are not longer available on the file system. When attempting to dlopen() a library path, it will look for the corresponding library in a cache instead of the file system.

The version of JNA that is currently used, does not seem to work correctly with this new behaviour. com.sun.jna.NativeLibrary.loadLibrary() now throws a java.lang.UnsatisfiedLinkError (from the _PCSC constructor).

I fixed it by adding this snippet to my code:

NativePCSCLib pcscLib = new NativePCSCLib();
pcscLib.setPath("/Library/Frameworks/PCSC.framework/PCSC");
pcscLib.setUseExecutorThread(false);
pcscLib.setUseBlockingGetStatusChange(false);
pcscLib.initialize();

The better solution is probably to update the JNA dependency of the native-c project. I tested it with version 5.6.0, and there it works to simply load "PCSC", without a full path.

@eheck-is
Copy link
Contributor

Yes, the latest JNA fixes it. Sorry, we didn't get around to updating the dependencies here yet.

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

No branches or pull requests

2 participants