Open dreirund opened 3 years ago
@dreirund did you ever resolve this issue?
I found that this error is not present with gcc v9.4, but is introduced in gcc v10 and v11. TAILQ_HEAD() in the peer_lists.h header file creates a peers and blacklist variable in peers.c.o, ampe.c.o, and sae.c.o, so the linker complains.
@dreirund did you ever resolve this issue?
No, and I also know almost nothing about linkin, gcc, C/C++-code and related stuff, so I can only report but not bugfix.
I found that this error is not present with gcc v9.4, but is introduced in gcc v10 and v11
With gcc 9.5.0 I get the following error:
[...]
[ 5%] Building C object CMakeFiles/sae.dir/sae.c.o
/usr/bin/gcc-9 -I/tmp/makepkg/build/authsae-git/src/authsae -g0 -march=x86-64 -mtune=native -O3 -flto -ffat-lto-objects -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fPIC -Wall -g -MD -MT CMakeFiles/sae.dir/sae.c.o -MF CMakeFiles/sae.dir/sae.c.o.d -o CMakeFiles/sae.dir/sae.c.o -c /tmp/makepkg/build/authsae-git/src/authsae/sae.c
/tmp/makepkg/build/authsae-git/src/authsae/sae.c:81:18: error: static declaration of ‘HMAC_CTX_new’ follows non-static declaration
81 | static HMAC_CTX *HMAC_CTX_new(void) {
| ^~~~~~~~~~~~
In file included from /tmp/makepkg/build/authsae-git/src/authsae/sae.c:42:
/usr/include/openssl/hmac.h:33:33: note: previous declaration of ‘HMAC_CTX_new’ was here
33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
| ^~~~~~~~~~~~
/tmp/makepkg/build/authsae-git/src/authsae/sae.c: In function ‘HMAC_CTX_new’:
/tmp/makepkg/build/authsae-git/src/authsae/sae.c:82:36: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
82 | return (HMAC_CTX *)calloc(sizeof(HMAC_CTX), 1);
| ^~~~~~~~
/tmp/makepkg/build/authsae-git/src/authsae/sae.c: At top level:
/tmp/makepkg/build/authsae-git/src/authsae/sae.c:85:13: error: static declaration of ‘HMAC_CTX_free’ follows non-static declaration
85 | static void HMAC_CTX_free(HMAC_CTX *ctx) {
| ^~~~~~~~~~~~~
In file included from /tmp/makepkg/build/authsae-git/src/authsae/sae.c:42:
/usr/include/openssl/hmac.h:35:28: note: previous declaration of ‘HMAC_CTX_free’ was here
35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
| ^~~~~~~~~~~~~
/tmp/makepkg/build/authsae-git/src/authsae/sae.c: In function ‘HMAC_CTX_free’:
/tmp/makepkg/build/authsae-git/src/authsae/sae.c:87:5: warning: implicit declaration of function ‘HMAC_CTX_cleanup’; did you mean ‘HMAC_CTX_free’? [-Wimplicit-function-declaration]
87 | HMAC_CTX_cleanup(ctx);
| ^~~~~~~~~~~~~~~~
| HMAC_CTX_free
/tmp/makepkg/build/authsae-git/src/authsae/sae.c: In function ‘prf’:
/tmp/makepkg/build/authsae-git/src/authsae/sae.c:171:5: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
171 | HMAC_Init_ex(ctx, key, keylen, EVP_sha256(), NULL);
| ^~~~~~~~~~~~
[...]
make[2]: *** [CMakeFiles/sae.dir/build.make:177: CMakeFiles/sae.dir/sae.c.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/build/authsae-git/src/authsae'
make[1]: *** [CMakeFiles/Makefile2:106: CMakeFiles/sae.dir/all] Error 2
make[1]: Leaving directory '/tmp/makepkg/build/authsae-git/src/authsae'
make: *** [Makefile:139: all] Error 2
And lot more warnings.
I get the samee error with 12.2.1 now. So some newer libraries (OpenSSL 3.x) might have broken other things, too?
Full make -j1
output: make.log
(second run).
OK, with openssl-1.1 and gcc9 it builds (with warnings) :-). ↗ AUR package is updated. But the issue I leave open because it needs fixes in the code.
@dreirund you can try my fork if you'd like here. I'd like to hear feedback if you have any issues pop up.
@dreirund you can try my fork if you'd like here. I'd like to hear feedback if you have any issues pop up.
It compiles and links for me with OpenSSL 3.0.8 and gcc 12.2.1. Thanks!
However, I cannot find anymore the official version number. In https://github.com/cozybit/authsae/, it could be retrieved via git describe --tags
. In https://github.com/elockman/authsae, the above command does not retrieve anything, and I also could not find it within the source files (doing simple grep
searches vor 1.3
and version
and VERSION
). Would be helpful to have the official version number carried on.
Also, writing in the README.md
what your changes are about with respect to the original can be helpful for people who stumble upon different authsae-repositories.
Regards!
There are errors while linking, initially reported in the Arch Linux AUR package page:
Build is carried out with
The removal of
-Werror
is needed, otherwise it would already bail out earlier with