ext/oboe_metal/extconf.rb in appoptics_apm-4.6.0 vs ext/oboe_metal/extconf.rb in appoptics_apm-4.7.0
- old
+ new
@@ -22,11 +22,22 @@
ao_path = File.join('https://s3-us-west-2.amazonaws.com/rc-files-t2/c-lib/', version)
puts "Fetching c-lib from S3"
else
ao_path = File.join('https://files.appoptics.com/c-lib', version)
end
-ao_arch = `ldd --version 2>&1` =~ /musl/ ? 'alpine-x86_64' : 'x86_64'
+
+ao_arch = 'x86_64'
+if File.exist?('/etc/alpine-release')
+ version = open('/etc/alpine-release').read.chomp
+ ao_arch =
+ if Gem::Version.new(version) < Gem::Version.new('3.9')
+ 'alpine-libressl-x86_64'
+ else # openssl
+ 'alpine-x86_64'
+ end
+end
+
ao_clib = "liboboe-1.0-#{ao_arch}.so.0.0.0"
ao_item = File.join(ao_path, ao_clib)
ao_checksum_item = "#{ao_item}.sha256"
clib = File.join(ao_lib_dir, ao_clib)
@@ -86,10 +97,9 @@
# libs specific to a Heroku dyno
# FIXME: For JRuby we need to remove the c extension entirely
create_makefile('oboe_noop', 'noop')
elsif have_library('oboe', 'oboe_config_get_revision', 'oboe.h')
-
$libs = append_library($libs, 'oboe')
$libs = append_library($libs, 'stdc++')
$CFLAGS << " #{ENV['CFLAGS']}"
$CPPFLAGS << " #{ENV['CPPFLAGS']}"