You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build process generating AVX512 instructions erroneously #46789
Trying to build node 18.14.2 on a Centos 7 system with older Xeon CPUs. Ran configure. During make, it's obvious the compiler has generated AVX512 instructions, which aren't valid for older Xeons. What flag is needed to prevent this?
No follow-up so I'm closing this but can reopen when OP provides the requested information.
FWIW, I'm pretty sure this must be some local setup issue because node's build flags don't go beyond AVX2. And that's localized to deps/base64, everything else is SSE 4.2 or lower, i.e., 2008 era hardware.
My apologies for the delay in responding. The binutils version is 2.27-44. The OS is RHEL 7.9. The compiler is gcc/8.4.0.
We've built many applications for this cluster, and this is the first time we've encountered this issue.
We'll try building node v18.13.0
The issue comes when using a compiler that is capable of compiling advanced instructions (e.g., AVX-512), with all of the corresponding headers and so forth, with an assembler that does not have this capacity. The code can check what the compiler is capable of, but it has no access to the assembler. It is assumed that whatever the compiler produces, the assembler can handle. That's what should hold on all good Linux distribution: the version of GCC should match the gas version. It is the mismatch that is a problem. CentOS is based of RedHat 7, and RedHat 7 is designed for GCC 4.8.
Activity
mscdex commentedon Feb 23, 2023
Does node v18.13.0 build and work fine? What about node v18.14.0?
Also, which compiler and what compiler version are you using? Which version of binutils?
bnoordhuis commentedon Feb 26, 2023
No follow-up so I'm closing this but can reopen when OP provides the requested information.
FWIW, I'm pretty sure this must be some local setup issue because node's build flags don't go beyond AVX2. And that's localized to deps/base64, everything else is SSE 4.2 or lower, i.e., 2008 era hardware.
caldodge commentedon Mar 3, 2023
My apologies for the delay in responding. The binutils version is 2.27-44. The OS is RHEL 7.9. The compiler is gcc/8.4.0.
We've built many applications for this cluster, and this is the first time we've encountered this issue.
We'll try building node v18.13.0
mscdex commentedon Mar 3, 2023
I'm betting it's the addition of simdutf, which requires a newer build environment.
caldodge commentedon Mar 4, 2023
mscdex commentedon Mar 4, 2023
As noted in the linked commit, at least newer assembler/binutils.
lemire commentedon Jun 3, 2023
The issue comes when using a compiler that is capable of compiling advanced instructions (e.g., AVX-512), with all of the corresponding headers and so forth, with an assembler that does not have this capacity. The code can check what the compiler is capable of, but it has no access to the assembler. It is assumed that whatever the compiler produces, the assembler can handle. That's what should hold on all good Linux distribution: the version of GCC should match the gas version. It is the mismatch that is a problem. CentOS is based of RedHat 7, and RedHat 7 is designed for GCC 4.8.