Skip to content

Add explicit error for missing CONFIG_ASN1

James Bottomley linux-kbuild lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Makefile.build: Add an explicit error for missing ASN.1 compilerscripts/Makefile.build+5 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Add explicit error for missing CONFIG_ASN1

I recently ran into this as an error from 0day. On x86 it's pretty much impossible to build a configuration where CONFIG_ASN1 isn't set, so you rarely notice a problem using the ASN.1 compiler because something else has selected it. However, this compiler is never built if CONFIG_ASN1 isn't set and the error you get from kbuild is particularly unhelpful:

make[4]: *** No rule to make target 'security/keys/trusted-keys/tpm2key.asn1.o', needed by 'security/keys/trusted-keys/built-in.a'. make[4]: *** [scripts/Makefile.build:283: security/keys/trusted-keys/trusted_tpm2.o] Error 1
make[4]: Target '__build' not remade because of errors.

This patch changes the above error to the much easier to diagnose:

scripts/Makefile.build:387: *** CONFIG_ASN1 must be defined for the asn1_compiler. Stop. make[3]: *** [scripts/Makefile.build:505: security/keys/trusted-keys] Error 2

James

---

James Bottomley (1):
Makefile.build: Add an explicit error for missing ASN.1 compiler

 scripts/Makefile.build | 5 +++++
 1 file changed, 5 insertions(+)
Signature · 1 line
2.26.2