Cannot load libpurple plugins dynamically on iOS
Joe Jordan
j at joedj.net
Tue Aug 16 05:58:04 EDT 2011
Looks like g_module_symbol("purple_init_plugin") calls dlsym("_purple_init_plugin") here, but dlsym expects "purple_init_plugin" without the leading underscore. Perhaps my glib (glib_2.20.4-3_iphoneos-arm.deb) is broken?
At any rate, this patch works for me, for now:
iJoe:~/pidgin/pidgin-2.9.0/libpurple mobile$ diff -u plugin.h.old plugin.h
--- plugin.h.old 2011-08-16 19:49:13.000000000 +1000
+++ plugin.h 2011-08-16 19:32:09.000000000 +1000
@@ -230,8 +230,8 @@
}
#else /* PURPLE_PLUGINS && !PURPLE_STATIC_PRPL */
# define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
- G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin); \
- G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin) { \
+ G_MODULE_EXPORT gboolean _purple_init_plugin(PurplePlugin *plugin); \
+ G_MODULE_EXPORT gboolean _purple_init_plugin(PurplePlugin *plugin) { \
plugin->info = &(plugininfo); \
initfunc((plugin)); \
return purple_plugin_register(plugin); \
Cheers,
Joe
On 16/08/2011, at 2:43 PM, Joe Jordan wrote:
> On 16/08/2011, at 1:58 PM, Ethan Blanton wrote:
>
>> Joe Jordan spake unto us the following wisdom:
>>> I have built libpurple for (jailbroken) iOS, but it cannot dynamically
>>> load any plugins. I get debug output such as:
>>>
>>> plugins: /var/mobile/pidgin/install/lib/purple-2/ssl-gnutls.so is not
>>> usable because the 'purple_init_plugin' symbol could not be found.
>>>
>>> The symbol looks alright to me:
>>>
>>> iJoe:~/pidgin/install/lib/purple-2 mobile$ nm -g ssl-gnutls.so | grep 'T '
>>> 000031e8 T _purple_init_plugin
>>
>> Symbol munging may be broken. Change it to try _purple_init_plugin
>> and see if it works.
>>
>> Ethan
>
> Thanks for the reply Ethan,
>
> Unfortunately it doesn't look like this change helps.
>
> (sorry for the dup reply - meant to reply to the list...)
>
> -Joe
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
More information about the Devel
mailing list