apache / apache/gluten

Build fails on macOS when enable BUILD_TESTS

Open
#6,550 1 comment 0 reactions 0 assignees View on GitHub
BUILD triage
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Problem description

```
In file included from /tmp/gluten/cpp/velox/tests/Substrait2VeloxPlanConversionTest.cc:18:
/tmp/gluten/cpp/velox/tests/JsonToProtoConverter.h:20:10: fatal error: 'google/protobuf/util/json_util.h' file not found
#include
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 5%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o
In file included from /tmp/gluten/cpp/velox/tests/VeloxColumnarToRowTest.cc:18:
/tmp/gluten/cpp/velox/memory/VeloxColumnarBatch.h:20:10: fatal error: 'memory/ColumnarBatch.h' file not found
#include "memory/ColumnarBatch.h"
^~~~~~~~~~~~~~~~~~~~~~~~
[ 6%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o
/tmp/gluten/cpp/velox/tests/SparkFunctionTest.cc:21:10: fatal error: 'velox/functions/sparksql/tests/SparkFunctionBaseTest.h' file not found
#include "velox/functions/sparksql/tests/SparkFunctionBaseTest.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/spark_functions_test.dir/SparkFunctionTest.cc.o] Error 1
make[1]: *** [velox/tests/CMakeFiles/spark_functions_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/velox_plan_conversion_test.dir/Substrait2VeloxPlanConversionTest.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/gluten/cpp/velox/tests/VeloxShuffleWriterTest.cc:21:10: fatal error: 'shuffle/LocalPartitionWriter.h' file not found
#include "shuffle/LocalPartitionWriter.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 7%] Building CXX object velox/tests/CMakeFiles/velox_plan_conversion_test.dir/Substrait2VeloxPlanValidatorTest.cc.o
[ 7%] Building CXX object velox/tests/CMakeFiles/velox_shuffle_writer_test.dir/JsonToProtoConverter.cc.o
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/velox_operators_test.dir/VeloxColumnarToRowTest.cc.o] Error 1
make[1]: *** [velox/tests/CMakeFiles/velox_operators_test.dir/all] Error 2
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/velox_shuffle_writer_test.dir/VeloxShuffleWriterTest.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 8%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/colorprint.cc.o
[ 8%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o
[ 9%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/complexity.cc.o
[ 10%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/console_reporter.cc.o
[ 10%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/counter.cc.o
[ 10%] Built target jni_proto
/tmp/gluten/cpp/velox/tests/JsonToProtoConverter.cc:18:10: fatal error: 'velox/substrait/tests/JsonToProtoConverter.h' file not found
#include "velox/substrait/tests/JsonToProtoConverter.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 11%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o
[ 12%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/json_reporter.cc.o
[ 12%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/perf_counters.cc.o
[ 13%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/reporter.cc.o
[ 14%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/sleep.cc.o
[ 14%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/statistics.cc.o
In file included from /tmp/gluten/cpp/velox/tests/Substrait2VeloxPlanValidatorTest.cc:19:
/tmp/gluten/cpp/velox/tests/JsonToProtoConverter.h:20:10: fatal error: 'google/protobuf/util/json_util.h' file not found
#include
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 15%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/string_util.cc.o
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/velox_plan_conversion_test.dir/Substrait2VeloxPlanValidatorTest.cc.o] Error 1
make[1]: *** [velox/tests/CMakeFiles/velox_plan_conversion_test.dir/all] Error 2
1 error generated.
make[2]: *** [velox/tests/CMakeFiles/velox_shuffle_writer_test.dir/JsonToProtoConverter.cc.o] Error 1
make[1]: *** [velox/tests/CMakeFiles/velox_shuffle_writer_test.dir/all] Error 2
[ 16%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/sysinfo.cc.o
[ 16%] Building CXX object _deps/gbenchmark-build/src/CMakeFiles/benchmark.dir/timers.cc.o
[ 17%] Linking CXX static library libbenchmark.a
[ 17%] Built target benchmark
make: *** [all] Error 2
```

### System information

Velox System Info v0.0.2
Commit: f044f3b7c95662d76785e216c8cbe75cf10146dc
CMake Version: 3.29.6
System: Darwin-23.3.0
Arch: arm64
CPU Name:
C++ Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
C++ Compiler Version: 15.0.0.15000309
C Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
C Compiler Version: 15.0.0.15000309
CMake Prefix Path: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr;/opt/homebrew;/usr/local;/usr;/;/opt/homebrew/Cellar/cmake/3.29.6;/usr/local;/usr/X11R6;/usr/pkg;/opt;/sw;/opt/local

### CMake log

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the CMake configuration used when BUILD_TESTS is enabled and the failing targets velox_plan_conversion_test, velox_operators_test, velox_shuffle_writer_test, and spark_functions_test. Trace the include paths and dependencies for the headers reported missing in cpp/velox/tests, then verify that the test targets build successfully on macOS arm64.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.