rust-jack icon indicating copy to clipboard operation
rust-jack copied to clipboard

Support compile time linking.

Open wmedrano opened this issue 2 years ago • 5 comments

It was removed in 0.10.0 in favor of manually finding the dynamic library and loading symbols.

wmedrano avatar Apr 10 '22 18:04 wmedrano

This would be simply linking, not static linking.

Be-ing avatar Apr 10 '22 18:04 Be-ing

As I mentioned in #179, the jack crate now always links to libjack, even if the dynamic loading feature is enabled. If the dynamic_loading feature is enabled, then the dynamic linking modules probably shouldn't be generated and included.

robbert-vdh avatar Nov 03 '22 02:11 robbert-vdh

As I mentioned in #179, the jack crate now always links to libjack, even if the dynamic loading feature is enabled. If the dynamic_loading feature is enabled, then the dynamic linking modules probably shouldn't be generated and included.

How does #180 look?

wmedrano avatar Nov 07 '22 17:11 wmedrano

I guess that probably works. Does functions::dynamic_loading always need to be re-exported (or be available even) even when using compile-time dynamic linking?

robbert-vdh avatar Nov 07 '22 20:11 robbert-vdh

In Nix, I think the Cargo package wrapper uses patchelf to change dynamically linked paths to the correct place on the built system. I think this essentially operates on the information displayed by ldd.

Because libjack2.so.0 is runtime (? manually? programmatically?) linked it's not discovered and updated, and it fails to start at runtime.

I realize Nix users might be minor, but I think there's many other tools that rely on ldd information and libjack may be used in a wide variety of software, some of which may be impacted.

andrewbaxter avatar Nov 26 '23 07:11 andrewbaxter