Project

General

Profile

Actions

Backport #8130

closed

ArgumentError being thrown when using find_library

Added by agarie (Carlos Agarie) about 11 years ago. Updated almost 11 years ago.


Description

Hi,

I'm a contributor to SciRuby and I'm currently working on NMatrix, a numerical linear algebra library that uses LAPACK and ATLAS. I was compiling it with Ruby 2.0.0p0 installed through RVM and had a problem I didn't have when using 1.9.3:

/Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:893:in %': too many arguments for format string (ArgumentError) from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:893:in block in checking_for'
from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:337:in block (2 levels) in postpone' from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:307:in open'
from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:337:in block in postpone' from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:307:in open'
from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:333:in postpone' from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:891:in checking_for'
from /Users/carlosagarie/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:969:in find_library' from ../../../../ext/nmatrix/extconf.rb:124:in '

The complete output can be found in this gist: https://gist.github.com/agarie/5202139#file-gistfile1-sh. And extconf.rb:124 contains the following:

find_library("lapack", "clapack_dgetrf", "/usr/local/lib", "/usr/local/atlas/lib")

I couldn't find a note on the 2.0 changelog about something that could have "broken" it.

I can get it working by commenting lines 893 and 896 of mkmf.rb, which are explicitly shown in this gist: https://gist.github.com/agarie/5202139#file-gistfile2-rb.

And this is the mkmf.log: https://gist.github.com/agarie/5202139#file-mkmf-log

Regarding ruby version:

$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]

I also couldn't find a similar bug on the issue tracker or on Google. And to reproduce the error:

$ git clone git://github.com/SciRuby/nmatrix.git
$ cd nmatrix
$ bundle install
$ bundle exec rake compile

It might give other problems because of the libraries necessary for installation. I'm trying to come up with a simpler script that reproduces this error -- I'll update this ticket as soon as I'm successful.

Another thing is that when using 1.9.3-p392 and doing the same set of steps, it works correctly.

Thanks for your time.

Actions #1

Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport200 to Ruby master
  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

Hello,

project Backport200 is for backport tickets. I'll move this ticket to ruby-trunk.

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

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

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


mkmf.rb: format message

Actions #3

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
Actions #4

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • Status changed from Assigned to Closed

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


merge revision(s) 39842: [Backport #8130]

* lib/mkmf.rb (find_library): fix to format message.
  [ruby-core:53568] [Bug #8130]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0