netatalk
netatalk copied to clipboard
Arch|NetBSD: Failure with undefined BIGNUMBER when using system WolfSSL
When building with system WolfSSL on Arch and NetBSD, we get errors like:
[171/254] Compiling C object etc/uams/uams_randnum.so.p/uams_randnum.c.o
In file included from ../include/atalk/logger.h:5,
from ../etc/uams/uams_randnum.c:36:
./config.h:378:9: warning: "HAVE_PTHREAD" redefined
378 | #define HAVE_PTHREAD 1
| ^~~~~~~~~~~~
In file included from ../etc/uams/uams_randnum.c:30:
/usr/include/wolfssl/options.h:132:9: note: this is the location of the previous definition
132 | #define HAVE_PTHREAD
| ^~~~~~~~~~~~
[172/254] Compiling C object etc/uams/uams_dhx_passwd.so.p/uams_dhx_passwd.c.o
FAILED: etc/uams/uams_dhx_passwd.so.p/uams_dhx_passwd.c.o
cc -Ietc/uams/uams_dhx_passwd.so.p -Ietc/uams -I../etc/uams -I. -I.. -Iinclude -I../include -Isys -I../sys -Ietc/afpd -I../etc/afpd -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -DHAVE_CONFIG_H '-D_U_=__attribute__((unused))' -Wno-pedantic -Wno-extra -Wno-all -Wno-deprecated-declarations -D_GNU_SOURCE -fPIC -MD -MQ etc/uams/uams_dhx_passwd.so.p/uams_dhx_passwd.c.o -MF etc/uams/uams_dhx_passwd.so.p/uams_dhx_passwd.c.o.d -o etc/uams/uams_dhx_passwd.so.p/uams_dhx_passwd.c.o -c ../etc/uams/uams_dhx_passwd.c
../etc/uams/uams_dhx_passwd.c: In function ‘pwd_login’:
../etc/uams/uams_dhx_passwd.c:81:5: error: unknown type name ‘BIGNUM’
81 | BIGNUM *bn, *gbn, *pbn;
| ^~~~~~
../etc/uams/uams_dhx_passwd.c:82:11: error: unknown type name ‘BIGNUM’
82 | const BIGNUM *pub_key;
| ^~~~~~
The two cases are quite different.
On NetBSD the build system actually warns that WolfSSL doesn't have all the symbols and flag SSL as built-in. However it seems like a macro gets set incorrectly and the wrong headers get included.
On Arch, the build system things WolfSSL is good and flags SSL as WolfSSL. But in reality capabilities are missing.
After https://github.com/Netatalk/netatalk/pull/1440 the NetBSD issue got resolved. Probably because we got rid of all of the local macro hacks.
We are still getting missing symbol errors on Arch.
Has the issue been reported in the Arch Linux bug tracker, over on their gitlab?
It has not, to my best knowledge. But it’s a good idea. Shall I give it a go or are you volunteering? :)
You are probably more knowledgeable on what the actual specific issue is than I am. I'm just a C++ and Rust programmer with rusty (pun not intended) C knowledge, who don't really know these libraries at all.
https://archlinux.org/packages/extra/x86_64/wolfssl/ has the relevant links to the gitlab. If you can't get an account on their bug tracker (process a bit manual due to spam issues, but I think you can log in with github to get around that) I can absolutely report this, but you need to provide some details so I understand the situation fully.
The Arch anti spam filter defeated me a few months ago but I can try again with your advice.
Edit: Sent an account creation request to the given email address.
Did you manage to get through? Or should I report it using my existing account?
Reported! https://gitlab.archlinux.org/archlinux/packaging/packages/wolfssl/-/issues/2
At a related note, there's this bug too: https://gitlab.archlinux.org/archlinux/packaging/packages/wolfssl/-/issues/1
So it seems that the Arch wolfSSL not being full-featured is a known issue.