Backport #7864
closedlib/mkmf.rb: $(topdir) included in VPATH cause build error
Description
[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は、
- トップディレクトリにcomplex.oを作成(既にあるcomplex.oを上書き)
- 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 に反映していただきたいと思います。
Files
Updated by mame (Yusuke Endoh) almost 12 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
なかださん、どうでしょうか。
--
Yusuke Endoh mame@tsg.ne.jp
Updated by nobu (Nobuyoshi Nakada) almost 12 years 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.
[ruby-dev:46998] [Bug #7864]
Updated by knu (Akinori MUSHA) almost 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
build) - Status changed from Closed to Assigned
- Assignee changed from nobu (Nobuyoshi Nakada) to mame (Yusuke Endoh)
- Priority changed from 5 to 7
- Target version deleted (
2.0.0)
Updated by mame (Yusuke Endoh) almost 12 years ago
- Assignee changed from mame (Yusuke Endoh) to knu (Akinori MUSHA)
バックポート OK です。(多分)
これも作業をお願いできませんでしょうか > knu さん
--
Yusuke Endoh mame@tsg.ne.jp
Updated by knu (Akinori MUSHA) almost 12 years 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.
[ruby-dev:46998] [Bug #7864]