エディション Windows 10 Pro
バージョン 20H2
OS ビルド 19042.1415
エクスペリエンス Windows Feature Experience Pack 120.2212.3920.0
インストールしたのは、Ruby+Devkit 3.0.3-1 (x64)
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x64-mingw32]
前提・実現したいこと
Windows10のRubyを用いてMailCatcher をインストールしようとしたところ、エラーが生じてしまいインストールできずにいます。
該当のソースコード
C:\>gem install mailcatcher Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing mailcatcher: ERROR: Failed to build gem native extension. current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20211221-25024-5d1u2s.rb extconf.rb checking for windows.h... yes checking for winsock.h... yes checking for -lkernel32... yes checking for -lrpcrt4... yes checking for -lgdi32... yes creating Makefile current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader make DESTDIR\= clean current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader make DESTDIR\= generating fastfilereaderext-x64-mingw32.def compiling mapper.cpp compiling rubymain.cpp In file included from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:8, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/win32.h:41, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/dosish.h:38, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:79, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38, from rubymain.cpp:26: C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:64:11: error: reference to 'byte' is ambiguous 64 | typedef byte cs_byte; | ^~~~ In file included from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:61, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ios:40, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ostream:38, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/iostream:39, from rubymain.cpp:22: ^~~~ In file included from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:61, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ios:40, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ostream:38, from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/iostream:39, from rubymain.cpp:22: C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h:404:30: note: candidates are: 'enum class std::byte' 404 | enum class byte : unsigned char; | ^~~~ In file included from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:8, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/win32.h:41, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/dosish.h:38, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:79, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38, from rubymain.cpp:26: C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:63:25: note: 'typedef unsigned char byte' 63 | typedef unsigned char byte; | ^~~~ In file included from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:8, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97, from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/win32.h:41, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/dosish.h:38, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:79, from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23, from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38, from rubymain.cpp:26: C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:397:170: error: 'byte' has not been declared 397 | typedef void (__RPC_API *CS_TYPE_TO_NETCS_ROUTINE)(RPC_BINDING_HANDLE hBinding,unsigned __LONG32 ulNetworkCodeSet,void *pLocalData,unsigned __LONG32 ulLocalDataLength,byte *pNetworkData,unsigned __LONG32 *pulNetworkDataLength,error_status_t *pStatus); | ^~~~ C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:63:25: note: 'typedef unsigned char byte' 63 | typedef unsigned char byte; | ^~~~ make: *** [Makefile:237: rubymain.o] エラー 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1 for inspection. Results logged to C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/eventmachine-1.0.9.1/gem_make.out
試したこと
Ruby+Devkit 2.7.5-1 (x64) でも試してみましたが、同様の箇所でエラーが出てしまいました。
追記 ~gem_make.out~
current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader
C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20211221-24968-d6emd4.rb extconf.rb
checking for windows.h... yes
checking for winsock.h... yes
checking for -lkernel32... yes
checking for -lrpcrt4... yes
checking for -lgdi32... yes
creating Makefile
current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader
make DESTDIR= clean
current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/eventmachine-1.0.9.1/ext/fastfilereader
make DESTDIR=
generating fastfilereaderext-x64-mingw32.def
compiling mapper.cpp
compiling rubymain.cpp
In file included from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:8,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/win32.h:41,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/dosish.h:38,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:79,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38,
from rubymain.cpp:26:
C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:64:11: error: reference to 'byte' is ambiguous
64 | typedef byte cs_byte;
| ^~~~
In file included from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:61,
from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39,
from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ios:40,
from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/ostream:38,
from C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/iostream:39,
from rubymain.cpp:22:
~(中略)~
C:/Ruby30-x64/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h:404:30: note: candidates are: 'enum class std::byte'
404 | enum class byte : unsigned char;
| ^~~~
In file included from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:8,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
from C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/win32.h:41,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/internal/dosish.h:38,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/defines.h:79,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby/ruby.h:23,
from C:/Ruby30-x64/include/ruby-3.0.0/ruby.h:38,
from rubymain.cpp:26:
C:/Ruby30-x64/msys64/mingw64/x86_64-w64-mingw32/include/rpcndr.h:63:25: note: 'typedef unsigned char byte'
63 | typedef unsigned char byte;
| ^~~~
make: *** [Makefile:237: rubymain.o] 繧ィ繝ゥ繝シ 1
make failed, exit code 2
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。