Project

General

Profile

Actions

Backport #8937

closed

doesn't detect libc/libm properly on Hurd

Added by gg0 (Gabriele Giacone) about 11 years ago. Updated about 11 years ago.


Description

this bug can be reproduced in Ruby 1.8 as well

In test/dl/test_base.rb and test/fiddle/helper.rb files, RUBY_PLATFORM's case sets libc_so/libm_so 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


Files

patch01 (988 Bytes) patch01 gg0 (Gabriele Giacone), 09/23/2013 04:26 AM
patch02 (828 Bytes) patch02 gg0 (Gabriele Giacone), 09/23/2013 04:26 AM
patch03 (864 Bytes) patch03 gg0 (Gabriele Giacone), 09/23/2013 04:26 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0