-
Notifications
You must be signed in to change notification settings - Fork 86
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
Consider loading libEGL.so.1
instead of libEGL.so
#276
Comments
mukilan
added a commit
that referenced
this issue
Feb 26, 2024
After the GStreamer update in Servo, the nightly binaries have been failing to launch on linux distros unless `libegl1-mesa-dev` or the equivalent package is installed in the runtime environment. The binaries were loading before the GStreamer update was because the binary had a compile-time link to libEGL.so.1 due to gstreamer-sys crate. Because of this compile-time link, the dlsym calls are able to succesfully load the functions pointers even though the previous dlopen('libEGL.so') call returned a NULL handle indicating failure. This patch makes surfman load `libEGL.so.1` first and fallback to `libEGL.so`. If neither are available, then the initialization panics, unlike the previous behavior where we silently succeed if the binary has a link to the libEGL shared object with the symbols for functions that are used at the runtime. Fixes #276. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
mukilan
added a commit
that referenced
this issue
Feb 26, 2024
After the GStreamer update in Servo, the nightly binaries have been failing to launch on linux distros unless `libegl1-mesa-dev` or the equivalent package is installed in the runtime environment. The binaries were loading before the GStreamer update was because the binary had a compile-time link to libEGL.so.1 due to gstreamer-sys crate. Because of this compile-time link, the dlsym calls are able to succesfully load the functions pointers even though the previous dlopen('libEGL.so') call returned a NULL handle indicating failure. This patch makes surfman load `libEGL.so.1` first and fallback to `libEGL.so`. If neither are available, then the initialization panics, unlike the previous behavior where we silently succeed if the binary has a link to the libEGL shared object with the symbols for functions that are used at the runtime. Fixes #276. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 27, 2024
After the GStreamer update in Servo, the nightly binaries have been failing to launch on linux distros unless `libegl1-mesa-dev` or the equivalent package is installed in the runtime environment. The binaries were loading before the GStreamer update was because the binary had a compile-time link to libEGL.so.1 due to gstreamer-sys crate. Because of this compile-time link, the dlsym calls are able to succesfully load the functions pointers even though the previous dlopen('libEGL.so') call returned a NULL handle indicating failure. This patch makes surfman load `libEGL.so.1` first and fallback to `libEGL.so`. If neither are available, then the initialization panics, unlike the previous behavior where we silently succeed if the binary has a link to the libEGL shared object with the symbols for functions that are used at the runtime. Fixes #276. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After the GStreamer update in Servo, the nightly binaries have been failing to launch on linux distros unless
libegl1-mesa-dev
or equivalent package is installed in the runtime environment.Based on my investigation here, it seems the root cause of the failure is that surfman is trying to dynamically open and load functions from
libEGL.so
, but on many systems the symlink fromlibEGL.so
to the versioned shared object i.elibEGL.so.1
doesn't exist unless thelibegl1-mesa-dev
or equivalent package is installed.Also, the reason the binaries were loading before the GStreamer update was because the binary had a compile-time link to
libEGL.so.1
(due to gstreamer-sys crate, which on nightly is not present after the GStreamer upgrade since we have also disabled the media stack). Because of this compile time link, thedlsym
calls are able to succesfully load the functions even though thedlopen('libEGL.so')
call returns a null handle, indicating failure.Additionally, @mrobinson found this issue which indicates other bindings like
khronos-egl
loadlibEGL.so.1
instead oflibEGL.so
.This issue is to decide if it is a good idea to do the same in surfman. I don't have expertise in EGL, so I am not sure if we still need a fallback to loading
libEGL.so
iflibEGL.so.1
fails to load, like khronos-egl does. I have tested with a patched surfman that loadinglibEGL.so.1
does indeed fix theegl function was not loaded
issues and Servo continues to work.The text was updated successfully, but these errors were encountered: