From: Takehiro Kubo Date: 2008-12-29T22:37:22+09:00 Subject: [ruby-core:20963] [Bug #932] incorrect case statement in "ext/dl/test/test_base.rb" causes library problems on openSUSE 11.1 64-bit Issue #932 has been updated by Takehiro Kubo. How about the following patch which is a piece of one I posted to #633. Index: ext/dl/test/test_base.rb =================================================================== --- ext/dl/test/test_base.rb (revision 21112) +++ ext/dl/test/test_base.rb (working copy) @@ -6,8 +6,17 @@ LIBC_SO = "cygwin1.dll" LIBM_SO = "cygwin1.dll" when /linux/ - LIBC_SO = "/lib/libc.so.6" - LIBM_SO = "/lib/libm.so.6" + libdir = '/lib' + case [0].pack('L!').size + when 4 + # 32-bit ruby + libdir = '/lib32' if File.directory? '/lib32' + when 8 + # 64-bit ruby + libdir = '/lib64' if File.directory? '/lib64' + end + LIBC_SO = File.join(libdir, "libc.so.6") + LIBM_SO = File.join(libdir, "libm.so.6") when /mingw/, /mswin32/ LIBC_SO = "msvcrt.dll" LIBM_SO = "msvcrt.dll" I got similar problems When I ran i386 ruby on ubuntu x86_64. 32-bit libraries are in /lib32 on the platform. redhat-based x86_64 linux distributions: /lib - 32-bit libraries /lib64 - 64-bit libraries debian-based x86_64 linux distributions: /lib - 64-bit libraries /lib32 - 32-bit libraries /lib64 - symbolic link to /lib This patch will fix all cases. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/932 ---------------------------------------- http://redmine.ruby-lang.org