-
Notifications
You must be signed in to change notification settings - Fork 28
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
Pass -mno-avx512f flag to disable AVX512 opcodes in debs #288
base: ros2
Are you sure you want to change the base?
Conversation
It seems that when we build packages on Xeon systems which support the AVX512 extension, the corresponding opcode is used in the resulting binaries. This leads to SIGILL on platforms which don't support the extension, so we should explicitly disable it to maintain wide compatibility.
If this is going to affect arm builds, we might have a problem: arm-unknown-linux-gnueabihf-g++: error: unrecognized command-line option '-mno-avx512f' |
Unlike ros-infrastructure/ros_buildfarm#1012, this approach is arch-specific. These build files are amd64-only (the arch is specified near the end of the file). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to me. GCC/Clang on Focal/Jammy seems to support the option just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, as long as @clalancette approves. From my understanding from the previous discussion this is the best approach for an easy revert if necessary no?
I will point out that I thought our decision was to do nothing here. But given that this is easy to revert if it causes problems, we can go ahead with it. |
You're right - I got excited trying to find the lowest-cost solution. Since I'll be away for a while, I'll leave this PR open but convert it to a draft. If you guys feel the need to move forward with it, it should be ready to merge and deploy. Thanks everyone for the reviews. |
It seems that when we build packages on Xeon systems which support the AVX512 extension, the corresponding opcode is used in the resulting binaries. This leads to SIGILL on platforms which don't support the extension, so we should explicitly disable it to maintain wide compatibility.
I verified that the flag was passed through to gcc by invoking the buildfarm locally using
generate_release_script
.