bqv / weechat-xmpp

Mozilla Public License 2.0
20 stars 3 forks source link

Tests fail with latest WeeChat 4.0 #12

Open PhrozenByte opened 1 year ago

PhrozenByte commented 1 year ago

First of all, thanks for your work and sharing it with the world! :heart:

I was trying to build your plugin on Alpine 3.18 and suceeded with some trial and error. See below for some notes about that.

However, the plugin's tests fail - apparently due to an updated plugin API as of WeeChat 4.0 (WeeChat 4.0.2 to be more precise; didn't test WeeChat 4.0.3 that was released today yet, but I guess it won't make a difference). I'm not sure whether I can safely ignore this error? I didn't test whether the plugin works with WeeChat 4.0 yet, but I might do that later.

Considering that the plugin API version implies that it wasn't updated for some time I was asking myself whether weechat-xmpp is still maintained, and if yes, whether it's suitable for productive use ("productive use" meaning "just for myself", i.e. the world is not gonna end if it breaks at some point, at least if not constantly - I indeed saw the disclaimer in README.org :smile:). As an alternative I was thinking about using the "official" Jabber plugin, but that's discountined for sure. My next choice would be Bitlbee, but that's not really actively maintained either. Thus I thought that testing your plugin seemed both easier and is the better approach in general anyway.

Disclaimer: I'm not C dev. Like at all. Same for C tooling. I can use it, but I only understand the absolute basics of what it is doing.

