Hi Thibaut,

On Sun, May 20, 2007 at 11:18:34PM +0200, Thibaut VARENE wrote:
> Nobody reacted to this email. What's your opinion on this? Is this an
> acceptable fix for Debian?

Sure, it seems like a reasonable fix to me under the circumstances.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/

> On 3/8/07, Ian Goldberg <[EMAIL PROTECTED]> wrote:
> >I figured out how to do this on Linux.  I have no idea how to do it on
> >other systems, or how to get libtool to do this on its own (possibly not
> >possible).
> >
> >The problem, again: other gaim plugins, such as Jabber or ldap, use
> >libgcrypt (often in the guise of TLS).  libgcrypt uses global variables,
> >and assumes that it will only have one caller per address space.  The
> >various plugins initialize libgcrypt's global variables, and stomp all
> >over each other's (and gaim-otr's) initializations.  Badness ensues.
> >
> >The "right" solution is for libgcrypt to stop using global variables,
> >and to pass handles around.  Back-compatibility can be easily arranged
> >by having the current routines do something like:
> >
> >gcry_foo(int bar, char *baz)
> >{
> >    gcry_foo_r(&global_handle, bar, baz);
> >}
> >
> >but callers "in the know" could call gcry_foo_r directly with a private
> >handle.
> >
> >But until that happens, here's a workaround for gaim-otr to link
> >libgcrypt statically.  It's actually pretty tricky, since it seems calls
> >from one .o to another in a .so file are always looked up dynamically,
> >so if another copy of libgcrypt exists in the address space, you'll
> >still get that one.  So you have to put everything in a single .o, make
> >the libgcrypt symbols local, and turn the result into a .so.
> >
> >Here's Makefile.static (for gaim-otr):
> >
> >.libs/gaim-otr.so: FORCE
> >        # Build everything from the standard Makefile
> >        make
> >        # Link everything, including libotr and libgcrypt, together into
> >        # a single .o file
> >        ld -r  .libs/otr-plugin.o .libs/ui.o .libs/dialogs.o 
> >        .libs/gtk-ui.o .libs/gtk-dialog.o /usr/lib/libotr.a 
> >        /usr/lib/libgcrypt.a /usr/lib/libgpg-error.a -o 
> >        .libs/gaim-otr-shared.o
> >        # Make all the libgcrypt references local to that .o file
> >        objcopy -w -L '*gcry*' .libs/gaim-otr-shared.o 
> >        .libs/gaim-otr-static.o
> >        # Turn the .o into a .so
> >        gcc -shared .libs/gaim-otr-static.o -Wl,-soname -Wl,gaim-otr.so -o 
> >        .libs/gaim-otr.so
> >
> >FORCE:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to