[education/rkward] rkward/rbackend: Workaround for systems lacking libglib symlink
Thomas Friedrichsmeier
null at kde.org
Fri Aug 2 14:16:22 BST 2024
Git commit cf68eb88219583a012a78a3d737f3c865d65f899 by Thomas Friedrichsmeier.
Committed on 02/08/2024 at 13:16.
Pushed by tfry into branch 'master'.
Workaround for systems lacking libglib symlink
M +3 -0 rkward/rbackend/rkrbackend_dlopen.cpp
https://invent.kde.org/education/rkward/-/commit/cf68eb88219583a012a78a3d737f3c865d65f899
diff --git a/rkward/rbackend/rkrbackend_dlopen.cpp b/rkward/rbackend/rkrbackend_dlopen.cpp
index 4dac871df..e245bee55 100644
--- a/rkward/rbackend/rkrbackend_dlopen.cpp
+++ b/rkward/rbackend/rkrbackend_dlopen.cpp
@@ -63,6 +63,9 @@ auto loadlib(const char* name) {
auto loadGlib(unsigned int *version) {
*version = 0;
auto glib = dlopen("libglib-2.0.so", RTLD_LAZY | RTLD_LOCAL);
+ if (!glib) {
+ glib = dlopen("libglib-2.0.so.0", RTLD_LAZY | RTLD_LOCAL); // some systems appear to lack the link
+ }
if (glib) {
dlerror();
auto glib_verp = static_cast<unsigned int *>(resolve_symb(glib, "glib_minor_version")); // Major version is always "2"
More information about the rkward-tracker
mailing list