Bug 306276 - Kopete doesn't build with libotr 4.0.0
Summary: Kopete doesn't build with libotr 4.0.0
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: OTR Plugin (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 306277 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-05 05:14 UTC by Andrea Scarpino
Modified: 2013-10-26 11:53 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2012-09-05 05:14:52 UTC
automoc4: empty source file: /build/src/kdenetwork-4.9.1/kopete/protocols/sms/ui/empty.cpp
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, OtrlNotifyLevel, const char*, const char*, const char*, const char*, const char*, const char*)’ to ‘void (*)(void*)’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘int (*)(void*, const char*, const char*, const char*, const char*)’ to ‘void (*)(void*, OtrlUserState, const char*, const char*, const char*, unsigned char*) {aka void (*)(void*, s_OtrlUserState*, const char*, const char*, const char*, unsigned char*)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘const char* (*)(void*, const char*)’ to ‘void (*)(void*, ConnContext*) {aka void (*)(void*, context*)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, const char*)’ to ‘void (*)(void*, ConnContext*) {aka void (*)(void*, context*)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, OtrlUserState, const char*, const char*, const char*, unsigned char*) {aka void (*)(void*, s_OtrlUserState*, const char*, const char*, const char*, unsigned char*)}’ to ‘void (*)(void*, ConnContext*, int) {aka void (*)(void*, context*, int)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*)’ to ‘int (*)(void*, ConnContext*) {aka int (*)(void*, context*)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, ConnContext*) {aka void (*)(void*, context*)}’ to ‘const char* (*)(void*, const char*, const char*)’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, ConnContext*) {aka void (*)(void*, context*)}’ to ‘void (*)(void*, const char*)’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, ConnContext*, int) {aka void (*)(void*, context*, int)}’ to ‘void (*)(void*, ConnContext*, unsigned int, const unsigned char*, size_t, const unsigned char*) {aka void (*)(void*, context*, unsigned int, const unsigned char*, long unsigned int, const unsigned char*)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘void (*)(void*, const char*)’ to ‘const char* (*)(void*, ConnContext*, OtrlErrorCode) {aka const char* (*)(void*, context*, OtrlErrorCode)}’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: error: invalid conversion from ‘int (*)(void*, ConnContext*) {aka int (*)(void*, context*)}’ to ‘void (*)(void*, const char*)’ [-fpermissive]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::handle_smp_event’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::handle_msg_event’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::create_instag’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::convert_msg’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::convert_free’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:334:1: warning: missing initializer for member ‘s_OtrlMessageAppOps::timer_control’ [-Wmissing-field-initializers]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘int OtrlChatInterface::decryptMessage(QString*, const QString&, const QString&, const QString&, Kopete::ChatSession*)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:388:200: error: too few arguments to function ‘int otrl_message_receiving(OtrlUserState, const OtrlMessageAppOps*, void*, const char*, const char*, const char*, const char*, char**, OtrlTLV**, ConnContext**, void (*)(void*, ConnContext*), void*)’
In file included from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:41:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/message.h:374:5: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:399:135: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:399:135: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
In file included from /usr/include/QtCore/qstring.h:46:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:28,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/QtCore/qbytearray.h: In member function ‘int OtrlChatInterface::encryptMessage(QString*, const QString&, const QString&, const QString&, Kopete::ChatSession*)’:
/usr/include/QtCore/qbytearray.h:383:5: error: ‘QByteArray::operator QNoImplicitBoolCast() const’ is private
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:547:183: error: within this context
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:547:183: error: cannot convert ‘char**’ to ‘OtrlTLV* {aka s_OtrlTLV*}’ for argument ‘9’ to ‘gcry_error_t otrl_message_sending(OtrlUserState, const OtrlMessageAppOps*, void*, const char*, const char*, const char*, otrl_instag_t, const char*, OtrlTLV*, char**, OtrlFragmentPolicy, ConnContext**, void (*)(void*, ConnContext*), void*)’
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:555:149: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:555:149: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:560:46: error: ‘otrl_message_fragment_and_send’ was not declared in this scope
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘void OtrlChatInterface::disconnectSession(Kopete::ChatSession*)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:591:228: error: too few arguments to function ‘void otrl_message_disconnect(OtrlUserState, const OtrlMessageAppOps*, void*, const char*, const char*, const char*, otrl_instag_t)’
In file included from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:41:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/message.h:384:6: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘int OtrlChatInterface::privState(Kopete::ChatSession*)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:627:223: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:627:223: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘void OtrlChatInterface::verifyFingerprint(Kopete::ChatSession*)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:660:213: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:660:213: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘void OtrlChatInterface::initSMP(ConnContext*, Kopete::ChatSession*, const QString&)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:756:213: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:756:213: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp: In member function ‘void OtrlChatInterface::initSMPQ(ConnContext*, Kopete::ChatSession*, const QString&, const QString&)’:
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:768:213: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
/build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:768:213: error: too few arguments to function ‘ConnContext* otrl_context_find(OtrlUserState, const char*, const char*, const char*, otrl_instag_t, int, int*, void (*)(void*, ConnContext*), void*)’
In file included from /usr/include/libotr/proto.h:24:0,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/authenticationwizard.h:29,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.h:36,
                 from /build/src/kdenetwork-4.9.1/kopete/plugins/otr/otrlchatinterface.cpp:25:
/usr/include/libotr/context.h:139:15: note: declared here
make[2]: *** [kopete/plugins/otr/CMakeFiles/kopete_otr_shared.dir/otrlchatinterface.o] Error 1
make[1]: *** [kopete/plugins/otr/CMakeFiles/kopete_otr_shared.dir/all] Error 2
make: *** [all] Error 2


Reproducible: Always

Steps to Reproduce:
1. Update libotr to 5.0.0
2. Try to build kopete
Actual Results:  
Build fails

Expected Results:  
it builds

KDE 4.9.1
libotr 5.0.0
Comment 1 Andrea Scarpino 2012-09-05 05:19:51 UTC
*** Bug 306277 has been marked as a duplicate of this bug. ***
Comment 2 David McInnis 2013-01-03 19:23:19 UTC
I have this exact same problem compiling from source.  I run Arch.

I have libotr versions 3, and 4:

 libotr3 3.2.1-1

libotr 4.0.0-1
Comment 4 David McInnis 2013-01-03 21:31:07 UTC
Thank you very much for the workaround.

I'm very new to KDE, and I'm using kdesrc-build to build the development branch.  How do I go about applying the patch?


-David
Comment 5 Johannes Huber 2013-07-05 19:43:42 UTC
@Andrea how about to put the workaround into an review request or is it too hacky?
Comment 6 Andrea Scarpino 2013-07-06 07:06:16 UTC
(In reply to comment #5)
> @Andrea how about to put the workaround into an review request or is it too
> hacky?

The workaround requires a patched libotr which installs headers under the libotr3 prefix and provides a libotr3.so library.
Comment 7 Michael Zanetti 2013-09-17 17:17:35 UTC
Git commit b977f1f701afd1f9192f35e0263f2f1c04bef53e by Michael Zanetti.
Committed on 24/06/2013 at 22:20.
Pushed by mzanetti into branch 'master'.

ported otr plugin to libotr 4.0.0
Related: bug 195328, bug 218570, bug 298681, bug 304105, bug 309987, bug 318255, bug 204502

M  +1    -3    CMakeLists.txt
M  +5    -5    cmake/modules/FindLibOTR.cmake
M  +17   -16   plugins/otr/authenticationwizard.cpp
M  +1    -1    plugins/otr/authenticationwizard.h
M  +1    -1    plugins/otr/kopete_otr.desktop
M  +1    -1    plugins/otr/otrguiclient.cpp
M  +1    -1    plugins/otr/otrguiclient.h
M  +455  -316  plugins/otr/otrlchatinterface.cpp
M  +42   -7    plugins/otr/otrlchatinterface.h
M  +2    -6    plugins/otr/otrlconfinterface.cpp
M  +1    -1    plugins/otr/otrlconfinterface.h
M  +22   -68   plugins/otr/otrplugin.cpp
M  +1    -1    plugins/otr/otrplugin.h
M  +1    -1    plugins/otr/otrpreferences.cpp
M  +1    -1    plugins/otr/otrpreferences.h
M  +1    -1    plugins/otr/privkeypopup.cpp
M  +1    -1    plugins/otr/privkeypopup.h

http://commits.kde.org/kopete/b977f1f701afd1f9192f35e0263f2f1c04bef53e
Comment 8 Neofytos Kolokotronis 2013-10-14 13:46:30 UTC
I tried building in Chakra kdenetwork-kopete 4.11.2 against libotr 4.0.0. The build completes, but I get this in the output:
-- libotr version between 3.2.0 and 4.0.0 required but found 4.0.0.

And then it's listed in the OPTIONAL dependencies that are NOT found:
   * libotr (3.2.0 or higher)  <http://www.cypherpunks.ca/otr>
     A library to encrypt messages with Off-the-Record encryption (versions 3.2.0 to 4.0.0)
     Required for the Kopete otr plugin.

Any idea why this might happen?
Comment 9 Andrea Scarpino 2013-10-14 13:51:14 UTC
Because this has not been fixed in KDE4.11 but master.
(I guess) this cannot be backported because of the dependency version bump.
Comment 10 Pali Rohár 2013-10-26 11:53:04 UTC
Right, support will be in KDE 4.12 and cannot be backported (due to new dependency) to KDE 4.11