You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2024/08/16 02:43:38 UTC
(arrow) branch main updated: GH-41396: [Ruby] Add workaround for re2.pc on Ubuntu 20.04 (#43721)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new e9767c1a26 GH-41396: [Ruby] Add workaround for re2.pc on Ubuntu 20.04 (#43721)
e9767c1a26 is described below
commit e9767c1a268f543536077cf80f49b097739f308c
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Aug 16 11:43:32 2024 +0900
GH-41396: [Ruby] Add workaround for re2.pc on Ubuntu 20.04 (#43721)
### Rationale for this change
Old re2.pc add "-std=c++11" but it causes a build error. Because Apache Arrow C++ requires C++17.
### What changes are included in this PR?
Remove "-std=c++11" as workaround. We can remove this workaround when we drop support for Ubuntu 20.04.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* GitHub Issue: #41396
Authored-by: Sutou Kouhei <ko...@clear-code.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
ruby/red-arrow/ext/arrow/extconf.rb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ruby/red-arrow/ext/arrow/extconf.rb b/ruby/red-arrow/ext/arrow/extconf.rb
index 7ef3c6c834..28ccd0b2d5 100644
--- a/ruby/red-arrow/ext/arrow/extconf.rb
+++ b/ruby/red-arrow/ext/arrow/extconf.rb
@@ -66,6 +66,13 @@ unless required_pkg_config_package([
exit(false)
end
+# Old re2.pc (e.g. re2.pc on Ubuntu 20.04) may add -std=c++11. It
+# causes a build error because Apache Arrow C++ requires C++17 or
+# later.
+#
+# We can remove this when we drop support for Ubuntu 20.04.
+$CXXFLAGS.gsub!("-std=c++11", "")
+
[
["glib2", "ext/glib2"],
].each do |name, relative_source_dir|