質問するログイン新規登録
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

Q&A

解決済

1回答

1176閲覧

Rubyにrumaleをインストールできません

idenma2

総合スコア3

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

1グッド

1クリップ

投稿2021/09/15 11:52

1

1

Windows 10でRubyを扱っています。
Rubyにrumaleをインストールしようとしたところ、次のようなエラーが出ました。

C:\Users****\ruby>gem install rumale _0.23.0_ Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing rumale: ERROR: Failed to build gem native extension. current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20210915-14872-n25knt.rb extconf.rb checking for numo/narray.h... yes checking for nary_new() in -lnarray... yes creating Makefile current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale make "DESTDIR=" clean current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale make "DESTDIR=" generating rumaleext-x64-mingw32.def compiling rumaleext.c compiling tree.c linking shared-object rumale/rumaleext.so C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: tree.o:tree.c:(.text+0x21ad): undefined reference to `__imp_mRumale' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:261: rumaleext.so] エラー 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1 for inspection. Results logged to C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/rumale-0.23.1/gem_make.out ERROR: Could not find a valid gem '_0.23.0_' (>= 0) in any repository C:\Users***\ruby>gem install rumale -v '0.23.0' Fetching rumale-0.23.0.gem Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing rumale: ERROR: Failed to build gem native extension. current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.0/ext/rumale C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20210915-15140-ny9tpy.rb extconf.rb checking for numo/narray.h... yes checking for nary_new() in -lnarray... yes creating Makefile current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.0/ext/rumale make "DESTDIR=" clean current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.0/ext/rumale make "DESTDIR=" generating rumale-x64-mingw32.def compiling rumale.c compiling tree.c linking shared-object rumale/rumale.so C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: tree.o:tree.c:(.text+0x21ad): undefined reference to `__imp_mRumale' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:261: rumale.so] エラー 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.0 for inspection. Results logged to C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/rumale-0.23.0/gem_make.out

環境の問題らしいというところまでは分かったのですが
c++の領域らしく、どう扱っていいのかイメージできません。
ご教授いただけると助かります。

shinoharat👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

shinoharat

2021/09/16 04:18

gem_make.out にはどんな内容が出力されていますか?
idenma2

2021/09/16 08:07

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20210915-14872-n25knt.rb extconf.rb checking for numo/narray.h... yes checking for nary_new() in -lnarray... yes creating Makefile current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale make "DESTDIR=" clean current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rumale-0.23.1/ext/rumale make "DESTDIR=" generating rumaleext-x64-mingw32.def compiling rumaleext.c compiling tree.c linking shared-object rumale/rumaleext.so C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: tree.o:tree.c:(.text+0x21ad): undefined reference to `__imp_mRumale' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:261: rumaleext.so] エラー 1 make failed, exit code 2 ---------------------------- このように書き込まれていました
shinoharat

2021/09/18 01:20

情報ありがとうございます。 すみません。だいぶ調べたのですが、私には原因が分かりませんでした。 GitHub の issue で訊く方が良いかも知れません。
idenma2

2021/09/18 01:24

調べていただいてありがとうございます! 自分でも探していきたいと思います!
kojix2

2021/09/19 10:47

同じエラーが出ますね。これは直接Rumaleのissueに聞きましょう。
idenma2

2021/09/22 11:11

issueに入れていただきありがとうございます!
kojix2

2021/09/22 11:40 編集

numo-narrayもrumaleもWindowsだけ分岐しているので、たぶんWindowsの場合は何かのフラグを追加しなければならないとか、そういう感じのエラーだと思いますが、 https://github.com/ruby-numo/numo-narray/blob/6f5c91250c0cb948f6b811385d384c3f15af4dcd/ext/numo/narray/extconf.rb#L23-L26 https://github.com/yoshoku/rumale/blob/04e4e45b324fff67053ef52945654a76504178e0/ext/rumale/extconf.rb#L18-L29 C言語に詳しい人じゃないと解決できないので作者に聞いてしまった方が早いです。
guest

回答1

0

自己解決

kojix2さんに解決していただきました!
現在(2021.9.28)での方法を記載します。

kojix2さんのGitHubにあるブランチ
https://github.com/kojix2/rumale/tree/kojix2-nobu-patch
のgemをインストールするため
gem installでGitHubリポジトリにある最新版をインストールする
の下部に記載された specific_install を利用し

gem install specific_install gem specific_install -l 'git://github.com/kojix2/rumale.git' -b 'kojix2-nobu-patch'

とすることでインストールできました!

もうひとつ
kojix2さんのslackに
コケるのはRuby3.0だけ
https://github.com/yoshoku/rumale/runs/3710927768
とありました

投稿2021/09/28 09:08

編集2021/09/28 09:14
idenma2

総合スコア3

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.30%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問