Skip Menu |

Date: Sat, 23 May 2020 16:56:48 -0400
Subject: Building with --enable-static fails when Yasm is available
From: "Nikhil Benesch" <>
Download (untitled) / with headers
text/plain 1.4KiB
Building krb5 statically is broken if autoconf is able to find Yasm on the
build system.

$ ../configure --enable-static --disable-shared
checking for yasm... yasm
$ make
make[4]: Entering directory
as -o iaesx64.o ../../../../../lib/crypto/builtin/aes/iaesx64.s
../../../../../lib/crypto/builtin/aes/iaesx64.s: Assembler messages:
../../../../../lib/crypto/builtin/aes/iaesx64.s:1: Error: junk at
end of line, first unrecognized character is `['
../../../../../lib/crypto/builtin/aes/iaesx64.s:2: Error: junk at
end of line, first unrecognized character is `['

Similar errors continue for many lines.

The error appears to be a missing rule for building iaesx64.o statically using
Yasm. Make falls back to its default rule that uses the system assembler, which
of course is not capable of processing this file.

The following patch fixes the issue for me.

--- a/src/lib/crypto/builtin/aes/
+++ b/src/lib/crypto/builtin/aes/
@@ -34,10 +34,10 @@ GEN_OBJS=\

all-unix: all-libobjs # aes-gen

-iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
+iaesx64@STOBJEXT@ iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
$(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx64.s

-iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
+iaesx86@STOBJEXT@ iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
$(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx86.s

includes: depend
Subject: git commit

Add static object build rules for AESNI sources
Author: Nikhil Benesch <>
Committer: Greg Hudson <>
Commit: 00ec898a60ec6d1fb897d49d5db883471bd07cc8
Branch: master
src/lib/crypto/builtin/aes/ | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)