Backport #7864

lib/mkmf.rb: $(topdir) included in VPATH cause build error

Added by Takahiro Kambe about 1 year ago. Updated about 1 year ago.

[ruby-dev:46998]
Status:Closed
Priority:Immediate
Assignee:Akinori MUSHA

Description

での問題は、Ruby 2.0.0-rc2やtrunkでも再現しました。

% sh configure --enable-shared
% make
...
compiling complex.c
linking shared-object mathn/complex.so
gcc: complex.o: No such file or directory
*** Error code 1

環境は以下のようになります。(GNU makeではありません。)

% uname -rsmp
NetBSD 6.0STABLE amd64 x8664

原因は、ext/mathn/complexに生成されたMakefileのVPATHに、

VPATH = $(srcdir):$(topdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby

と、$(topdir)が含まれている関係か、ここで実行したMakefileは、

  1. トップディレクトリにcomplex.oを作成(既にあるcomplex.oを上書き)
  2. complex.soのリンク時はext/mathn/complex/complex.oがなくて失敗

となっています。

VPATHに$(topdir)は、r37933による修正で含められるようになっています。

mkmf.rb: eachcompilerules

  • lib/mkmf.rb (MakeMakefile#eachcompilerules): splat $(VPATH) for each VPATH elements.

このログの説明で、何故$(topdir)を含めるようになったかは理解できません。
添付のパッチでr37933の一部を戻すとbuild可能となります。

この修正は Ruby 2.0.0 に反映していただきたいと思います。

mkmf.rb-diff (456 Bytes) Takahiro Kambe, 02/16/2013 08:49 PM

Associated revisions

Revision 39420
Added by Akinori MUSHA about 1 year ago

merge revision(s) r39290:

* lib/mkmf.rb: remove extra topdir in VPATH, which was in
  win32/Makefile.sub for some reason and moved from there.
   [Bug #7864]

History

#1 Updated by Yusuke Endoh about 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada

なかださん、どうでしょうか。

Yusuke Endoh mame@tsg.ne.jp

#2 Updated by Nobuyoshi Nakada about 1 year ago

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

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


mkmf.rb: remove extra topdir in VPATH

  • lib/mkmf.rb: remove extra topdir in VPATH, which was in win32/Makefile.sub for some reason and moved from there. [Bug #7864]

#3 Updated by Akinori MUSHA about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (build)
  • Status changed from Closed to Assigned
  • Assignee changed from Nobuyoshi Nakada to Yusuke Endoh
  • Priority changed from High to Immediate
  • Target version deleted (2.0.0)

#4 Updated by Yusuke Endoh about 1 year ago

  • Assignee changed from Yusuke Endoh to Akinori MUSHA

バックポート OK です。(多分)
これも作業をお願いできませんでしょうか > knu さん

Yusuke Endoh mame@tsg.ne.jp

#5 Updated by Akinori MUSHA about 1 year ago

  • Status changed from Assigned to Closed

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


merge revision(s) r39290:

* lib/mkmf.rb: remove extra topdir in VPATH, which was in
  win32/Makefile.sub for some reason and moved from there.
   [Bug #7864]

Also available in: Atom PDF