2017-10-01 14 views
2

背景現在
にリンクしながら、パッケージ「のhaskell-GI」のインストールが失敗し、私はコンピュータビジョンを扱うプロジェクトに取り組んでいます。

私は、プログラミング言語としてハスケル
を使用しています。
- GUIを作成するためのGTK +。
- FFmpegは、パスまたはウェブカメラからビデオ/フレームを読み込んで抽出します。
- エッジ検出のためのいくつかのアルゴリズム。Haskellのプラットフォーム/カバル - による「未定義の参照」

私がしたい..
- GTKライブラリの一部である図面エリアウィジェットにビデオ(変更されていない入力ビデオ、変更された出力ビデオ)をレンダリングする。

マイセットアップ
- Windowsの10から64ビット
- MSYS2/MINGW32
- Haskellのプラットフォーム(GHC 8.0.1)
- ffmpegの光-0.12 - 1.24.0.0
派閥版。 0
- GTK-0.14.6

問題
私はGIのバインディングをインストールする必要がGTKと動画をレンダリングするので、私はパッケージをインストールしようとしたために、'haskell-gi'ですが、未定義の参照のためリンクフェーズで失敗します。


cabal install haskell-giを実行した後、私は得る:

C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x19d8): undefined reference to `g_irepository_require' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x1f59): undefined reference to `g_typelib_symbol' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x26f3): undefined reference to `g_irepository_prepend_search_path' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x2bee): undefined reference to `g_base_info_gtype_get_type' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x2f2e): undefined reference to `g_irepository_find_by_name' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x42c7): undefined reference to `g_struct_info_get_field' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x460b): undefined reference to `g_struct_info_get_n_fields' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4775): undefined reference to `g_struct_info_get_size' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4aef): undefined reference to `g_union_info_get_field' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4e33): undefined reference to `g_union_info_get_n_fields' 
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4f9d): undefined reference to `g_union_info_get_size' 
collect2.exe: error: ld returned 1 exit status 
`gcc.exe' failed in phase `Linker'. (Exit code: 1) 
cabal: Leaving directory 'C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3' 
cabal: Error: some packages failed to install: 
haskell-gi-0.20.3 failed during the building phase. The exception was: 
ExitFailure 1 


をこの未定義の参照がGObjectsの一部である.C/.H-ファイルで定義されているメソッドですgobject-introspectionフォルダ。

これまで何を試みましたか?
Gtk2Hsとffmpeg-lightをインストールしていても、私は同様の問題に直面していましたが、私はこれを取り除くことができました..
- 開発用ソースファイルをダウンロードして--extra-include-dirまたは--extra-徒党インストールへのlib-dirのタグ
- 欠落しているライブラリをダウンロードし、PATH
に追加 - - .PC修正ファイルリンカのフラグ(PKG-config設定--libsのGObject-イントロスペクション - 1.0)徒党設定に
を追加します(これはpackage-configの一部です)

上記のオプションは、で動作しませんでした。 'haskell-gi'。私も関連することをSOを検索しましたが、それもうまくいきませんでした。

質問
この問題を乗り越えるにはどうすればいいですか?どんな助けもありがたい。

答えて

1

私はパッケージがWindows上で呼ばれているのか分からないが、Ubuntuの上で、私はcabal以来

sudo apt install libgirepository1.0-dev 
sudo apt install libgtk-3-dev 

で個別にGTKとGIのためのCのlibs /ヘッダをインストールする必要がありました(または私の場合は、 stack)は私のためにこれらをインストールしませんでしたが(私はdifferent error messagesを得ました)。

あなたはすでにこれをやった場合は、言いませんが、https://www.gtk.org/download/windows.phpは、すでにMSYSを持っているので、あなたが

pacman -S mingw-w64-x86_64-gtk3 
pacman -S mingw-w64-x86_64-toolchain base-devel 

をすべきであると言います。

あなたがレポに自分の秘密結社の設定やリンクを投稿することができた場合には役に立つかもしれません。

https://github.com/lettier/movie-monadもあります)