Modify

#1168 closed defect (fixed)

Link error when --ssl=nss and --otr=1

Reported by: Robbie Harwood <rharwood@…> Owned by: pesco
Priority: normal Milestone:
Component: OTR Version: devel
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro: Debian Jessie

Description

When configured like so:

frozencemetery@kirtar:~/bitlbee$ ./configure --ssl=nss --otr=1
BitlBee configure

Architecture: Linux

Configuration done:
  Debugging disabled.
  Building PIE executable
  Binary stripping enabled.
  Off-the-Record (OTR) Messaging enabled.
  systemd disabled.
  Using event handler: glib
  Using SSL library: nss
  Building with these protocols: msn jabber oscar yahoo twitter

Bitlbee will fail to build, with the following output from make:

* Linking bitlbee
/usr/bin/ld: otr.o: undefined reference to symbol 'gcry_error_from_errno@@GCRYPT_1.2'
//lib/x86_64-linux-gnu/libgcrypt.so.11: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:185: recipe for target 'bitlbee' failed
make: *** [bitlbee] Error 1

This error does not occur when building without nss (defaults to gnutls, which builds just fine) or without otr (also builds just fine). Since the error occurs with otr.o, I've marked component as OTR; apologies if this is incorrect.

libnss3-dev is version 2:3.16.3-1

libotr5-dev is version 4.0.0-3

Thanks!

Attachments (1)

otr-link-with-gcrypt.patch (473 bytes) - added by dx at 2014-07-31T10:10:46Z.

Download all attachments as: .zip

Change History (5)

Changed at 2014-07-31T10:10:46Z by dx

Attachment: otr-link-with-gcrypt.patch added

comment:1 Changed at 2014-07-31T10:26:25Z by dx

Ok this one looked weird at first, but it turned out to be simple - gnutls uses libgcrypt, nss doesn't, otr.c does. Just needed to add -lgcrypt to the configure script.

...and after writing that i got stuck trying to figure out why this doesn't happen when building the plugin. Complex linker stuff I'll never understand, surely.

comment:2 Changed at 2014-08-02T19:08:07Z by Robbie Harwood <rharwood@…>

This change seems slightly disingenuous to me, since libgcrypt is part of GnuTLS, and GnuTLS was not requested. Perhaps some documentation could be added to the --otr option to indicate that it must be built against GnuTLS, or that enabling OTR enables linking with GnuTLS?

comment:3 Changed at 2014-08-02T19:42:06Z by dx

I don't know where you get the idea that libgcrypt is part of gnutls - it is heavily used by gnutls but it's just another external library, which libotr also depends on.

It just happens to work when linking to gnutls due to linker magic i'll never understand. Ok I think this doesn't sound very convincing. I'm sure it's an external lib, though.

comment:4 Changed at 2014-09-27T16:49:57Z by dx

Resolution: fixed
Status: newclosed

Applied patch in revision 1052!

Modify Ticket

Action
as closed The owner will remain pesco.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.