[OTR-dev] dynamic linking and gtk_imhtml_append_text_with_images
Ian Goldberg
ian at cypherpunks.ca
Mon Jan 31 11:24:57 EST 2011
On Tue, Jan 25, 2011 at 04:36:15PM -0500, Greg Troxel wrote:
> I have been using pidgin-otr just fine on NetBSD for a long time:
>
> pidgin-2.7.3nb2 Multi-protocol Instant Messaging client GTK frontend
> pidgin-otr-3.2.0nb7 Plugin for pidgin to add OTR (Off-The-Record) encryption
>
> On OS X, the plugin is greyed out, and it complains about not finding
> gtk_imhtml_append_text_with_image. I at first thought that this was due
> to -lgtk* not being given on the link line, and edited that in to
> Makefile.{am,in}. Then I realized that
> gtk_imhtml_append_text_with_image is from pidgin, not gtk. On my NetBSD
> system, pidgin is stripped, so I don't understand how that symbol is
> found by the otr plugin. On the mac, the pidgin binary doesn't seem to
> define the symbol either.
>
> Hints about how this is supposed to work would be appreciated - I'd like
> to fix up pkgsrc so that pidgin-otr/pidgin work on the mac when built
> that way.
>
> Specifically:
>
> how is the U symbol gtk_imhtml_append_text_with_image in the plugin
> resolved if pidgin is stripped?
pidgin plugins use *lots* of functions provided by pidgin.
$ nm pidgin-otr.so | egrep ' U (pidgin|purple)'
shows 54 such functions. So however those functions get resolved,
gtk_imhtml_append_text_with_image should be the same.
Now it could be that some more recent version of pidgin has removed that
function. That would indeed be trickier, as pidgin-otr would have to be
rewritten so as to not expect it.
> how are symbols in gtk resolved in the plugin if the plugin does not
> link against gtk? Are they available because pidgin has linked
> against them?
Yes, usually.
> How can pidgin-otr work with the text-mode libpurple client? Or is
> this truly a pidgin plugin only?
pidgin-otr is architected with a separation between the logic and the
ui. As normally built, the ui is the gtk one which is intended to work
with pidgin. If someone were to write a different ui part, the intent
is that it would work fine with finch. (But I don't know of anyone
who's done that yet.)
- Ian
More information about the OTR-dev
mailing list