RE: missing header files: wmmintrin.h, emmintrin.h

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 31 Oct 2024 20:04:55 UTC
Maku Bex <zagazaw2004_at_gmail.com> wrote on
Date: Thu, 31 Oct 2024 02:45:29 UTC :

> I'm attempting to build kernel [make kernel KERNCONF=GENERIC-NODEBUG] on
> revision d0f9b0bd19bf5dc4031164fd26c5bbc4bab1cc74 and I keep getting the
> following hard stop:
> . . .
> /usr/src/sys/crypto/aesni/aesni_ghash.c:73:10: error: 'wmmintrin.h' file not
> found with <angled> include; use "quotes" instead
> 
> 73 | #include <wmmintrin.h>
> 
> | ^~~~~~~~~~~~~
> 
> | "wmmintrin.h"
> 
> In file included from /usr/src/sys/crypto/aesni/aesni_ghash.c:73:
> 
> /usr/src/sys/crypto/aesni/wmmintrin.h:17:10: fatal error: 'emmintrin.h' file
> not found
> 
> 17 | #include <emmintrin.h>
> 
> | ^~~~~~~~~~~~~
> 
> 2 errors generated.
> 
> *** Error code 1
> . . .
> The header files allegedly missing are located here:
> . . .
> /usr/src/contrib/llvm-project/clang/lib/Headers/wmmintrin.h
> 
> /usr/src/sys/crypto/aesni/wmmintrin.h
> 
> /usr/local/llvm19/lib/clang/19/include/wmmintrin.h
> . . .
> /usr/src/contrib/llvm-project/clang/lib/Headers/emmintrin.h
> 
> /usr/local/llvm19/lib/clang/19/include/emmintrin.h

In a typical buildworld context that uses the system toolchain
for its build activity, more relevant is the likes of what is
in /usr/lib/clang/*/ :

# find -s / -name "*mmintrin.h" -print | less
/usr/lib/clang/19/include/ammintrin.h
/usr/lib/clang/19/include/emmintrin.h
/usr/lib/clang/19/include/immintrin.h
/usr/lib/clang/19/include/mmintrin.h
/usr/lib/clang/19/include/nmmintrin.h
/usr/lib/clang/19/include/pmmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/emmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/immintrin.h
/usr/lib/clang/19/include/ppc_wrappers/mmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/nmmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/pmmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/smmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/tmmintrin.h
/usr/lib/clang/19/include/ppc_wrappers/xmmintrin.h
/usr/lib/clang/19/include/smmintrin.h
/usr/lib/clang/19/include/tmmintrin.h
/usr/lib/clang/19/include/wmmintrin.h
/usr/lib/clang/19/include/xmmintrin.h
. . .

Those are in a place where <. . .> notation would look
for them if the system toolchain is in use, at last as
I understand things.

But . . .

What version of clang/clang++ is the building machine using?
What version of clang/clang++ is the new system to be using?

It may be that LLVM 18 needs to build the bootstrap materials
for LLVM 19, which in turn do the normal build from that
partial context. You are not explicit about the upgrade
context that you are in or what toolchain that you are using.

===
Mark Millard
marklmi at yahoo.com