configure tests -mavx512f (and other variants) with $CXX $CXXFLAGS -mavx512f (simplified) which detects compiler AVX512F support, but then builds with $CXX -mavx512f $CXXFLAGS which fails because my CXXFLAGS includes -mno-avx512f. Probably the configure check should be adjusted so it detects no AVX512F support when the user specifies -mno-avx512f in CXXFLAGS. Or at the very least (if there's reason to enforce runtime detection even when the user has said "no"), building should use the same order so AVX512F is force-enabled for the files that use it. Upstream bug: https://github.com/tesseract-ocr/tesseract/issues/3891
Upstream is apparently not planning to fix this