Skip to content
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

Build process generating AVX512 instructions erroneously #46789

Closed
caldodge opened this issue Feb 22, 2023 · 7 comments
Closed

Build process generating AVX512 instructions erroneously #46789

caldodge opened this issue Feb 22, 2023 · 7 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@caldodge
Copy link

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?

@VoltrexKeyva VoltrexKeyva added the build Issues and PRs related to build files or the CI. label Feb 23, 2023
@mscdex
Copy link
Contributor

mscdex commented 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
Copy link
Member

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.

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2023
@caldodge
Copy link
Author

caldodge commented 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
Copy link
Contributor

mscdex commented Mar 3, 2023

I'm betting it's the addition of simdutf, which requires a newer build environment.

@caldodge
Copy link
Author

caldodge commented Mar 4, 2023 via email

@mscdex
Copy link
Contributor

mscdex commented Mar 4, 2023

As noted in the linked commit, at least newer assembler/binutils.

@lemire
Copy link
Member

lemire commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

5 participants