Backport #8937

doesn't detect libc/libm properly on Hurd

Added by Gabriele Giacone 7 months ago. Updated 6 months ago.

[ruby-core:57311]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

this bug can be reproduced in Ruby 1.8 as well

In test/dl/testbase.rb and test/fiddle/helper.rb files, RUBYPLATFORM's case sets libcso/libmso to non-existent file paths on Debian Linux (when /linux/) and kFreeBSD (when /kfreebsd/), but if at [0] takes correct paths from ldd.
On hurd (RUBY_PLATFORM i486-gnu), there are no "when /gnu/" cases so it hits default [1] which wrongly takes them from ARGV.

Attached patch01 takes them from "ldconfig -p" exactly like ldd in [0].
patch02 sets them wrong, just to have a case like on linux and kfreebsd and not to avoid ldd fix later.
patch03 sets correct paths on hurd-i386. Possible future hurd ports, 64bit one for instance, would fall back to ldd output.
patch02 might be the preferred because doesn't diverge from current linux/kfreebsd cases.

[[0]] http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/40235/entry/test/dl/test_base.rb#L93
[[1]] http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/40235/entry/test/dl/test_base.rb#L82

patch01 (988 Bytes) Gabriele Giacone, 09/23/2013 04:26 AM

patch02 (828 Bytes) Gabriele Giacone, 09/23/2013 04:26 AM

patch03 (864 Bytes) Gabriele Giacone, 09/23/2013 04:26 AM

Associated revisions

Revision 43225
Added by Tomoyuki Chikanaga 6 months ago

merge revision(s) 43077,43078: [Backport #8937]

* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).

* test/fiddle/helper.rb: ditto.
  [Bug #8937]

History

#1 Updated by Motohiro KOSAKI 7 months ago

Thank you for your contribution. I committed patch01 because you recommended it.

#2 Updated by Motohiro KOSAKI 7 months ago

Oops, s/patch01/patch02/

#3 Updated by Motohiro KOSAKI 7 months ago

  • Status changed from Open to Closed

Fixed at r43077.

#4 Updated by Tomoyuki Chikanaga 6 months ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Status changed from Closed to Assigned
  • Assignee set to Tomoyuki Chikanaga

in #9000, backporting r43077 is requested.

#5 Updated by Tomoyuki Chikanaga 6 months ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43225.
Gabriele, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 43077,43078: [Backport #8937]

* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
  correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com).

* test/fiddle/helper.rb: ditto.
  [Bug #8937]

Also available in: Atom PDF