So, here's the full make run (click to expand). ``` $ make find . -name "*.o" -delete find . -name "*.gcno" -delete find . -name "*.gcda" -delete rm -f -f .plugin.o .account.o .buffer.o .channel.o .command.o .completion.o .config.o .connection.o .input.o .message.o .omemo.o .pgp.o .user.o .util.o config/.breadcrumb.o config/.file.o config/.section.o config/.account.o config/.option.o data/.omemo.o data/.capability.o xmpp/.presence.o xmpp/.iq.o xmpp/.node.o .plugin.cov.o .account.cov.o .buffer.cov.o .channel.cov.o .command.cov.o .completion.cov.o .config.cov.o .connection.cov.o .input.cov.o .message.cov.o .omemo.cov.o .pgp.cov.o .user.cov.o .util.cov.o config/.breadcrumb.cov.o config/.file.cov.o config/.section.cov.o config/.account.cov.o config/.option.cov.o data/.omemo.cov.o data/.capability.cov.o xmpp/.presence.cov.o xmpp/.iq.cov.o xmpp/.node.cov.o \ sexp/parser.tab.cc sexp/parser.tab.hh \ sexp/location.hh sexp/position.hh \ sexp/stack.hh sexp/parser.output sexp/parser.o \ sexp/lexer.o sexp/lexer.yy.cc sexp/sexp.a make -C deps/diff clean || true make[1]: Entering directory '/usr/src/weechat-xmpp/deps/diff' rm -f libdiff.a diff.o compats.o libdiff.tar.gz rm -f diffchars diffchars.o rm -f diffwords diffwords.o make[1]: Leaving directory '/usr/src/weechat-xmpp/deps/diff' git submodule foreach --recursive git clean -xfd || true Entering 'deps/diff' Removing Makefile.configure Removing config.h Removing config.log git submodule foreach --recursive git reset --hard || true Entering 'deps/diff' HEAD is now at aadb3d7 Fix docu. git submodule update --init --recursive deps/diff cd deps/diff && env -u MAKEFLAGS ./configure config.log: writing... configure.local: no (fully automatic configuration) arc4random: no capsicum: no err: yes explicit_bzero: yes getprogname: no INFTIM: no md5: no memmem: yes memrchr: yes memset_s: no PATH_MAX: yes pledge: no program_invocation_short_name: yes reallocarray: yes recallocarray: no sandbox_init: no seccomp-filter: yes SOCK_NONBLOCK: yes strlcat: yes strlcpy: yes strndup: yes strnlen: yes strtonum: no systrace: no zlib: yes __progname: yes config.h: written Makefile.configure: written make -C deps/diff CFLAGS=-fPIC make[1]: Entering directory '/usr/src/weechat-xmpp/deps/diff' cc -fPIC -c -o diff.o diff.c cc -fPIC -c -o compats.o compats.c ar rs libdiff.a diff.o compats.o ar: creating libdiff.a cc -fPIC -c -o diffchars.o diffchars.c cc -o diffchars diff.o diffchars.o compats.o cc -fPIC -c -o diffwords.o diffwords.c cc -o diffwords diff.o diffwords.o compats.o make[1]: Leaving directory '/usr/src/weechat-xmpp/deps/diff' cd sexp && bison -t -d -v parser.yy parser.yy: warning: 7 shift/reduce conflicts [-Wconflicts-sr] parser.yy: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -fvisibility=default -c sexp/parser.tab.cc -o sexp/parser.o cd sexp && flex -d --outfile=lexer.yy.cc lexer.l g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -fvisibility=default -c sexp/lexer.yy.cc -o sexp/lexer.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -fvisibility=default -c sexp/driver.cpp -o sexp/driver.o ar -r sexp/sexp.a sexp/parser.o sexp/lexer.o sexp/driver.o ar: creating sexp/sexp.a echo > ./.depend for src in plugin.cpp account.cpp buffer.cpp channel.cpp command.cpp completion.cpp config.cpp connection.cpp input.cpp message.cpp omemo.cpp pgp.cpp user.cpp util.cpp config/breadcrumb.cpp config/file.cpp config/section.cpp config/account.cpp config/option.cpp data/omemo.cpp data/capability.cpp xmpp/presence.cpp xmpp/iq.cpp xmpp/node.cpp tests/main.cc; do \ dir="$(dirname $src)"; \ src="$(basename $src)"; \ if [[ $src == *.cpp ]]; then \ echo "g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -MM -MMD -MP -MF - \ -MT $dir/.${src/.cpp/.o} $dir/$src >> ./.depend"; \ g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -MM -MMD -MP -MF - \ -MT $dir/.${src/.cpp/.o} $dir/$src >> ./.depend || true ; \ elif [[ $src == *.c ]]; then \ echo "cc -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdebug-prefix-map=.=/usr/src/weechat-xmpp -std=gnu99 -gdwarf-4 -Wall -Wextra -pedantic -Werror-implicit-function-declaration -Wno-missing-field-initializers -D_XOPEN_SOURCE=700 -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -MM -MMD -MP -MF - \ -MT $dir/.${src/.c/.o} $dir/$src >> ./.depend"; \ cc -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fdebug-prefix-map=.=/usr/src/weechat-xmpp -std=gnu99 -gdwarf-4 -Wall -Wextra -pedantic -Werror-implicit-function-declaration -Wno-missing-field-initializers -D_XOPEN_SOURCE=700 -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -MM -MMD -MP -MF - \ -MT $dir/.${src/.c/.o} $dir/$src >> ./.depend || true ; \ else continue; \ fi; \ done sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand sh: buffer.cpp: unknown operand make weechat-xmpp && make test make[1]: Entering directory '/usr/src/weechat-xmpp' g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c plugin.cpp -o .plugin.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c account.cpp -o .account.o account.cpp: In function 'void weechat::log_emit(void*, xmpp_log_level_t, const char*, const char*)': account.cpp:44:41: warning: 'xmlDoc* xmlRecoverMemory(const char*, int)' is deprecated [-Wdeprecated-declarations] 44 | xmlDocPtr doc = xmlRecoverMemory(xml, strlen(xml)); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/libxml2/libxml/globals.h:18, from /usr/include/libxml2/libxml/xmlIO.h:117, from /usr/include/libxml2/libxml/xmlwriter.h:18, from account.cpp:12: /usr/include/libxml2/libxml/parser.h:872:17: note: declared here 872 | xmlRecoverMemory (const char *buffer, | ^~~~~~~~~~~~~~~~ In file included from account.cpp:20: account.hh: In constructor 'weechat::account::account(weechat::config_file&, std::string)': account.hh:72:21: warning: 'weechat::account::name' will be initialized after [-Wreorder] 72 | std::string name; | ^~~~ account.hh:63:20: warning: 'xmpp_mem_t weechat::account::memory' [-Wreorder] 63 | xmpp_mem_t memory = { nullptr }; | ^~~~~~ account.cpp:274:1: warning: when initialized here [-Wreorder] 274 | weechat::account::account(config_file& config_file, const std::string name) | ^~~~~~~ account.hh:76:29: warning: 'weechat::account::connection' will be initialized after [-Wreorder] 76 | weechat::connection connection; | ^~~~~~~~~~ account.cpp:277:89: warning: base 'weechat::config_account' [-Wreorder] 277 | , config_account(config_file, config_file.configuration.section_account, name.data()) | ^ account.cpp:274:1: warning: when initialized here [-Wreorder] 274 | weechat::account::account(config_file& config_file, const std::string name) | ^~~~~~~ g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c buffer.cpp -o .buffer.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c channel.cpp -o .channel.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c command.cpp -o .command.o command.cpp: In function 'int command__trap(const void*, void*, t_gui_buffer*, int, char**, char**)': command.cpp:984:20: warning: unused variable 'user' [-Wunused-variable] 984 | weechat::user *user = NULL; | ^~~~ g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c completion.cpp -o .completion.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config.cpp -o .config.o config.cpp: In function 'bool account_read_cb(weechat::config_section&, const char*, const char*)': config.cpp:18:47: warning: unused parameter 'section' [-Wunused-parameter] 18 | bool account_read_cb(weechat::config_section& section, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c connection.cpp -o .connection.o connection.cpp: In member function 'bool weechat::connection::iq_handler(xmpp_stanza_t*)': connection.cpp:1089:33: warning: unused variable 'item_id' [-Wunused-variable] 1089 | const char *item_id = xmpp_stanza_get_id(item); | ^~~~~~~ g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c input.cpp -o .input.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c message.cpp -o .message.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c omemo.cpp -o .omemo.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c pgp.cpp -o .pgp.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c user.cpp -o .user.o g++ -DGIT_COMMIT=3c7a67 -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c util.cpp -o .util.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config/breadcrumb.cpp -o config/.breadcrumb.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config/file.cpp -o config/.file.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config/section.cpp -o config/.section.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config/account.cpp -o config/.account.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c config/option.cpp -o config/.option.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c data/omemo.cpp -o data/.omemo.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c data/capability.cpp -o data/.capability.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c xmpp/presence.cpp -o xmpp/.presence.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c xmpp/iq.cpp -o xmpp/.iq.o g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -c xmpp/node.cpp -o xmpp/.node.o g++ -shared -std=c++23 -gdwarf-4 -fuse-ld=mold -o xmpp.so -Wl,--as-needed .plugin.o .account.o .buffer.o .channel.o .command.o .completion.o .config.o .connection.o .input.o .message.o .omemo.o .pgp.o .user.o .util.o config/.breadcrumb.o config/.file.o config/.section.o config/.account.o config/.option.o data/.omemo.o data/.capability.o xmpp/.presence.o xmpp/.iq.o xmpp/.node.o deps/diff/libdiff.a sexp/sexp.a -lstrophe -lpthread -lxml2 -L/lib -lz -llzma -lm -lgpgme -lsignal-protocol-c -lgcrypt -llmdb -lfl -lfmt git ls-files | xargs ls -d | xargs tar cz | objcopy --add-section .source=/dev/stdin xmpp.so make[1]: Leaving directory '/usr/src/weechat-xmpp' make[1]: Entering directory '/usr/src/weechat-xmpp' account.cpp: In function 'void weechat::log_emit(void*, xmpp_log_level_t, const char*, const char*)': account.cpp:44:41: warning: 'xmlDoc* xmlRecoverMemory(const char*, int)' is deprecated [-Wdeprecated-declarations] 44 | xmlDocPtr doc = xmlRecoverMemory(xml, strlen(xml)); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/libxml2/libxml/globals.h:18, from /usr/include/libxml2/libxml/xmlIO.h:117, from /usr/include/libxml2/libxml/xmlwriter.h:18, from account.cpp:12: /usr/include/libxml2/libxml/parser.h:872:17: note: declared here 872 | xmlRecoverMemory (const char *buffer, | ^~~~~~~~~~~~~~~~ In file included from account.cpp:20: account.hh: In constructor 'weechat::account::account(weechat::config_file&, std::string)': account.hh:72:21: warning: 'weechat::account::name' will be initialized after [-Wreorder] 72 | std::string name; | ^~~~ account.hh:63:20: warning: 'xmpp_mem_t weechat::account::memory' [-Wreorder] 63 | xmpp_mem_t memory = { nullptr }; | ^~~~~~ account.cpp:274:1: warning: when initialized here [-Wreorder] 274 | weechat::account::account(config_file& config_file, const std::string name) | ^~~~~~~ account.hh:76:29: warning: 'weechat::account::connection' will be initialized after [-Wreorder] 76 | weechat::connection connection; | ^~~~~~~~~~ account.cpp:277:89: warning: base 'weechat::config_account' [-Wreorder] 277 | , config_account(config_file, config_file.configuration.section_account, name.data()) | ^ account.cpp:274:1: warning: when initialized here [-Wreorder] 274 | weechat::account::account(config_file& config_file, const std::string name) | ^~~~~~~ command.cpp: In function 'int command__trap(const void*, void*, t_gui_buffer*, int, char**, char**)': command.cpp:984:20: warning: unused variable 'user' [-Wunused-variable] 984 | weechat::user *user = NULL; | ^~~~ config.cpp: In function 'bool account_read_cb(weechat::config_section&, const char*, const char*)': config.cpp:18:47: warning: unused parameter 'section' [-Wunused-parameter] 18 | bool account_read_cb(weechat::config_section& section, | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ connection.cpp: In member function 'bool weechat::connection::iq_handler(xmpp_stanza_t*)': connection.cpp:1089:33: warning: unused variable 'item_id' [-Wunused-variable] 1089 | const char *item_id = xmpp_stanza_get_id(item); | ^~~~~~~ g++ --coverage -shared -std=c++23 -gdwarf-4 -fuse-ld=mold -o tests/xmpp.cov.so -Wl,--as-needed deps/diff/libdiff.a sexp/sexp.a -lstrophe -lpthread -lxml2 -L/lib -lz -llzma -lm -lgpgme -lsignal-protocol-c -lgcrypt -llmdb -lfl -lfmt .plugin.cov.o .account.cov.o .buffer.cov.o .channel.cov.o .command.cov.o .completion.cov.o .config.cov.o .connection.cov.o .input.cov.o .message.cov.o .omemo.cov.o .pgp.cov.o .user.cov.o .util.cov.o config/.breadcrumb.cov.o config/.file.cov.o config/.section.cov.o config/.account.cov.o config/.option.cov.o data/.omemo.cov.o data/.capability.cov.o xmpp/.presence.cov.o xmpp/.iq.cov.o xmpp/.node.cov.o cd tests && g++ -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++23 -gdwarf-4 -Wall -Wextra -pedantic -Wno-missing-field-initializers -Ilibstrophe -Ideps -I/usr/include/libxml2 -I/usr/include/signal -std=c++23 -gdwarf-4 -fuse-ld=mold -o run $PWD/xmpp.cov.so main.cc ../deps/diff/libdiff.a ../sexp/sexp.a -lstrophe -lpthread -lxml2 -L/lib -lz -llzma -lm -lgpgme -lsignal-protocol-c -lgcrypt -llmdb -lfl -lfmt cd tests && ./run -sm [doctest] doctest version is "2.4.9" [doctest] run with "--help" for options =============================================================================== plugin.inl:63: TEST CASE: weechat plugin api match plugin.inl:69: ERROR: CHECK( plugin_api_version == "20230220-01" ) is NOT correct! values: CHECK( 20220926-01 == 20230220-01 ) weechat (0): /print -stdout -escape TEST_OK\n; [2023-08-09 15:56:12] WeeChat 4.0.2 (compiled on Jul 20 2023 20:22:17) [2023-08-09 15:56:12] Writing configuration file sec.conf (default options) [2023-08-09 15:56:12] Reading configuration file sec.conf [2023-08-09 15:56:12] Writing configuration file weechat.conf (default options) [2023-08-09 15:56:12] Reading configuration file weechat.conf WeeChat is running in headless mode (ctrl-c to quit). [2023-08-09 15:56:12] Writing configuration file plugins.conf (default options) [2023-08-09 15:56:12] Reading configuration file plugins.conf [2023-08-09 15:56:12] Writing configuration file buflist.conf (default options) [2023-08-09 15:56:12] Reading configuration file buflist.conf [2023-08-09 15:56:12] Writing configuration file relay.conf (default options) [2023-08-09 15:56:12] Reading configuration file relay.conf TEST_OK [2023-08-09 15:56:12] Writing configuration file plugins.conf [2023-08-09 15:56:12] Writing configuration file relay.conf [2023-08-09 15:56:12] Writing configuration file buflist.conf [2023-08-09 15:56:12] Writing configuration file weechat.conf [2023-08-09 15:56:12] Writing configuration file sec.conf | ___ __ ______________ _____ | __ | / /___________ ____/__ /_______ __ /_ | __ | /| / /_ _ \ _ \ / __ __ \ __ `/ __/ | __ |/ |/ / / __/ __/ /___ _ / / / /_/ // /_ | ____/|__/ \___/\___/\____/ /_/ /_/\__,_/ \__/ | WeeChat 4.0.2 [compiled on Jul 20 2023 20:22:17] | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | Welcome to WeeChat! | | If you are discovering WeeChat, it is recommended to read at least the quickstart guide, and the user's guide if you have some time; they explain main WeeChat concepts. | All WeeChat docs are available at: https://weechat.org/doc/ | | Moreover, there is inline help with /help on all commands and options (use Tab key to complete the name). | The command /fset can help to customize WeeChat. | | You can add and connect to an IRC server with /server and /connect commands (see /help server). | | --- | | Bar "input" created | Bar "title" created | Bar "status" created | Bar "nicklist" created | Plugins loaded: buflist, relay =!= | Option "fifo.file.enabled" not found =!= | Option "fifo.file.path" not found =!= | Unknown command "exec" (type /help for help), commands with similar name: - | Plugin "xmpp" loaded =============================================================================== [doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped [doctest] assertions: 9 | 8 passed | 1 failed | [doctest] Status: FAILURE! make[1]: *** [test.mk:17: test] Error 1 make[1]: Leaving directory '/usr/src/weechat-xmpp' make: *** [makefile:131: all] Error 2 ```

Let's get back to my trial and error to build weechat-xmpp on Alpine 3.18:

It looks like that the build dependencies in README.org are slightly outdated. Additionally to the dependencies listed there, one also needs the following:

For the record and others trying the same, here's the full required package list on Alpine 3.18: apk add --virtual .weechat-xmpp-build-deps g++ bison flex-dev pkgconf binutils mold make git libstrophe-dev libxml2-dev lmdb-dev lmdbxx libsignal-protocol-c-dev libomemo-dev gpgme-dev fmt-dev doctest-dev

On another side note (and being fully aware that this might be silly to ask, but I just don't really know how these things actually work), it would be great if we could somehow specify the path to WeeChat's sources instead of relying on pkgconf (and therefore a weechat-dev package or similar). Took me some time to find a solution (I ended up creating a /usr/local/lib/pkgconfig/weechat.pc pointing to the local sources of WeeChat).

bqv commented 1 year ago

Apologies, this hasnt been updated in some time indeed, I have no idea of its current state honestly, and if you don't C/++ im not sure I'd reccomend picking it up, but very much appreciate the update on dependencies, I'll aim to fix that soon

Hund commented 1 year ago

I hope this is not too much OT, but what would it require for you to keep maintaining this project? There's really no good XMPP client for people who don't like GUIs. :(