Strange error on Ubuntu 24 update

Hi I updated to the latest ununtu 24 LTS. However when I go to compile my code I get a very strange error.
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/include/immintrin.h:104,
from /usr/include/SDL2/SDL_cpuinfo.h:111,
from /usr/include/SDL2/SDL.h:38,
from …/…/VideoSound_Drivers/SDL2/Screen_Driver.h:15,
/usr/lib/gcc/x86_64-linux-gnu/13/include/avx512fp16vlintrin.h:28: error: unterminated #ifndef
28 | #ifndef __AVX512FP16VLINTRIN_H_INCLUDED
|
/usr/lib/gcc/x86_64-linux-gnu/13/include/avx512fp16vlintrin.h:1113:39: error: expected constructor, destructor, or type conversion before ‘(’ token
1113 | __builtin_ia32_vcvtph2udq128_mask (__B,
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/include/avx512fp16vlintrin.h:1117:1: error: expected declaration before ‘}’ token
1117 | }

and quite a few more errors after this. Can anyone offer any light on this and is there a fix?
Thanks

the error is inside avx512fp16vlintrin.h, so the fault is not on SDL side
could you send the entire contents of this file /usr/lib/gcc/x86_64-linux-gnu/13/include/avx512fp16vlintrin.h? like, in a pastebin or something?

I’d say your system headers are broken. you should do the following: 1) check which package owns this system header, 2) verify the integrity of such package, 3) reinstall such package

I don’t use Ubuntu, so I don’t know the specific steps

For any one in future getting this I fixed via

sudo apt update && sudo apt upgrade -y sudo apt install --reinstall build-essential gcc g++ libsdl2-dev

1 Like