Project

General

Profile

Actions

Backport #7864

closed

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

Added by taca (Takahiro Kambe) about 11 years ago. Updated about 11 years ago.

Status:
Closed
[ruby-dev:46998]

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は、

  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 に反映していただきたいと思います。


Files

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

Updated by mame (Yusuke Endoh) about 11 years ago

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

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

--
Yusuke Endoh

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 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]
Actions #3

Updated by knu (Akinori MUSHA) about 11 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)
Actions #4

Updated by mame (Yusuke Endoh) about 11 years ago

  • Assignee changed from mame (Yusuke Endoh) to knu (Akinori MUSHA)

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

--
Yusuke Endoh

Actions #5

Updated by knu (Akinori MUSHA) about 11 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]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0