On 15.0 (and possibly earlier versions) the cryptocheck tool fails to build from source as follows. It appears to reference struct members that no longer exist within the tree, specifically most of the members of "struct cryptostats". root@freebsd-current:/usr/src/tools/tools/crypto # make (cd /usr/src/tools/tools/crypto && DEPENDFILE=.depend.cryptocheck NO_SUBDIR=1 make -f /usr/src/tools/tools/crypto/Makefile _RECURSING_PROGS=t PROG=cryptocheck ) (cd /usr/src/tools/tools/crypto && DEPENDFILE=.depend.cryptotest NO_SUBDIR=1 make -f /usr/src/tools/tools/crypto/Makefile _RECURSING_PROGS=t PROG=cryptotest ) rm -f .depend.cryptotest echo cryptotest.full: /usr/lib/libc.a >> .depend.cryptotest /usr/local/bin/ccache cc -fpie -DPIC -O2 -pipe -fno-common -fPIE -g -gz=zlib -MD -MF.depend.cryptotest.cryptotest.pieo -MTcryptotest.pieo -std=gnu17 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-mismatch -Qunused-arguments -c /usr/src/tools/tools/crypto/cryptotest.c -o cryptotest.pieo /usr/src/tools/tools/crypto/cryptotest.c:111:5: error: no previous extern declaration for non-static variable 'verbose' [-Werror,-Wmissing-variable-declarations] 111 | int verbose = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:111:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 111 | int verbose = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:112:5: error: no previous extern declaration for non-static variable 'opflags' [-Werror,-Wmissing-variable-declarations] 112 | int opflags = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:112:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 112 | int opflags = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:113:5: error: no previous extern declaration for non-static variable 'verify' [-Werror,-Wmissing-variable-declarations] 113 | int verify = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:113:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 113 | int verify = 0; | ^ /usr/src/tools/tools/crypto/cryptotest.c:114:5: error: no previous extern declaration for non-static variable 'crid' [-Werror,-Wmissing-variable-declarations] 114 | int crid = CRYPTO_FLAG_HARDWARE; | ^ /usr/src/tools/tools/crypto/cryptotest.c:114:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 114 | int crid = CRYPTO_FLAG_HARDWARE; | ^ /usr/src/tools/tools/crypto/cryptotest.c:123:3: error: no previous extern declaration for non-static variable 'algorithms' [-Werror,-Wmissing-variable-declarations] 123 | } algorithms[] = { | ^ /usr/src/tools/tools/crypto/cryptotest.c:116:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit 116 | struct alg { | ^ /usr/src/tools/tools/crypto/cryptotest.c:147:1: error: no previous prototype for function 'usage' [-Werror,-Wmissing-prototypes] 147 | usage(const char* cmd) | ^ /usr/src/tools/tools/crypto/cryptotest.c:146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 146 | void | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:172:1: error: no previous prototype for function 'getalgbycode' [-Werror,-Wmissing-prototypes] 172 | getalgbycode(int cipher) | ^ /usr/src/tools/tools/crypto/cryptotest.c:171:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 171 | struct alg* | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:176:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] 176 | for (i = 0; i < nitems(algorithms); i++) | ~ ^ ~~~~~~~~~~~~~~~~~~ /usr/src/tools/tools/crypto/cryptotest.c:183:1: error: no previous prototype for function 'getalgbyname' [-Werror,-Wmissing-prototypes] 183 | getalgbyname(const char* name) | ^ /usr/src/tools/tools/crypto/cryptotest.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 182 | struct alg* | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:187:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] 187 | for (i = 0; i < nitems(algorithms); i++) | ~ ^ ~~~~~~~~~~~~~~~~~~ /usr/src/tools/tools/crypto/cryptotest.c:194:1: error: no previous prototype for function 'devcrypto' [-Werror,-Wmissing-prototypes] 194 | devcrypto(void) | ^ /usr/src/tools/tools/crypto/cryptotest.c:193:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 193 | int | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:209:1: error: no previous prototype for function 'crlookup' [-Werror,-Wmissing-prototypes] 209 | crlookup(const char *devname) | ^ /usr/src/tools/tools/crypto/cryptotest.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 208 | int | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:224:12: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] 224 | crfind(int crid) | ^ /usr/src/tools/tools/crypto/cryptotest.c:114:5: note: previous declaration is here 114 | int crid = CRYPTO_FLAG_HARDWARE; | ^ /usr/src/tools/tools/crypto/cryptotest.c:224:1: error: no previous prototype for function 'crfind' [-Werror,-Wmissing-prototypes] 224 | crfind(int crid) | ^ /usr/src/tools/tools/crypto/cryptotest.c:223:7: note: declare 'static' if the function is not intended to be used outside of this translation unit 223 | const char * | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:236:1: error: no previous prototype for function 'rdigit' [-Werror,-Wmissing-prototypes] 236 | rdigit(void) | ^ /usr/src/tools/tools/crypto/cryptotest.c:235:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 235 | char | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:249:30: error: unused variable 'dt' [-Werror,-Wunused-variable] 249 | struct timeval start, stop, dt; | ^~ /usr/src/tools/tools/crypto/cryptotest.c:246:1: error: no previous prototype for function 'runtest' [-Werror,-Wmissing-prototypes] 246 | runtest(struct alg *ealg, struct alg *alg, int count, int size, u_long cmd, struct timeval *tv) | ^ /usr/src/tools/tools/crypto/cryptotest.c:245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 245 | void | ^ | static /usr/src/tools/tools/crypto/cryptotest.c:268:17: error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare] 268 | for (i = 0; i < sop.keylen; i++) | ~ ^ ~~~~~~~~~~ /usr/src/tools/tools/crypto/cryptotest.c:316:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] 316 | for (i = 0; i < nitems(iv); i++) | ~ ^ ~~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. *** Error code 1 Stop. make[1]: stopped making "all" in /usr/src/tools/tools/crypto *** Error code 1 Stop. make: stopped making "all" in /usr/src/tools/tools/crypto
On further investigation, specifically building only the cryptocheck tool itself works: make install cryptocheck The other utilities do not compile, and should probably be removed from the tree given they use functionality that was removed from the kernel some time ago.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4c6cf6107b824f7ba4a3fe66db8e0a36c8dd8b04 commit 4c6cf6107b824f7ba4a3fe66db8e0a36c8dd8b04 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2025-09-12 15:29:40 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2025-09-12 15:29:40 +0000 tools: Drop cryptotest This has been supplanted by cryptocheck and has bitrotted to the point where it no longer builds. PR: 289325 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D52399 tools/tools/crypto/Makefile | 5 +- tools/tools/crypto/cryptorun.sh (gone) | 31 -- tools/tools/crypto/cryptotest.c (gone) | 658 --------------------------------- 3 files changed, 1 insertion(+), 693 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=898d513ab1c53b07a3b19738df332b7da51b95d1 commit 898d513ab1c53b07a3b19738df332b7da51b95d1 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2025-09-12 15:29:40 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2025-09-23 12:57:30 +0000 tools: Drop cryptotest This has been supplanted by cryptocheck and has bitrotted to the point where it no longer builds. PR: 289325 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D52399 (cherry picked from commit 4c6cf6107b824f7ba4a3fe66db8e0a36c8dd8b04) tools/tools/crypto/Makefile | 5 +- tools/tools/crypto/cryptorun.sh (gone) | 31 -- tools/tools/crypto/cryptotest.c (gone) | 658 --------------------------------- 3 files changed, 1 insertion(+), 693 deletions(-)