felipepessoto opened a new pull request, #13665:
URL: https://github.com/apache/gluten/pull/13665

   ## 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](https://github.com/apache/gluten/actions/runs/44192615488/job/134426149032).
 Flex 2.6.5 added this virtual method to `FlexLexer.h`; newer Homebrew Flex 
releases expose the missing definition in Velox's shim.
   
   Check in the **two lexer changes only** from 
[facebookincubator/velox#20420](https://github.com/facebookincubator/velox/pull/20420),
 pinned to upstream head `842e138e5cc09e23fa62ffb68a9ab0c076b194f9`:
   
   - Inspect the installed Flex header in CMake and set 
`VELOX_FLEX_LEXER_HAS_YYREAD` through `velox_compile_definitions`, which also 
handles mono-library builds.
   - Define the missing virtual in `YyFlexLexerShim.cpp` only when the header 
declares it, preserving Flex 2.6.4 compatibility.
   - Apply the local patch during source preparation, including 
`--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/velox` `dft-2026_11_10` / 
`67fa1bbee62e9f8752b3c34cc92f179022cd2ac6`. There is no moving PR download, 
dependency upgrade, Flex downgrade, or workflow change. The upstream 
`update_brew` workflow hunk is intentionally excluded.
   
   ## How was this patch tested?
   
   - Verified clean patch application against the exact pinned source blobs. 
Both resulting lexer files match the upstream PR head byte-for-byte.
   - Exercised the actual source-preparation script with setup disabled and an 
existing checkout, including repeat invocation. Also checked helper paths 
containing spaces and explicit, atomic failure for partial patches and 
incompatible source drift.
   - Ran an isolated Ubuntu 22.04 / GCC 11.4 CMake compile, shared-link 
(`--no-undefined`), and library-load matrix using the real release headers and 
actual pinned shim, base CMake file, and `velox_compile_definitions` helper. 
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):
   
   | Flex header | Unpatched shim | Backported shim |
   | --- | --- | --- |
   | 2.6.4 | Pass | Pass |
   | 2.6.5 | Missing `yyFlexLexer::yyread` at link | Pass |
   | 2.6.15 | Missing `yyFlexLexer::yyread` at link | Pass |
   | 2.6.16 | Missing `yyFlexLexer::yyread` at link | Pass |
   
   Also 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 excludes 
`ep/build-velox` paths. No Java/Scala runtime behavior changes.
   
   **Limitation:** a real macOS `libvelox.dylib` link was not run from this 
Windows host. The weekly workflow's PR path filter does not include 
`ep/build-velox`, so this PR does not automatically run the exact failing macOS 
job; 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)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to