Closed lunarthegrey closed 6 years ago
Can you get a debug log of pidgin loading the plugins?
To do this, open Help->Debug Window, then leave that window open and open Tools->Plugins. Close the plugins window then copy-paste the output of the debug window.
@EionRobb Thanks for the troubleshooting details, had no idea that debug window existed. Looks like this is the cause. Not sure what the fix is though.
(16:45:46) plugins: probing /home/user/.purple/plugins/lurch.so
(16:45:46) plugins: /home/user/.purple/plugins/lurch.so is not loadable: failed to map segment from shared object
I've never seen "failed to map segment from shared object" as an error when loading any plugin in Pidgin before. A quick googling says something to do with /tmp not being exec (sudo mount /tmp -o remount,exec
to fix, not sure what the implications of that are), something to do with the .so not being marked as executable (chmod +x ~/.purple/plugins/lurch.so
) or something to do with selinux not being permissive (might need to do a system-wide install, rather than just a user install)
I saw that when I Google'd too but I didn't think it was relevant. I found the cause though. The is due to the https://packages.debian.org/stretch/apparmor-profiles-extra package which contains /etc/apparmor.d/usr.bin.pidgin
When setting this to enforce mode like this.
sudo aa-enforce /usr/bin/pidgin
It messes with something and doesn't allow it to execute lurch.so maybe?
When setting it to complain mode the issue goes away and the plugin loads.
sudo aa-complain /usr/bin/pidgin
This is what the AppArmor config for Pidgin looks like.
user@personal:~$ cat /etc/apparmor.d/usr.bin.pidgin
# vim:syntax=apparmor
#include <tunables/global>
/usr/bin/pidgin flags=(complain) {
#include <abstractions/audio>
#include <abstractions/base>
#include <abstractions/bash>
#include <abstractions/dbus-session>
#include <abstractions/dbus-strict>
#include <abstractions/dconf>
#include <abstractions/enchant>
#include <abstractions/gnome>
#include <abstractions/gstreamer>
#include <abstractions/ibus>
#include <abstractions/launchpad-integration>
#include <abstractions/nameservice>
#include <abstractions/private-files-strict>
#include <abstractions/ssl_certs>
#include <abstractions/ubuntu-browsers>
#include <abstractions/ubuntu-helpers>
#include <abstractions/user-download>
dbus receive
bus=system
path=/org/freedesktop/NetworkManager
interface=org.freedesktop.NetworkManager
member={CheckPermissions,DeviceAdded,DeviceRemoved,StateChanged,PropertiesChanged}
peer=(label=unconfined),
dbus send
bus=system
path=/org/freedesktop/NetworkManager
interface=org.freedesktop.NetworkManager
member=state
peer=(label=unconfined),
deny ptrace,
deny capability sys_ptrace,
deny @{HOME}/.local/share/applications/wine/ r,
owner @{HOME}/.gstreamer*/ rw,
owner @{HOME}/.gstreamer*/** rw,
owner @{HOME}/.cache/gstreamer-[0-9]*.[0-9]*/ rw,
owner @{HOME}/.cache/gstreamer-[0-9]*.[0-9]*/registry.*.bin rw,
owner @{HOME}/.cache/gstreamer-[0-9]*.[0-9]*/registry.*.bin.tmp* rw,
/usr/lib/@{multiarch}/gstreamer[0-9]*.[0-9]*/gstreamer-[0-9]*.[0-9]*/gst-plugin-scanner Pix -> gst_plugin_scanner,
owner @{HOME}/.purple/ rw,
owner @{HOME}/.purple/** rwk,
owner @{HOME}/.config/indicators/ rw,
owner @{HOME}/.config/indicators/** rw,
owner @{HOME}/.local/share/applications/ r,
# Uncomment the two following lines if you want to allow Pidgin to update
# any DConf setting:
# owner @{HOME}/.{cache,config}/dconf/user rw,
# owner /{,var/}run/user/[0-9]*/dconf/user rwk,
/{usr/,}bin/dash rix,
/{usr/,}bin/which rix,
# NB: the preferred browser and proxy settings must be configured
# in the GNOME preferences: this profile does not allow running
# the corresponding external configuration applications.
/usr/bin/gconftool-2 rPix,
/usr/bin/gnome-open rmix,
/usr/bin/gsettings rix,
/usr/bin/gvfs-open rmix,
/usr/bin/pidgin r,
/usr/bin/xdg-open rmix,
/etc/purple/prefs.xml r,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/lib/frei0r-1/*.so rm,
/usr/lib/@{multiarch}/libvisual-*/**.so rm,
/usr/lib/pidgin/*.so rm,
/usr/lib/purple*/*.so rm,
# pidgin-blinklight plugin
/usr/lib/pidgin-blinklight/blinklight-fixperm rPix,
@{PROC}/acpi/ibm/light rwk,
/usr/share/purple/ca-certs/ r,
/usr/share/purple/ca-certs/** r,
/usr/share/tcltk/** r,
/usr/share/themes/ r,
owner @{PROC}/@{pid}/auxv r,
owner @{PROC}/@{pid}/fd/ r,
# Site-specific additions and overrides. See local/README for details.
#include <local/usr.bin.pidgin>
}
Ah yep, its a similar answer to the "selinux enforcing" answer. The apparmour profile you've provided doesn't give you permissions to load plugins that were installed into @{HOME}/.purple/plugins
. Either install it into the system-wide /usr/lib/purple-2/
folder or add @{HOME}/.purple/plugins/*.so rm,
to the apparmour profile.
Thanks for the assistance. I'll close this out as it's not an issue with your plugin. :)
Glad this got resolved, and thanks @EionRobb for helping!
I have this problem too. In Debug Window:
(21:40:55) plugins: /usr/lib64/purple-2/lurch.so is not loadable: undefined symbol: jabber_pep_namespace_only_when_pep_enabled_cb
Hi there. I built the plugin using the guide. I'm running on Debian 9 (Stretch). When I open Pidgin I don't see the plugin in the list at all. I'm wondering if Pidgin doesn't read the .so from the directory it was placed in. Pasting build logs below.
Running Pidgin 2.12.0-1
Build logs: