apache / apache/arrow

[C++] Not able to build the project with the latest commit of the master branch

Open
#33,096 1 comment 0 reactions 0 assignees View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

I am trying to build the arrow C++ project with the latest commit( 9af43f11b) from the master branch using this guide - But the build fails with the following error -
```java

[ 58%] Linking CXX executable ../../debug/arrow-array-test
Undefined symbols for architecture x86_64:
  "testing::Matcher > const&>::Matcher(char const*)", referenced from:
      testing::Matcher > const&> testing::internal::MatcherCastImpl > const&, char const*>::CastImpl(char const* const&, std::__1::integral_constant, std::__1::integral_constant) in array_test.cc.o
      testing::Matcher > const&> testing::internal::MatcherCastImpl > const&, char const*>::CastImpl(char const* const&, std::__1::integral_constant, std::__1::integral_constant) in array_binary_test.cc.o
ld: symbol(s) not found for architecture x86_64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/arrow/CMakeFiles/arrow-array-test.dir/build.make:207: debug/arrow-array-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1653: src/arrow/CMakeFiles/arrow-array-test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 58%] Building CXX object src/arrow/CMakeFiles/arrow-table-test.dir/table_test.cc.o
[ 58%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/types.cc.o
[ 58%] Building CXX object src/arrow/CMakeFiles/arrow-table-test.dir/table_builder_test.cc.o
[ 58%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/level_comparison_avx2.cc.o
[ 58%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/level_conversion_bmi2.cc.o
[ 58%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/encryption_internal.cc.o
[ 59%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/crypto_factory.cc.o
[ 60%] Linking CXX executable ../../debug/arrow-table-test
[ 60%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/file_key_unwrapper.cc.o
[ 60%] Built target arrow-table-test
[ 60%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/file_key_wrapper.cc.o
[ 60%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/kms_client.cc.o
[ 60%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/key_material.cc.o
[ 61%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/key_metadata.cc.o
[ 61%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/key_toolkit.cc.o
[ 61%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/key_toolkit_internal.cc.o
[ 61%] Building CXX object src/parquet/CMakeFiles/parquet_objlib.dir/encryption/local_wrap_kms_client.cc.o
[ 61%] Built target parquet_objlib
make: *** [Makefile:146: all] Error 2
```
 

I am compiling this on macOS Monterey Version 12.0.1. and versions of GCC, python and clang are as follows -
```java

$ clang --version
clang version 14.0.4
Target: x86_64-apple-darwin21.1.0
Thread model: posix

$ python --version
Python 3.9.13

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
```
 

I see that there were nightly job failures for macOS that were reported in the mailing list - I am not sure if this failure is related to the issue I am reporting.

**Reporter**: [Anirudh Acharya](https://issues.apache.org/jira/browse/ARROW-17881)

**Note**: *This issue was originally created as [ARROW-17881](https://issues.apache.org/jira/browse/ARROW-17881). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Follow the C++ build guide and reproduce the failure at commit 9af43f11b on macOS Monterey. Start with the arrow-array-test linker error involving testing::Matcher, compare it with the reported macOS nightly failures, and consider the issue done when the project builds successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.