Skip to content

Commit

Permalink
GH-41396: [Ruby] Add workaround for re2.pc on Ubuntu 20.04 (#43721)
Browse files Browse the repository at this point in the history
### 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 <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Aug 16, 2024
1 parent a970fd7 commit e9767c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ruby/red-arrow/ext/arrow/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit e9767c1

Please sign in to comment.