-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cc1: error: CPU you selected does not support x86-64 instruction set #4541
Comments
It is possible that 0.3.18 does not identify your cpu correctly, is there a reason why you want to use this release from two years ago ? Depending on the model of your AMD cpu, you could try building with "make TARGET=ZEN" or "make TARGET=SKYLAKEX" to avoid the autodetection. (The newer gcc may have more checks, or may include newer header files for SIMD intrinsics) |
@martin-frbg Thank you for your reply. Does this seem to have something to do with the CPU architecture or the GCC version? |
Strange - could you let me know what your cpu is, please ? Are you running this in a virtual machine, where maybe the cpu information is not fully passed on and "looks like" 32bit to the operating system ? Or maybe you installed a 32bit version of gcc11 by mistake ? |
@martin-frbg Thank you for your reply. My gcc related information is as follows: My OS related information is as follows: I ran the command "getconf LONG_BIT" and it returned "64" |
Very strange. OpenBLAS does not have as detailed cpu identification lists for Hygon as for Intel or AMD models, but if the 7390 belongs to the original Dhyana family (CPUID family code 18h) it should be autodetected as ZEN already, and I do not see anything in the build system code that would make it treat the cpu as 32bit (unless the C compiler claimed it was 32bit by defining |
Yes, I manually went to the code to generate the "getarch" binary, and when I did “getarch 1 > makefile.conf”, it should be autodetected as ZEN already. If I do a "make", it doesn't generate "Makefile.conf" and "config.h" and "getarch ", It returned the following error: I don't think I have any extra CFLAGS set up in my environment. |
Hmm. If you can compile the |
Yes, I run ". /c_check conf header gcc" and produce two files "conf" and "header" conf: header: I think it's 64-bit support. |
Strange, that looks perfectly normal. I do not think Makefile.system could add something bad to the GETARCH_CFLAGS used for building |
I run the command " running make CC="gcc -v" getarch >log 2>&1", the “log” is: Using built-in specs. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 |
I do not understand this - there is nothing in the Makefiles that would set |
I also find it strange that I didn't set any parameters for "-march" when I installed gcc11.But I don't know why the system recognizes it as i386.That surprises me.I also feel that I can't install openblas because of "-march=i386". |
@martin-frbg I made the following changes in "Makefile.prebuild" and openblas successful compiled. Add "-march=znver3" to the two lines that compile "getarch" and "getarch_2nd" to make it easy to recognize that I have a 64-bit x86 system Finally, thank you again for your communication, I wish you a happy life! |
Good to know you got it working - as far as I can tell from the git log of the gcc source tree, Hygon cpu support may not have been added to the official GNU gcc sources. This would probably make gcc treat it as some early i486 processor when no |
Thanks, I just got this too:
|
I encountered the same problem on Hygon C86 5380 devices. I found that this is because the default value ’x86-64‘ of '-march' is changed to 'native' in the Makefile.system. After commenting befor commenting
after commenting
here is compile getarch log use and this is compile getarch log after commenting: I don't understand why "-march=native" is not useful for the Hygon CPU, and this is a crude solution, but this is useful to me, I hope this information can also help those in need. |
Hygon detection by gcc appears to be completely broken in gcc12, in the past it used to report an ancient Xeon (so 64bit at least). Others have noticed this too - geoschem/GCHP#391 |
I have tested Hygon C86 5380 that gcc 13.1.0 can compile normally. here is complile getarch log: |
I extracted the source code of openblas v0.3.18
Then I went into the source code directory.
The following error is reported when the "make" command is executed:
cc1: error: CPU you selected does not support x86-64 instruction set
My environment information is as follows:
gcc 11.3.0
arch x86_64
cpu AMD
Also, the strange thing is that I use gcc7 will compile successfully, why is that?
Looking forward to the reply, thanks!
The text was updated successfully, but these errors were encountered: