Closed laszabine closed 3 years ago
Not sure why the symbol is not found. What does
nm -D /home/sabine/.purple/plugins/libceema.so | grep purple_init_plugin
say?
Nothing looks odd to me looking at the logs. Can you run make with VERBOSE=1 as an argument to see which linker flags are being used?
Here you go: make-verbose.log
Thanks a lot!
Still not able to reproduce on Ubuntu 20 with gcc 10. Can you show the output of /usr/bin/c++ -Q -v /home/sabine/Downloads/ceema/src/threepl/prpl/threepl.cpp
I am not OP but i am having the same problem with current Pidgin 2.14.1. Here is the output of c++ command on my machine:
@hbruintjes I am hoping you are still looking at this project at some time and can help us with this problem. If you need any more input feel free to ask.
Further investigation brings up that the macro PURPLE_INIT_PLUGIN
can not be found inside the compiled libceema.so
.
I looked via objdump -d libceema.so | grep -i purple
but no results are found.
I thing something with the build process is messed up so that some stuff is dropped by the linker or is it being stripped out somewhere.
Just had a fresh look at the original issue: Problem is that it should be libthreepl.so, located in the src subdirectory. Regarding the log file: SOmehow, it seems the linker is trying to build an executable, not a shared object (since it cannot find main()). How did you set up the CMake build?
Great to hear from you!
There is a libthreepl.so
in build/src and it contains the purple_init_plugin function:
nm -D src/libthreepl.so | grep purple_init_plugin
00000000002148af T _Z18purple_init_pluginP13_PurplePlugin
but when i copy it to ~/.purple/plugins and start pidgin i still get the error:
(22:02:22) plugins: probing /home/myxor/.purple/plugins/libthreepl.so
(22:02:22) plugins: /home/myxor/.purple/plugins/libthreepl.so is not usable because the 'purple_init_plugin' symbol could not be found. Does the plugin call the PURPLE_INIT_PLUGIN() macro?
I did not change anything on the cmake config except using mbedTLS instead of OpenSSL.
I am running
mkdir build && cd build && cmake .. && make
btw: what's the difference between libceema
and libthreepl
?
For some reason it uses C++ linkage, though it ought to be C. Is the extern "C" still present in the function definition?
Very strange but it now seems to work with
extern "C" gboolean purple_init_plugin(PurplePlugin *plugin) {
threepl::init_logging();
threepl_init(plugin);
return purple_plugin_register(plugin);
}
which is the original code from you.
I guess i only tested libceema.so
and never libthreepl.so
.
Nevermind, Pidgin now loads the plugin succesfully. Thank you for your help!
Great, I'll consider this resolved, then.
First, thanks a lot for writing this plugin!
I'm trying to install it, and the build looks successful (some warnings), but in Pidgin, the "Add Account" dialogue doesn't list anything related to Threema, and the "Debug Window" shows the following upon opening "Tools" > "Plugins" (where the plugin doesn't appear either):
Looks like this refers to this definition: https://github.com/hbruintjes/ceema/blob/f7b09684d4b6b442cbb1c97f136f8eaab05d3701/src/threepl/prpl/threepl.cpp#L258
Do you know what could be going on there? Thanks a lot!
OS: Fedora 32, 64-bit Kernel: 5.7.8-200.fc32.x86_64, gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) Pidgin version: 2.13.0-18.fc32 (libpurple 2.13.0)