Repository navigation
[VL] Backport Flex lexer compatibility for macOS - #13665
felipepessoto wants to merge 3 commits into
Conversation
Backport the lexer-only changes from facebookincubator/velox#20420 at 842e138e5cc09e23fa62ffb68a9ab0c076b194f9 without changing the Velox pin. Apply the checked-in patch during source preparation, including when dependency setup is skipped, and skip it only when already applied. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Relative --velox_home paths cause the new git -C commands to target a nonexistent nested checkout, terminating source preparation under set -e.
1 open issue
What changed in this PR
Backports Velox lexer compatibility changes to address the macOS native link failure with newer Flex headers, without changing Gluten’s pinned Velox dependency.
Changes:
- Detects
yyreadin the installed Flex header and conditionally defines the missing virtual method. - Applies the checked-in patch during source preparation, including when setup is disabled, and skips it when already applied.
- Limits the backport to lexer changes; no workflow or dependency upgrades are included.
| File | Description |
|---|---|
ep/build-velox/src/get-velox.sh |
Applies the compatibility patch during source preparation. |
ep/build-velox/src/flex-lexer-yyread.patch |
Adds header detection and a conditional yyread shim definition. |
Review effort: Balanced
Source preparation already changes into the Velox checkout. Apply the lexer patch there rather than resolving a relative VELOX_HOME a second time from inside the checkout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Validation covers only an isolated Linux harness, and the changed paths do not trigger the macOS workflow, leaving the affected macOS ARM64 libvelox.dylib build/link unverified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Add a comment-only change to build/mvn so the existing weekly workflow path filter selects this PR. Maven behavior is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
#13688 confirm we don’t need this PR. The Velox update will fix the issue https://github.com/apache/gluten/actions/runs/44556810728/job/135674963347?pr=13688
|


What changes are proposed in this pull request?
Fix the macOS native link failure
undefined yyFlexLexer::yyread(char*, unsigned long)reported by the weekly ARM64 job. Flex 2.6.5 added this virtual method toFlexLexer.h; newer Homebrew Flex releases expose the missing definition in Velox's shim.Check in the two lexer changes only from facebookincubator/velox#20420, pinned to upstream head
842e138e5cc09e23fa62ffb68a9ab0c076b194f9:VELOX_FLEX_LEXER_HAS_YYREADthroughvelox_compile_definitions, which also handles mono-library builds.YyFlexLexerShim.cpponly when the header declares it, preserving Flex 2.6.4 compatibility.--run_setup_script=OFF. A reverse applicability check skips an already-applied patch; partial application or incompatible source changes fail explicitly.The Velox pin remains
IBM/veloxdft-2026_11_10/67fa1bbee62e9f8752b3c34cc92f179022cd2ac6. There is no moving PR download, dependency upgrade, Flex downgrade, or workflow change. The upstreamupdate_brewworkflow hunk is intentionally excluded.How was this patch tested?
--no-undefined), and library-load matrix using the real release headers and actual pinned shim, base CMake file, andvelox_compile_definitionshelper. The harness isolates the shim target and substitutes its unrelated exception dependency; it is not a full Velox build.Both mono-library and modular configurations produced these results (16 baseline/patched cases):
yyFlexLexer::yyreadat linkyyFlexLexer::yyreadat linkyyFlexLexer::yyreadat linkAlso passed
bash -n,git diff --check, the repository C++ formatter on a clean source snapshot, and a direct clang-format-15 check of the patched shim using Gluten's style. Ran the repository license-header command; it excludesep/build-veloxpaths. No Java/Scala runtime behavior changes.Limitation: a real macOS
libvelox.dyliblink was not run from this Windows host. A dummy, comment-only change tobuild/mvnnow triggers the existing weekly matrix through its PR path filter (new run); macOS native validation is still required.Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot 1.0.106-8.unstable.r43566476370.g869eef3 (GPT-6 Astra)