Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2.0-pre2の32bit版が動かない。 #30

Open
raccy opened this issue Jul 25, 2017 · 9 comments
Open

v2.2.0-pre2の32bit版が動かない。 #30

raccy opened this issue Jul 25, 2017 · 9 comments
Labels

Comments

@raccy
Copy link
Owner

raccy commented Jul 25, 2017

21:41:44.736: LoadLibrary failed for '../../obs-plugins/32bit/rtmp-nicolive.dll': %1 is not a valid Win32 application.
21:41:44.736:  (193)
21:41:44.736: Module '../../obs-plugins/32bit/rtmp-nicolive.dll' not found

fileコマンドでは PE32 executable (DLL) (console) Intel 80386, for MS Windowsと認識しているので、正常なWin32だとは思うんですが、mingw-w64の問題なのかなー、ちょっとわからない状態です。

@raccy raccy added the bug label Jul 25, 2017
@raccy
Copy link
Owner Author

raccy commented Jul 29, 2017

libwinpthread-1.dllの依存関係が原因でした。

C++ STLのstd::threadを使っているんですけど、pthreadを使ってしまっている様子。Windowsのnativeに変更できないか調べています。

@shousa
Copy link
Contributor

shousa commented Jul 30, 2017 via email

@shousa
Copy link
Contributor

shousa commented Jul 30, 2017

msys2のpacmanで構築した場合は、
Alexpuxは以下の構成で提供すると言っていますね。
32-bit: threads=posix, exceptions=dwarf
64-bit: threads=posix, exceptions=seh

@shousa
Copy link
Contributor

shousa commented Jul 30, 2017

TDM-GCC環境は、自分では試したことはないですが、
以下のURLではこういう記述があります。

「MinGW-w64 のもうひとつの実装である TDM-GCC では,
スレッドモデルには posix,例外処理には SJLJ(32bit)または SEH(64bit)
が設定されているようだ。」

http://qiita.com/spiegel-im-spiegel/items/ba4e8d2418bdfe0c8049

@shousa
Copy link
Contributor

shousa commented Jul 31, 2017

配布版バイナリに関して、うちのWindows10環境では、
32bit版だけでなく、64bit版も認識しませんでした。

dumpbin /dependentsの結果は、
KERNEL32.dll
msvcrt.dll
libwinpthread-1.dll
obs.dll
libcurl.dll
でした。

@shousa
Copy link
Contributor

shousa commented Jul 31, 2017

自前ビルド版の場合は、
32-bit: threads=win32, exceptions=dwarf
64-bit: threads=win32, exceptions=seh
で構築したmsys環境を使用しているため、
libwinpthread-1.dllの依存関係はなく、
問題なく使用できていました。

@shousa
Copy link
Contributor

shousa commented Jul 31, 2017

試しにposix版のmingwのbin配下にあるlibwinpthread-1.dllの32bit版と64bit版のdllを、
rtmp-nicolive.dllの32bit版と64bit版のそれぞれの存在しているフォルダにコピーすると、
ニコ生プラグインを認識しました。

@shousa
Copy link
Contributor

shousa commented Aug 16, 2017

LoadLibrary failed for '../../obs-plugins/32bit/rtmp-nicolive.dll': %1 is not a valid Win32 application.

上記のメッセージに関して、追加の情報です。
GCCでビルドした libcurl.dll の 7.55.1 をベースにして、
VS2015でビルドした rtmp-nicolive.dll の「32bit版」を「OBS公式版」に組み込むと出ました。

[OBS公式版に組み込む場合]
・libcurl.dll はGCCでビルド
・rtmp-nicolive.dll はVS2015でビルド
(1) libcurl 7.55.0 をベースにした rtmp-nicolive.dll の64bit版は、問題なく認識した。[OK]
(2) libcurl 7.55.0 をベースにした rtmp-nicolive.dll の32bit版は、問題なく認識した。[OK]
(3) libcurl 7.55.1 をベースにした rtmp-nicolive.dll の64bit版は、問題なく認識した。[OK]
(4) libcurl 7.55.1 をベースにした rtmp-nicolive.dll の32bit版は、認識しなかった。[NG]

[ビルド版で同時に生成する場合]
・libcurl.dll はGCCでビルド
・rtmp-nicolive.dll はVS2015でビルド
(1) libcurl 7.55.0 をベースにした rtmp-nicolive.dll の64bit版は、問題なく認識した。[OK]
(2) libcurl 7.55.0 をベースにした rtmp-nicolive.dll の32bit版は、問題なく認識した。[OK]
(3) libcurl 7.55.1 をベースにした rtmp-nicolive.dll の64bit版は、問題なく認識した。[OK]
(4) libcurl 7.55.1 をベースにした rtmp-nicolive.dll の32bit版は、問題なく認識した。[OK]

@shousa
Copy link
Contributor

shousa commented Aug 16, 2017

最新のcurl 7.55.1でビルドしたら、
スレッドモデルwin32のmingw環境なのに、
libwinpthread-1.dll への依存が発生したので、
curlビルド時のconfigureのオプションに
--disable-pthreads
を追加してみたらその依存性が消えたので、
その状態でのバイナリをもとに試しています。

curl の 7.55.0 と 7.55.1 で挙動が変わったのは、
curl/curl@d86e918
の影響と思われます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants