From 11e39da2b78016b4f6e7a8f7b06c99803ae1381d Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 16 Aug 2024 11:05:46 +0900 Subject: [PATCH] GH-41396: [Ruby] Add workaround for re2.pc on Ubuntu 20.04 Old re2.pc add "-std=c++11" but it causes a build error. Because Apache Arrow C++ requires C++17. We can remove "-std=c++11" as workaround. --- 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 7ef3c6c8343..28ccd0b2d59 100644 --- a/ruby/red-arrow/ext/arrow/extconf.rb +++ b/ruby/red-arrow/ext/arrow/extconf.rb @@ -66,6 +66,13 @@ 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|