On Mon, 12 Apr 2021, 21:29 Jim Wilson, <jimw@xxxxxxxxxx> wrote: > On Mon, Apr 12, 2021 at 5:30 AM Jonathan Wakely via Gcc-help < > gcc-help@xxxxxxxxxxx> wrote: > >> On Mon, 12 Apr 2021 at 13:10, John Hendry wrote: >> > I'm trying to install gcc-10.3.0 on a 64-bit PC running >> Crux Linux 3.5. Make gives the error "bit_AVX512VPTINTERSECT not declared" >> in cpuinfo.c, line 392 or so, and then AVX512BF16 is not declared 4 lines >> later. >> >> The bit_AVX512VP2INTERSECT constant is defined in the cpuid.h header >> in the same directory. >> > > But note that there is more than one cpuid.h file on the system, as there > is also one provided by the OS and/or system compiler, and possibly also by > cross compilers. I've seen this problem happen for people that have > environment variables set that they forgot about, which are causing the > wrong cpuid.h file to be used. Or maybe you are using a compiler with a > modified specs file, or maybe something else is going wrong. The system > compiler one is probably older than the gcc version you are trying to > compile, and hence is missing all of the new entries in the file. This > macro is new in gcc-10, and thus would not be present in a gcc-9 or earlier > cpuid.h file. So you need to look at the compiler command for the cpuid.c > file and figure out why it is using the wrong cpuid.h file. You can use > --save-temps to generate a .i file that will show which cpuid.h file is > being used. You can add -v to see what header file paths are being used > during the compilation. You can use --print-search-dirs to see what the > default search paths are. printenv will show you what environment > variables are set. > > Thanks, Jim. Shouldn't #include "cpuid.h" mean it prefers the one in the same directory though? > >