Skip to content

Conversation

@nealrichardson
Copy link
Member

@nealrichardson nealrichardson commented Jun 21, 2022

The homebrew-r-brew nightly job has been failing since the ARROW_GCS flag was turned on in ARROW-14892. The failure is an undefined absl symbol

** testing if installed package can be loaded from temporary location
Error: Error: package or namespace load failed for ‘arrow’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/runner/work/crossbow/crossbow/arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so':
  dlopen(/Users/runner/work/crossbow/crossbow/arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so, 6): Symbol not found: __ZN4absl12lts_2021110210FormatTimeENS0_11string_viewENS0_4TimeENS0_8TimeZoneE
  Referenced from: /usr/local/opt/apache-arrow/lib/libarrow.900.dylib
  Expected in: flat namespace
 in /usr/local/opt/apache-arrow/lib/libarrow.900.dylib

We need to build Apache Arrow with C++17 because system Abseil installed by Homebrew uses C++17 and we use
Abseil features such as absl::FormatTime() in gcsfs_internal.cc.

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit homebrew-r-brew

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@github-actions
Copy link

Revision: e9dc065ebcd47d619642f8118afda34d5b8f6871

Submitted crossbow builds: ursacomputing/crossbow @ actions-c454abbe7a

Task Status
homebrew-r-brew Github Actions

@nealrichardson
Copy link
Member Author

Hmm, I think I was wrong about the diagnosis. The brew formula already depends on grpc, which pulls in abseil, and you can see abseil being installed by brew in https://github.com/ursacomputing/crossbow/runs/6953742239?check_suite_focus=true#step:8:476.

Since abseil is working enough for grpc (assuming we test bundled grpc somewhere?) but not google-cloud-cpp, maybe we're missing something in INTERFACE_LINK_LIBRARIES in the bundled google-cloud-cpp cmake macro?

cc @kou

@nealrichardson
Copy link
Member Author

Following #13404 (comment), I think we need ABSEIL_SOURCE=BUNDLED so that we get C++11 compatibility--brew builds for C++17.

@kou
Copy link
Member

kou commented Jun 22, 2022

Sorry, I missed this in ARROW-14892.

Could you try the following?

diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb
index 94a1a67a1a..4908c22ed6 100644
--- a/dev/tasks/homebrew-formulae/apache-arrow.rb
+++ b/dev/tasks/homebrew-formulae/apache-arrow.rb
@@ -89,6 +89,7 @@ class ApacheArrow < Formula
       -DARROW_WITH_UTF8PROC=ON
       -DARROW_WITH_ZLIB=ON
       -DARROW_WITH_ZSTD=ON
+      -DCMAKE_CXX_STANDARD=17
       -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
       -DPython3_EXECUTABLE=#{Formula["python@3.9"].bin/"python3"}
     ]

We need to align C++ version with Abseil because we use absl::FormatTime() in gcsfs_internal.cc: https://github.com/apache/arrow/blob/master/cpp/src/arrow/filesystem/gcsfs_internal.cc#L237

@kou
Copy link
Member

kou commented Jun 22, 2022

FYI: resolve_dependency_absl() isn't related to this case because we don't use bundled Abseil in this case.

@nealrichardson
Copy link
Member Author

FYI: resolve_dependency_absl() isn't related to this case because we don't use bundled Abseil in this case.

Yep, I was wrongly assuming that all of my "undefined symbols" problems were the same. I've bumped to C++17 here and reverted the cmake changes. Pushing on the static build issues in #13404.

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit homebrew-r-brew

@github-actions
Copy link

Revision: caf1148

Submitted crossbow builds: ursacomputing/crossbow @ actions-a120875ba7

Task Status
homebrew-r-brew Github Actions

@kou kou changed the title ARROW-16869: [C++] Fix bundled abseil and homebrew formula ARROW-16869: [CI][C++][Homebrew] Build Apache Arrow with C++17 Jun 22, 2022
@kou kou marked this pull request as ready for review June 22, 2022 06:15
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit d5a9453 into apache:master Jun 22, 2022
@nealrichardson nealrichardson deleted the brew-gcs branch June 22, 2022 12:25
vibhatha pushed a commit to vibhatha/arrow that referenced this pull request Jul 5, 2022
…e#13407)

The `homebrew-r-brew` nightly job has been failing since the ARROW_GCS flag was turned on in [ARROW-14892](https://issues.apache.org/jira/browse/ARROW-14892). The failure is an undefined absl symbol

```
** testing if installed package can be loaded from temporary location
Error: Error: package or namespace load failed for ‘arrow’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/runner/work/crossbow/crossbow/arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so':
  dlopen(/Users/runner/work/crossbow/crossbow/arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so, 6): Symbol not found: __ZN4absl12lts_2021110210FormatTimeENS0_11string_viewENS0_4TimeENS0_8TimeZoneE
  Referenced from: /usr/local/opt/apache-arrow/lib/libarrow.900.dylib
  Expected in: flat namespace
 in /usr/local/opt/apache-arrow/lib/libarrow.900.dylib
```

We need to build Apache Arrow with C++17 because system Abseil installed by Homebrew uses C++17 and we use
Abseil features such as `absl::FormatTime()` in `gcsfs_internal.cc`.


Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants