Project

General

Profile

Bug #7467

lib/mkmf.rb merge_lib fails on larger sets of libraries

Added by Michal Papis over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
ruby -v:
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.0]
[ruby-core:50307]

Description

running:

merge_libs(["-lncurses", "-ltinfo", "-lssl", "-lcrypto", "-lz", "-lreadline", "-ltermcap", "-lyaml"],["-lcrypto", "-lssl", "-lcrypto", "-lz"],[])

fails with an exception

I have tried a bit and it works fine with a lot simplified version of this code:

def merge_libs(*libs)
libs.flatten.uniq
end

Also can this be backported to Ruby 1.9.3?

Associated revisions

Revision 39128
Added by Nobuyoshi Nakada about 3 years ago

mkmf.rb: fix merge_libs

  • lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal ordered elements just after the duplicated element, not overwriting successive elements. [Bug #7467]

Revision 39128
Added by Nobuyoshi Nakada about 3 years ago

mkmf.rb: fix merge_libs

  • lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal ordered elements just after the duplicated element, not overwriting successive elements. [Bug #7467]

Revision 39128
Added by Nobuyoshi Nakada about 3 years ago

mkmf.rb: fix merge_libs

  • lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal ordered elements just after the duplicated element, not overwriting successive elements. [Bug #7467]

History

#2 [ruby-core:51059] Updated by Usaku NAKAMURA over 3 years ago

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada
  • Target version set to 2.0.0

#3 Updated by Nobuyoshi Nakada about 3 years ago

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

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


mkmf.rb: fix merge_libs

  • lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal ordered elements just after the duplicated element, not overwriting successive elements. [Bug #7467]

#4 [ruby-core:52072] Updated by Michal Papis about 3 years ago

just curious what the new code does more over the simple libs.flatten.uniq?

Also available in: Atom PDF