When no state file is configured, mkerr.pl derives it from the config
file path with s/.ec/.txt/. The unescaped, unanchored pattern replaces
the first occurrence of any character followed by "ec" anywhere
in the path. Since the error headers are generated at build time,
mkerr.pl runs with -conf $(SRCDIR)/crypto/err/openssl.ec,
so an out-of-tree build whose relative source path contains a name
such as "projects" fails:
Can't open ../pro.txtts/openssl/crypto/err/openssl.ec
Anchor the pattern to the ".ec" suffix.
Fixes: 52df25cf2e "make error tables const and separate header file"
Complements: 7a3fa58d9d "Generate the error headers and tables at build time"
Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Tue Oct 27 18:11:11 2026
Merged-from: https://github.com/openssl/openssl/pull/33389