Forum: Ruby-dev [ruby-trunk - Bug #7864][Open] lib/mkmf.rb: $(topdir) included in VPATH cause build error

Posted by taca (Takahiro Kambe) (Guest)
on 2013-02-16 12:49
(Received via mailing list)
Issue #7864 has been reported by taca (Takahiro Kambe).

----------------------------------------
Bug #7864: lib/mkmf.rb: $(topdir) included in VPATH cause build error
https://bugs.ruby-lang.org/issues/7864

Author: taca (Takahiro Kambe)
Status: Open
Priority: High
Assignee:
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16) [x86_64-netbsd6.0.]


[ruby-dev:46849]での問題は、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.0_STABLE amd64 x86_64

原因は、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: each_compile_rules

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

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

この修正は Ruby 2.0.0 に反映していただきたいと思います。
Posted by mame (Yusuke Endoh) (Guest)
on 2013-02-16 13:08
(Received via mailing list)
Issue #7864 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to nobu (Nobuyoshi Nakada)

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

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7864: lib/mkmf.rb: $(topdir) included in VPATH cause build error
https://bugs.ruby-lang.org/issues/7864#change-36346

Author: taca (Takahiro Kambe)
Status: Assigned
Priority: High
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16) [x86_64-netbsd6.0.]


[ruby-dev:46849]での問題は、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.0_STABLE amd64 x86_64

原因は、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: each_compile_rules

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

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

この修正は Ruby 2.0.0 に反映していただきたいと思います。
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.