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

static library from p11-kit #355

Closed
bulbalion opened this issue Feb 14, 2021 · 2 comments
Closed

static library from p11-kit #355

bulbalion opened this issue Feb 14, 2021 · 2 comments

Comments

@bulbalion
Copy link

Hello,
I'm trying to build elinks-0.14 with gnutls statically. The reason is GNU license. I would like to use elinks for a project and static binary would be nice.
When I try to compile it I run into error due to p11-kit as follows:
/usr/bin/ld: cannot find -lp11-kit
It's compile using the -static gcc option.
I tried to download p11-kit-0.23.22 and compile it using:
./configure --enable-static
and I run into:
configure: error: p11-kit cannot be used as a static library
Is that intentional behavior or bug?
Thank You & take care and thank You for Your work

@ueno
Copy link
Member

ueno commented Feb 14, 2021

I'm afraid to say it's intentional. p11-kit uses ELF constructor for library initialization and that wouldn't work otherwise. Although it is possible to expose an explicit initialization function as part of the API (currently used in tests but hidden), it would require the calling sites (e.g., gnutls) to call that function explicitly.

@bulbalion
Copy link
Author

Thank You very much. That answers my question.

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