Modify

#1004 closed defect (fixed)

bitlbee otr plugin does not compilet with libotr 4

Reported by: anonymous Owned by: pesco
Priority: normal Milestone:
Component: OTR Version: 3.0.6
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:

Description

As the subject says. Bitlbee's otr plugin does not compile with libotr starting of version 4

See the log below:

* Building plugin otr.so
otr.c: In Funktion »init_plugin«:
otr.c:210: Fehler: »OtrlMessageAppOps« hat kein Element namens »notify«
otr.c:211: Fehler: »OtrlMessageAppOps« hat kein Element namens »display_otr_message«
otr.c:213: Fehler: »OtrlMessageAppOps« hat kein Element namens »protocol_name«
otr.c:214: Fehler: »OtrlMessageAppOps« hat kein Element namens »protocol_name_free«
otr.c:220: Fehler: »OtrlMessageAppOps« hat kein Element namens »log_message«
otr.c: In Funktion »otr_filter_msg_in«:
otr.c:388: Fehler: Zu wenige Argumente für Funktion »otrl_message_receiving«
otr.c:401: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:401: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »otr_filter_msg_out«:
otr.c:469: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:469: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c:481: Warnung: Übergabe des Arguments 7 von »otrl_message_sending«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/message.h:335: Anmerkung: expected »otrl_instag_t« but argument is of type »char *«
otr.c:481: Warnung: Übergabe des Arguments 9 von »otrl_message_sending« von inkompatiblem Zeigertyp
/home/loler/code/bitlbee-3.0.6/libotr/message.h:335: Anmerkung: expected »struct OtrlTLV *« but argument is of type »char **«
otr.c:481: Fehler: Inkompatibler Typ für Argument 11 von »otrl_message_sending«
/home/loler/code/bitlbee-3.0.6/libotr/message.h:335: Anmerkung: expected »OtrlFragmentPolicy« but argument is of type »void *«
otr.c:481: Fehler: Zu wenige Argumente für Funktion »otrl_message_sending«
otr.c:494: Warnung: Implizite Deklaration der Funktion »otrl_message_fragment_and_send«
otr.c: In Funktion »cmd_otr_disconnect«:
otr.c:777: Fehler: Zu wenige Argumente für Funktion »otrl_message_disconnect«
otr.c:783: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:783: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »cmd_otr_trust«:
otr.c:833: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:833: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »cmd_otr_info«:
otr.c:897: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:897: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c:911: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:911: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »cmd_otr_forget«:
otr.c:1030: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:1030: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c:1073: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:1073: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »otr_handle_smp«:
otr.c:1136: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:1136: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
otr.c: In Funktion »otr_smp_or_smpq«:
otr.c:1268: Warnung: Übergabe des Arguments 6 von »otrl_context_find«  erzeugt Ganzzahl von Zeiger ohne Typkonvertierung
/home/loler/code/bitlbee-3.0.6/libotr/context.h:139: Anmerkung: expected »int« but argument is of type »void *«
otr.c:1268: Fehler: Zu wenige Argumente für Funktion »otrl_context_find«
make: *** [otr.so] Fehler 1

Attachments (0)

Change History (13)

comment:1 Changed at 2012-12-02T21:03:39Z by bitlbee.org@…

I can confirm this.

English log:

[florian@lupin bitlbee-build]$ make clean
...
[florian@lupin bitlbee-build]$ ./configure --otr=plugin
BitlBee configure

Using bzr revision #949 as version number
Spoofing version number: "bzr-bitlbee-build-949"

Architecture: Linux

Configuration done:
  Debugging disabled.
  Building PIE executable
  Binary stripping enabled.
  Off-the-Record (OTR) Messaging enabled (as a plugin).
  systemd enabled.
  Using event handler: glib
  Using SSL library: gnutls
  Building with these protocols: msn jabber oscar yahoo twitter
[florian@lupin bitlbee-build]$ make
...
* Building plugin otr.so
otr.c: In function ‘init_plugin’:
otr.c:210:9: error: ‘OtrlMessageAppOps’ has no member named ‘notify’
otr.c:211:9: error: ‘OtrlMessageAppOps’ has no member named ‘display_otr_message’
otr.c:213:9: error: ‘OtrlMessageAppOps’ has no member named ‘protocol_name’
otr.c:214:9: error: ‘OtrlMessageAppOps’ has no member named ‘protocol_name_free’
otr.c:220:9: error: ‘OtrlMessageAppOps’ has no member named ‘log_message’
otr.c: In function ‘otr_filter_msg_in’:
otr.c:388:3: error: too few arguments to function ‘otrl_message_receiving’
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:374:5: note: declared here
otr.c:401:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:401:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘otr_filter_msg_out’:
otr.c:469:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:469:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c:481:3: warning: passing argument 7 of ‘otrl_message_sending’ makes integer from pointer without a cast [enabled by default]
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:335:14: note: expected ‘otrl_instag_t’ but argument is of type ‘char *’
otr.c:481:3: warning: passing argument 9 of ‘otrl_message_sending’ from incompatible pointer type [enabled by default]
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:335:14: note: expected ‘struct OtrlTLV *’ but argument is of type ‘char **’
otr.c:481:3: error: incompatible type for argument 11 of ‘otrl_message_sending’
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:335:14: note: expected ‘OtrlFragmentPolicy’ but argument is of type ‘void *’
otr.c:481:3: error: too few arguments to function ‘otrl_message_sending’
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:335:14: note: declared here
otr.c:494:3: warning: implicit declaration of function ‘otrl_message_fragment_and_send’ [-Wimplicit-function-declaration]
otr.c: In function ‘cmd_otr_disconnect’:
otr.c:777:3: error: too few arguments to function ‘otrl_message_disconnect’
In file included from otr.h:44:0,
                 from otr.c:42:
