[fix](compile) guard MD5 AVX2-only symbols under __AVX2__#63723
Merged
Conversation
MD5_A0..D0 constants, md5_num_blocks(), and md5_pad_final_blocks() are only used by the AVX2 multi-buffer path. On non-AVX2 builds (e.g. macOS ARM64) they trigger -Werror=unused-const-variable and -Werror=unused-function. Move them inside the existing #ifdef __AVX2__ block. MD5_DUMMY_INPUT and md5_to_hex stay outside since the non-AVX2 fallback uses them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
hello-stephen
approved these changes
May 27, 2026
Contributor
|
skip buildall |
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
skip buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
The constants
MD5_A0/MD5_B0/MD5_C0/MD5_D0and the helpersmd5_num_blocks()andmd5_pad_final_blocks()inbe/src/util/md5.cppare only referenced by the AVX2 multi-buffer code path (md5_multi_buffer_compute/md5_binary_batch_avx2). On non-AVX2 builds (e.g. macOS ARM64) the AVX2 block is#ifdef'd out, leaving these symbols orphaned and triggering compile errors under the project's strict warnings:This PR moves those AVX2-only constants and helpers inside the existing
#ifdef __AVX2__block where they belong.MD5_DUMMY_INPUTandmd5_to_hexstay outside the guard because the non-AVX2 fallback inmd5_hex_batchstill uses them. No behavior change on x86_64; restores build on ARM/non-AVX2 targets.Release note
None
Check List (For Author)
Test
Manual test: verified
./build.sh --be -j 20now succeeds on macOS ARM64.Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)