Skip to content

Fix unable to load *.so plugins#315

Open
wie-niet wants to merge 1 commit into
jaseg:mainfrom
wie-niet:fix-so-load-global-symbols
Open

Fix unable to load *.so plugins#315
wie-niet wants to merge 1 commit into
jaseg:mainfrom
wie-niet:fix-so-load-global-symbols

Conversation

@wie-niet

Copy link
Copy Markdown

Bugfix

Fixes an issue where mpv *.so plugins fail to load, python3-mpv loads libmpv with RTLD_LOCAL, preventing C plugins such as mpv-mpris from resolving libmpv symbols.

when trying to load mpv with mpris.so using mpv.MPV(config=True, log_handler=print, loglevel='debug'):
error mpris2 C plugin error: '/etc/mpv/scripts/mpris.so: undefined symbol: mpv_get_property_string'

Changes

Changed one line 70 in mpv.py to load share object file with ctypes.RTLD_GLOBAL, so symbol mpv_get_property_string can be resolved.

Testing

Tested with:

  • Python 3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0] on linux
  • libmpv2:arm64 0.40.0-3+deb13u1
  • mpv-mpris 0.7.1-1+b2
  • python3-mpv 1.0.7-3

The issue no longer occurs.

python3-mpv loads libmpv with RTLD_LOCAL, preventing C plugins such as mpv-mpris from resolving libmpv symbols.
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.

1 participant