/usr/include/libotr/message.h:384:6: note: declared here
otr.c:783:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:783:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘cmd_otr_trust’:
otr.c:833:3: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:833:3: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘cmd_otr_info’:
otr.c:897:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:897:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c:911:5: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:911:5: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘cmd_otr_forget’:
otr.c:1030:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:1030:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c:1073:4: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:1073:4: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘otr_handle_smp’:
otr.c:1136:3: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:1136:3: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
otr.c: In function ‘otr_smp_or_smpq’:
otr.c:1268:3: warning: passing argument 6 of ‘otrl_context_find’ makes integer from pointer without a cast [enabled by default]
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: expected ‘int’ but argument is of type ‘void *’
otr.c:1268:3: error: too few arguments to function ‘otrl_context_find’
In file included from /usr/include/libotr/proto.h:24:0,
                 from otr.h:43,
                 from otr.c:42:
/usr/include/libotr/context.h:139:15: note: declared here
make: *** [otr.so] Error 1

comment:2 Changed at 2013-08-05T10:39:51Z by Matej Cepl <mcepl@…>

comment:3 Changed at 2013-08-05T15:28:46Z by pesco

Finally got around to this. The repo at

http://code.khjk.org/bitlbee/

has an updated version that works with (and requires) libotr-4.0.0.

Multi-instance support (multiple clients logged into the same account) is only rudimentary right now: instance tags are generated, recognized, and persist across sessions, but there is no way to list or select the ones used or available for a given buddy.

comment:4 Changed at 2013-08-05T23:23:46Z by Matej Cepl <mcepl@…>

I have tried to condense your fix to the patch http://mcepl.fedorapeople.org/tmp/bitlbee-libotr4.patch, but it still doesn't build for me. Log of the failed build is on http://mcepl.fedorapeople.org/tmp/_build-3.2-5.el7.log

(BTW, my repo is http://luther.ceplovi.cz/git/bitlbee.git/)

comment:5 Changed at 2013-08-15T12:54:39Z by stsp

The libotr-4.0.0 support code from http://code.khjk.org/bitlbee/ works for me on OpenBSD: http://marc.info/?l=openbsd-ports&m=137656238506916&w=2

Matej, the errors in your build log look as if you are trying to compile against libotr 3 instead of 4. Could this be the problem?

comment:6 in reply to:  5 Changed at 2013-08-15T18:03:57Z by Matej Cepl <mcepl@…>

Replying to stsp:

Matej, the errors in your build log look as if you are trying to compile against libotr 3 instead of 4. Could this be the problem?

Right, it is the problem. Would it be possible to have some option or something for libtotr3 compatibility (apparently, not all distros will have libotr4 anytime soon).

comment:7 Changed at 2013-08-15T18:31:25Z by pesco

I suppose the easiest way would be to simply distribute the old versions of otr.[ch] with bitlbee and switch between which to compile. It's very isolated from the rest of bitlbee. The changes to libotr have been pretty extensive, though, so supporting both in the same codebase would be messy.

comment:8 Changed at 2013-09-17T13:05:33Z by ma.anselmi@…

Just chiming in. I encountered this issue as well while attempting to build bitlbee 3.2 with libotr 4.0.0.

Hopefully support for version 4.0.0 makes its way into bitlbee's next release. Thanks for developing bitlbee---good stuff.

comment:9 in reply to:  3 ; Changed at 2013-09-17T13:32:02Z by wilmer

Sorry for the lack of followup so far. :-/

Replying to pesco:

Multi-instance support (multiple clients logged into the same account) is only rudimentary right now: instance tags are generated, recognized, and persist across sessions, but there is no way to list or select the ones used or available for a given buddy.

Just to make sure: Is this just lack of support for new functionality offered by libotr4, or a regression?

Pretty annoying that libotr folks broke backward compatibility, but I guess we'll just have to accept that. :-(

comment:10 in reply to:  9 Changed at 2013-09-17T18:14:33Z by pesco

Replying to wilmer:

Just to make sure: Is this just lack of support for new functionality offered by libotr4, or a regression?

The former. In fact it should be better-behaved with respect to multi-client stuff, it's just not the full package.

There are some changes with respect to how errors are handled and the messages generated; I can't entirely rule out some minor regressions in that behaviour, but I think that is acceptable; I've been using the new code since pushing it and am happy so far.

comment:11 Changed at 2013-12-05T09:25:49Z by wilmer

Resolution: fixed
Status: newclosed

Oh man, I never noticed your last comment here. :-( Anyway, this is finally merged now. The incompatibility with previous OTR versions is a massive pain but I don't really fancy dirty workarounds for it. Sigh.

comment:12 Changed at 2014-06-25T20:00:54Z by pasnox@…

Hi,

I just tried to upgrade bitlbee and i get around this problem si it seem i'm now using libotr4. I also had to disable all ports using libproxy as bitlbee is not buildable having this port enabled.

What i can do ?

Thanks,

comment:13 Changed at 2014-06-26T08:03:03Z by pasnox@…

I applied this patch to bitlbee source and it then build fine: https://github.com/PhantomX/slackbuilds/blob/master/bitlbee/patches/bitlbee-3.2-libotr4.patch

I still add to inactive libproxy and dependencies so it build fine, then reactive after:

sudo port deactivate libproxy neon libmusicbrainz3 kscd kdemultimedia4 kde sudo port activate libproxy neon libmusicbrainz3 kscd kdemultimedia4 kde

PasNox,

Modify Ticket

Action
as closed The owner will remain pesco.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.