Forum: Ruby-core [ruby-trunk - Bug #8937][Open] doesn't detect libc/libm properly on Hurd

385a38512a8658f5b87ca947ca1849f7?d=identicon&s=25 gg0 (Gabriele Giacone) (Guest)
on 2013-09-22 21:27
(Received via mailing list)
Issue #8937 has been reported by gg0 (Gabriele Giacone).

----------------------------------------
Bug #8937: doesn't detect libc/libm properly on Hurd
https://bugs.ruby-lang.org/issues/8937

Author: gg0 (Gabriele Giacone)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p299 (2013-08-29) [i386-gnu]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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/repo...
[[1]]
http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
02da662c083396641da96c1d32fc86ed?d=identicon&s=25 kosaki (Motohiro KOSAKI) (Guest)
on 2013-09-28 07:45
(Received via mailing list)
Issue #8937 has been updated by kosaki (Motohiro KOSAKI).


Thank you for your contribution. I committed patch01 because you
recommended it.
----------------------------------------
Bug #8937: doesn't detect libc/libm properly on Hurd
https://bugs.ruby-lang.org/issues/8937#change-42065

Author: gg0 (Gabriele Giacone)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p299 (2013-08-29) [i386-gnu]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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/repo...
[[1]]
http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
02da662c083396641da96c1d32fc86ed?d=identicon&s=25 kosaki (Motohiro KOSAKI) (Guest)
on 2013-09-28 07:45
(Received via mailing list)
Issue #8937 has been updated by kosaki (Motohiro KOSAKI).


Oops, s/patch01/patch02/
----------------------------------------
Bug #8937: doesn't detect libc/libm properly on Hurd
https://bugs.ruby-lang.org/issues/8937#change-42066

Author: gg0 (Gabriele Giacone)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p299 (2013-08-29) [i386-gnu]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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/repo...
[[1]]
http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
02da662c083396641da96c1d32fc86ed?d=identicon&s=25 kosaki (Motohiro KOSAKI) (Guest)
on 2013-09-28 07:46
(Received via mailing list)
Issue #8937 has been updated by kosaki (Motohiro KOSAKI).

Status changed from Open to Closed

Fixed at r43077.
----------------------------------------
Bug #8937: doesn't detect libc/libm properly on Hurd
https://bugs.ruby-lang.org/issues/8937#change-42067

Author: gg0 (Gabriele Giacone)
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0p299 (2013-08-29) [i386-gnu]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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/repo...
[[1]]
http://bugs.ruby-lang.org/projects/ruby-trunk/repo...
This topic is locked and can not be replied to.