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

Do not use dlopen by default #58

Open
liferooter opened this issue Apr 6, 2024 · 1 comment
Open

Do not use dlopen by default #58

liferooter opened this issue Apr 6, 2024 · 1 comment

Comments

@liferooter
Copy link

Using dlopen feature by default prevents the binary from dynamically linkage with wayland-client.so, making it harder to package such programs (e.g. for Nix, which automatically finds dynamically linked dependencies, but requires manual wrapping if dlopen is used) and makes it generally harder to track dependencies, giving no real advantages.

Please disable dlopen feature by default.

@kchibisov
Copy link
Member

Yeah, but keep in mind that features in rust are additive, and e.g. winit always uses dlopen (though, you can disable it), which will force the dlopen on the user anyway and will enable dlopen in this crate, so it won't really help.

Also, from my point of view there's no desire to disable dlopen because it simplifies cross and dependency management, I understand though that nixOS folks are really noisy when it comes to dlopen, because what is LD_LIBRARY_PATH and why such loading exists is a hard for them to grasp. No offense, I'm just tired of nixOS users not being able to do simple things all over again.

You're running patchelf as the end command for the binary with the option to modify rpath it's clearly not an issue with packaging, and for regular dev env, you can automatically build the LD_LIBRARY_PATH and populate, which you'll need anyway, so you won't have to use patchelf. idk, improve the docs on nixOS to teach how to do such things, since when I used it, I always had to grep the nixpkgs sources to figure out basic things, and it still was not great.

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