jackylee-ch opened a new pull request, #12470:
URL: https://github.com/apache/gluten/pull/12470

   ## What changes are proposed in this pull request?
   
   Follow-up to #12331, which made `INSTALL_PREFIX` flow into the Arrow, Velox 
and Gluten CPP CMake entry points. That behavior is unchanged here. This PR 
fixes what is still broken when building on macOS with `--build_type=Debug`, 
`--build_tests=ON` or `--build_benchmarks=ON`:
   
   - Replace the `-isystem /usr/local/include` demotion with an SDK sysroot 
(`SDKROOT`). Demotion keeps `/usr/local/include` ahead of imported targets' 
system includes, so test builds can compile against `/usr/local` headers 
(folly, gtest) while linking `INSTALL_PREFIX` libraries. Selecting the SDK 
sysroot drops `/usr/local/include` from the default search path entirely; 
package-discovery isolation via `CMAKE_IGNORE_*` is unchanged.
   - Restore `BUILD_TYPE` after sourcing `build-arrow.sh`, which otherwise 
overwrote `Debug` with `Release` for the rest of the build.
   - On macOS, force-load the Velox mono archive into `libvelox.dylib` and link 
`facebook::velox` privately, so test executables resolve Velox symbols from the 
dylib instead of linking a second copy of the archive.
   - On macOS, point folly's imported interface at `gflags_shared`. Folly 
exports `gflags_static` while glog links the shared gflags; loading both makes 
gflags register its built-in flags twice and abort test binaries. This is done 
in Gluten's CMake at `find_package(Folly)` time rather than by patching the 
installed `folly-targets.cmake`.
   - Resolve test data from a compile-time source-dir macro instead of the 
working directory, bump the gtest discovery timeout, and run the `ld`/`ldd` 
post-build checks only on Linux.
   
   Linux discovery logic and the Folly no-jemalloc setup from #12331 are 
unchanged.
   
   ## How was this patch tested?
   
   macOS arm64 local Debug build with tests and benchmarks enabled; the full 
C++ `ctest` suite passed (5663 tests, 0 failures).
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Yes — drafted with AI assistance and reviewed and verified by the author.
   


-- 
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