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

Link to libc instead of libdl on desktop linux #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hitsounds
Copy link

@hitsounds hitsounds commented Mar 26, 2023

As of glibc v2.34 it is preferred to link against libc.so instead of libdl.so.

"In order to support smoother in-place-upgrades and to simplify
the implementation of the runtime all functionality formerly
implemented in the libraries libpthread, libdl, libutil, libanl has
been integrated into libc"
(src: https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html).

Some distributions don't provide a libdl.so symlink any more which is causing issues.

Ideally merge #40 before this to fix the build as well.

Related issues:
veldrid/veldrid#143
ppy/osu#22956

@hitsounds hitsounds changed the title Link to libc instead of libdl Link to libc instead of libdl on desktop linux Mar 27, 2023
Tacodiva added a commit to Tacodiva/TdVk that referenced this pull request Jun 21, 2023
 Also suppress some warnings
@Tacodiva
Copy link

Tacodiva commented Jan 8, 2024

For .NET versions which have it (IE not dotnet standard 1.4), System.Runtime.InteropServices.NativeLibrary should really be used. That will use whatever the dotnet runtime is using as its linker so it should be much more reliable than trying hard-code the dynamic linker for each platform. You can see how I use it in my fork here.

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.

2 participants