[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1007925: ruby3.0: Please include patch to fix incorrect libc SO names on alpha



Source: ruby
Version: 3.0.3-1
Severity: normal
Tags: patch
User: debian-alpha@lists.debian.org
Usertags: alpha
X-Debbugs-Cc: debian-alpha@lists.debian.org

Hello!

The testsuite currently fails on alpha because the code in test/fiddle/helper.rb
assumes that the filenames for the libc and libm shared objects files are always
libc.so.6 and libm.so.6 on Linux which is not the case on at least alpha and ia64.

The failure looks like this:

exec ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" --excludes-dir=./test/excludes --name=!/memory_leak/ -v --excludes-dir=debian/tests/excludes/any/ --excludes-dir=debian/tests/excludes/alpha/
/<<PKGBUILDDIR>>/.ext/common/fiddle.rb:61:in `initialize': libc.so.6: cannot open shared object file: No such file or directory (Fiddle::DLError)
	from /<<PKGBUILDDIR>>/.ext/common/fiddle.rb:61:in `new'
	from /<<PKGBUILDDIR>>/.ext/common/fiddle.rb:61:in `dlopen'
	from /<<PKGBUILDDIR>>/.ext/common/fiddle/import.rb:86:in `block in dlload'
	from /<<PKGBUILDDIR>>/.ext/common/fiddle/import.rb:77:in `collect'
	from /<<PKGBUILDDIR>>/.ext/common/fiddle/import.rb:77:in `dlload'
	from /<<PKGBUILDDIR>>/test/fiddle/test_import.rb:12:in `<module:LIBC>'
	from /<<PKGBUILDDIR>>/test/fiddle/test_import.rb:10:in `<module:Fiddle>'
	from /<<PKGBUILDDIR>>/test/fiddle/test_import.rb:9:in `<top (required)>'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1049:in `require'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1049:in `block in non_options'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1043:in `each'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1043:in `non_options'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:65:in `process_args'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:143:in `process_args'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1237:in `process_args'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1242:in `run'
	from /<<PKGBUILDDIR>>/tool/lib/test/unit.rb:1249:in `run'
	from /<<PKGBUILDDIR>>/tool/test/runner.rb:23:in `<top (required)>'
	from ./test/runner.rb:11:in `require_relative'
	from ./test/runner.rb:11:in `<main>'

The attached patch fixes the issue. I have reported the bug upstream [2] and
sent a pull request to fix it [3].

Please also don't forget to add the test excludes for alpha from # [4].

Thanks,
Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=alpha&ver=3.0.3-1&stamp=1647549307&raw=0
> [2] https://bugs.ruby-lang.org/issues/18645
> [3] https://github.com/ruby/ruby/pull/5681
> [4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999444

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>From 53fc7d085c6929d920b2a915d33931478aded7fa Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Fri, 18 Mar 2022 16:36:16 +0100
Subject: [PATCH] [ruby/fiddle] Fix filenames for glibc SO files on alpha and
 ia64

Fixes [Bug #18645]
---
 test/fiddle/helper.rb | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 0ea3bf57f4..e470f5a276 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -49,8 +49,14 @@
     libm_so = libc_so
   else
     # glibc
-    libc_so = "libc.so.6"
-    libm_so = "libm.so.6"
+    case RUBY_PLATFORM
+    when /alpha-linux/, /ia64-linux/
+      libc_so = "libc.so.6.1"
+      libm_so = "libm.so.6.1"
+    else
+      libc_so = "libc.so.6"
+      libm_so = "libm.so.6"
+    end
   end
 when /mingw/, /mswin/
   require "rbconfig"
-- 
2.30.2


Reply to: