-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
loading "libpcsclite_real.so.1" failed: Dynamic loading not supported #216
Comments
Interesting question. How have you generated |
I use Alpine Linux - their package pcsc-lite-static provides /usr/lib/libpcsclite.a Up until version 2.0.3 I was using libpcsclite statically linking without any problems. I would appreciate any help in finding a solution for current and future versions. |
The Alpine build log does not contain the line used to configure & build pcsc-lite :-( But since pcsc-lite 2.1.0 a new mechanism has been added. See https://blog.apdu.fr/posts/2024/04/how-to-use-libpcsclite_delegate/ Why do you want to statically link with libpcsclite? |
Thank you for your interest. I want to get the smallest possible binary that will work on virtually any x86_64 linux distribution without any dependences, that's why I build it staticly on alpine linux which has small libc musl, thanks to which the resulting binary is small and universal. |
I pushed some patches ed790dc to allow the build of libpcsclite as a static library. Alpine Linux will have to specifically configure pcsc-lite with |
Thanks! Are you planning to release a new version soon? If yes, I’ll reach out to the Alpine package maintainer to request an update. |
Yes, "soon". |
We now build both versions of the library: dynamic and static. In the case of static library it is no more possible to use LIBPCSCLITE_DELEGATE to redirect to another libpcsclite. Thanks to areqq for the bug report " loading "libpcsclite_real.so.1" failed: Dynamic loading not supported #216 " LudovicRousseau/PCSC#216 (comment)
New release available: https://blog.apdu.fr/posts/2024/12/new-version-of-pcsc-lite-231/ I changed my patch . The static library is now built by default. No need to use a special configuration argument. |
Thanks a lot for your quick response and solving my problem—really impressed! By the way, I have a another question about static builds: is there a way to build a static pcscd + ccid that doesn’t require libccid.so? |
Please open a new issue for that. |
See #217 for the static pcscd + ccid issue. |
Platform
Issue
I'm trying to build the application statically. Build wuth PCSC_LIB=/usr/lib/libpcsclite.a, the resulting binary doesn't contain any dynamic references. However, when I run it I get an error:
loading "libpcsclite_real.so.1" failed: Dynamic loading not supported
I tried linking libpcsclite_real.a, but it doesn't help.
How can I build the application full statically without reference to libpcsclite_real.so.1 ?
I think the problem is with versions newer than 2.0.3.
The text was updated successfully, but these errors were encountered: