Project

General

Profile

Actions

Bug #8435

closed

Updated by romuloceccon (Rômulo Ceccon) about 12 years ago

Workaround is to specify actual location of tcl/tk files:

./configure --with-tclConfig-file=/usr/lib/x86_64-linux-gnu/tclConfig.sh --with-tkConfig-file=/usr/lib/x86_64-linux-gnu/tkConfig.sh

It looks like the change in the *.sh scripts intend to improve support for DEB_HOST_MULTIARCH. I don't know how prevalent the problem will be for other platforms, or what the policy is for Ruby regarding that kind of workaround.

Updated by zzak (zzak _) about 12 years ago

Seems like third party issue

Updated by hsbt (Hiroshi SHIBATA) about 12 years ago

  • Category set to ext
  • Assignee set to nagai (Hidetoshi Nagai)
  • Target version set to 2.1.0

Updated by romuloceccon (Rômulo Ceccon) about 12 years ago

A possible fix:

--- a/ext/tk/extconf.rb 2013-01-10 05:47:20.000000000 -0200
+++ b/ext/tk/extconf.rb 2013-05-25 21:32:54.230020034 -0300
@@ -117,6 +117,11 @@
/64|universal/ =~ RUBY_PLATFORM
end

+def multiarch_supported?

  • dpkg_arch = which dpkg-architecture.strip
  • #{dpkg_arch} -qDEB_HOST_MULTIARCH.strip unless dpkg_arch.empty?
    +end

def check_tcltk_version(version)
return [nil, nil] unless version.kind_of? String

@@ -466,7 +471,14 @@

 config_dir << RbConfig::CONFIG['libdir']
  • ((maybe_64bit?)? ['lib64', 'lib']: ['lib']).each{|dir|
  • if arch = multiarch_supported?
  •  lib_dirs = ["lib/#{arch}", 'lib']
    
  • elsif maybe_64bit?
  •  lib_dirs = ['lib64', 'lib']
    
  • else
  •  lib_dirs = ['lib']
    
  • end
  • lib_dirs.each{|dir|
    config_dir.concat [
    File.join(RbConfig::CONFIG['exec_prefix'], dir),
    File.join(RbConfig::CONFIG['prefix'], dir),

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

romuloceccon (Romulo Ceccon) wrote:

+def multiarch_supported?

  • dpkg_arch = which dpkg-architecture.strip
  • #{dpkg_arch} -qDEB_HOST_MULTIARCH.strip unless dpkg_arch.empty?
    +end

`` returns a string, that is true value.

Possibly,
/\S/ =~ dpkg-architecture -qDEB_HOST_MULTIARCH rescue false
?

Updated by romuloceccon (Rômulo Ceccon) about 12 years ago

The idea is that the method would also return the architecture as a string, but return false if dpkg-architecture is not available or is of an older version (DEB_HOST_MULTIARCH unsupported). So a more comprehensive approach could be:

def multiarch_supported?
  cmd = `which dpkg-architecture 2>/dev/null`
  return unless $?.success?
  arch = `#{cmd.strip} -qDEB_HOST_MULTIARCH`
  arch.strip if $?.success?
end

Updated by nagai (Hidetoshi Nagai) about 12 years ago

  • Status changed from Open to Third Party's Issue

It depends on Ubuntu packages. The may be able to avoid the "current" problem,
but it cannot guarantee that it is available in the next version of Ubuntu.
If the policy of Ubuntu is changed, extconf.rb must check the Tcl/Tk package version of Ubuntu.
I think that it is not a good choice.
Although it may be troble, please use configure options.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0