beta.blog

MAC OS X

/usr/local/include/SDL2/SDL_cpuinfo.h:86:10: fatal error: immintrin.h: No such file or directory

by on May.05, 2020, under MAC OS X, Programming

Recently received the error message:

/usr/local/include/SDL2/SDL_cpuinfo.h:86:10: fatal error: immintrin.h: No such file or directory

   86 | #include <immintrin.h>
      |          ^~~~~~~~~~~~~

This happened when compiling some SDL2 code on macOS Catalina. Remember, starting with Catalina, Apple has removed x86 support and we’re now on a pure x64 operating system.

The file immintrin.h is part of the GCC i386 configuration. Source code: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/immintrin.h

Since we’re on a pure x64 system the solution for this compile error is quite simple:

Edit the file /usr/local/include/SDL2/SDL_cpuinfo.h and comment out or remove this #include. It’s not needed anymore.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!