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

cooperate with raco distribute to include shared libs in distributions #14

Merged
merged 7 commits into from
Dec 27, 2020

Conversation

Bogdanp
Copy link
Contributor

@Bogdanp Bogdanp commented Dec 23, 2020

This makes it so that distros built with raco distribute include the shared libs they depend on when those libs are installed specifically for Racket (like in the case of my libargon2 package).

Bogdanp added a commit to Bogdanp/koyo that referenced this pull request Dec 23, 2020
Defining a runtime path at this level does cause the `so` to get
included in distributions, but it doesn't alter the way the runtime
searches for libs so `crypto-lib` can't find it.  The proper fix here
is to alter `crypto-lib` as in [1].

[1]: rmculpepper/crypto#14
@rmculpepper
Copy link
Owner

Thanks for the PR! I was ambivalent at first, but now that I have refreshed my understanding of how define-runtime-path with 'so works (in particular, it only includes files from the Racket-specific directories), I think this is a good change. Here are a few comments:

In private/nettle/ffi.rkt, libhogweed (provides pk support) also needs to be changed.

Based on the output of ldd with the various shared libraries on my system (eg, ldd /usr/lib/x86_64-linux-gnu/libgcrypt.so.20), there are some additional dependencies that should be considered for inclusion. (I've removed the version suffixes.)

  • libgcrypt.so depends on libgpg-error.so (should probably include)
  • libhogweed.so (nettle) depends on libgmp.so (this probably needs handling in the gmp package)
  • libb2.so depends on libgomp.so (not sure)
  • libcrypto.so, libargon2.so, libsodium.so, and libdecaf.so have only standard dependencies

The test failure is an actual bug introduced by a recent change, so drop that commit and I'll fix the bug.

@Bogdanp
Copy link
Contributor Author

Bogdanp commented Dec 23, 2020

Thanks for the review!

Re. libb2, I don't see (using otool) the open MP dep on macOS (installed using homebrew), but I do see it in the project's configure.ac so I've added it. There should be no harm having it there where it's not needed since it will just be ignored.

Let me know if you want me to make a PR to the gmp package or if you want to make the change yourself.

rmculpepper added a commit to rmculpepper/racket-gmp that referenced this pull request Dec 27, 2020
Also, prefer specific version over versionless library.

See rmculpepper/crypto#14 for discussion.
@rmculpepper rmculpepper merged commit c6fa53a into rmculpepper:master Dec 27, 2020
@rmculpepper
Copy link
Owner

Merged, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants