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

Hangs when attempting to build #29

Open
okapia opened this issue Oct 20, 2024 · 1 comment
Open

Hangs when attempting to build #29

okapia opened this issue Oct 20, 2024 · 1 comment

Comments

@okapia
Copy link

okapia commented Oct 20, 2024

The build.rs program attempts to do find /usr -name libgssapi_krb5.so*. This will take a very long time on many systems because it is a recursive find. It never seems to work on my system and certainly takes a very long time. It probably finds multiple incorrect matches. The source of the problem is that krb5-config --prefix returns /usr. Now at the very least you should append "/lib" and maybe "/lib64" to this before running find but it should sooner take the output of krb5-config --libs gssapi and interpret that. On my system, that is:

-L/usr/lib -lgssapi -lgssapi_krb5 -lheimntlm -lkrb5 -lhx509 -lcom_err -lcrypto -lasn1 -lwind -lheimbase -lroken -lcrypt -pthread

Only the second argument there really seems to be necessary (the first is relevant but a default). Alternatuvely, krb5-config --version does identify my GSS implementation as being heimdal.

I really can't stress enough what a bad idea running a recursive find is. Prefixes can be nested such as /usr/local being below /usr so you'll potentially pick up libraries there. find also tends to search in directory order so the results may not be deterministic. Also as a final pedantic point, omitting the -print option to find is a non-standard (but common) extension. I'm not really using libgssapi directly but it gets picked up as a transitive dependency.

@estokes
Copy link
Owner

estokes commented Oct 21, 2024

I would gladly accept a PR to improve the situation

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