Skip to content

Commit

Permalink
Update libre2 to 2023-03-01
Browse files Browse the repository at this point in the history
The previous version (2016-02-01) is pretty old, and it appears that
the latest grpc gem attempts to build with the system-installed re2
headers due to
grpc/grpc#32580 (comment).
Update to a more recent version to work around an issue building the
gem.

Changelog: changed
  • Loading branch information
stanhu authored and balasankarc committed May 8, 2023
1 parent 08a373b commit bf75e78
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions config/software/libre2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

name 'libre2'

version = Gitlab::Version.new('libre2', '2016-02-01')
version = Gitlab::Version.new('libre2', '2023-03-01')
default_version version.print(false)
display_version version.print(false).tr('-', '')

Expand All @@ -32,6 +32,17 @@
build do
env = with_standard_compiler_flags(with_embedded_path)

make "-j #{workers}", env: env
make "install prefix=#{install_dir}/embedded", env: env
block 'compile re2 with a custom compiler if necessary' do
if ohai['platform'] == 'centos' && ohai['platform_version'].start_with?('7.')
env['CC'] = "/opt/rh/devtoolset-8/root/usr/bin/gcc"
env['CXX'] = "/opt/rh/devtoolset-8/root/usr/bin/g++"
end

# This is not enabled by default for the g++ on Ubuntu 16.04.
# https://github.com/google/re2/wiki/Install says C++11 is required.
env['CPPFLAGS'] << ' -std=c++11'

make "-j #{workers}", env: env
make "install prefix=#{install_dir}/embedded", env: env
end
end

0 comments on commit bf75e78

Please sign in to comment.