-
Notifications
You must be signed in to change notification settings - Fork 372
Description
I am running into an error loading modules. I have tried both installing from homebrew and from source.
/load perl
returns
Irssi: Error loading module perl/core:
dlopen(/opt/homebrew/lib/irssi/modules/libperl_core.so, 0x000A): tried:
'/opt/homebrew/lib/irssi/modules/libperl_core.so' (no such file),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/irssi/modules/libperl_core.so' (nosuch file),
'/opt/homebrew/lib/irssi/modules/libperl_core.so' (no such file)
The file's path on my machine is /opt/homebrew/lib/irssi/modules/libperl_core.dylib
.
This seems to be a bug with glib/gmodule
g_module_build_path
or the build scripts. The idiomatic file name on macos is dylib, but I can see how it would be simpler for cross-compilation that modules on macos were also .so instead.
After further investigation, glib is deprecating g_module_build_path as of 2.77. It recommends using g_module_load instead.
https://gitlab.gnome.org/GNOME/glib/-/blob/4d1e9a9520fb27db5e0997b58e736d1040227145/gmodule/gmodule.c#L971
g_module_load uses the appropriate preprocessor rules to check for dylib.
https://gitlab.gnome.org/GNOME/glib/-/blob/2.75.0/gmodule/gmodule.c?ref_type=tags#L621
Is the correct approach to upgrade glib to 2.75 (the first version with the updated suffix checks) in g_module_load? What is the proper way in meson to force a glib module version bump?
The other options are to add a check for dylib's in the irssi code base or modify meson to output .so
files on macos instead of dylib.