haskell-giでGUIを使いたい
下記サイトを参考にhaskell-giを使用しようとしていますが、コンパイルができません。
https://qiita.com/mimaburao/items/47135e641106e9ba7aa8
発生している問題・エラーメッセージ
[apo@myhostname my-project]$ stack build gi-glib > configure gi-glib > [1 of 2] Compiling Main ( /tmp/stack-eb18c6c9fc8b9f64/gi-glib-2.0.23/Setup.hs, /tmp/stack-eb18c6c9fc8b9f64/gi-glib-2.0.23/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o ) gi-glib > [2 of 2] Compiling StackSetupShim ( /home/apo/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-eb18c6c9fc8b9f64/gi-glib-2.0.23/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o ) gi-glib > Linking /tmp/stack-eb18c6c9fc8b9f64/gi-glib-2.0.23/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ... gi-glib > Unknown GIR element "docsection" when processing namespace "GLib", aborting. gi-glib > CallStack (from HasCallStack): gi-glib > error, called at lib/Data/GI/CodeGen/API.hs:199:16 in haskell-gi-0.23.1-DyiLFcjpbrwKL7LScvAYXe:Data.GI.CodeGen.API Progress 1/9 -- While building package gi-glib-2.0.23 (scroll up to its section to see the error) using: /tmp/stack-eb18c6c9fc8b9f64/gi-glib-2.0.23/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/pkgdb --libdir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/lib --bindir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/bin --datadir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/share --libexecdir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/libexec --sysconfdir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/etc --docdir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/doc/gi-glib-2.0.23 --htmldir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/doc/gi-glib-2.0.23 --haddockdir=/home/apo/.stack/snapshots/x86_64-linux-tinfo6/262746d7d19e0457f757fc79a7c431f1c464c0880093c59fb8b9f9bb7ff9ff9c/8.8.4/doc/gi-glib-2.0.23 --dependency=Cabal=Cabal-3.0.1.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=containers=containers-0.6.2.1 --dependency=haskell-gi=haskell-gi-0.23.1-DyiLFcjpbrwKL7LScvAYXe --dependency=haskell-gi-base=haskell-gi-base-0.23.0-8eZFmSUT7kd6BiSIiRePNX --dependency=haskell-gi-overloading=haskell-gi-overloading-1.0-6w3IXGDooXgu3RA2LfTuf --dependency=text=text-1.2.4.0 --dependency=transformers=transformers-0.5.6.2 --exact-configuration --ghc-option=-fhide-source-paths Process exited with code: ExitFailure 1
該当のソースコード
stack.yaml
resolver: lts-16.18 packages: - .
package.yaml
haskell
1[apo@myhostname my-project]$ cat ./package.yaml 2name: my-project 3version: 0.1.0.0 4github: "githubuser/my-project" 5license: BSD3 6author: "Author name here" 7maintainer: "example@example.com" 8copyright: "2020 Author name here" 9 10extra-source-files: 11- README.md 12- ChangeLog.md 13 14description: Please see the README on GitHub at <https://github.com/githubuser/my-project#readme> 15 16dependencies: 17- base >= 4.7 && < 5 18- gi-gtk 19- haskell-gi-base 20 21library: 22 source-dirs: src 23 24executables: 25 my-project-exe: 26 main: Main.hs 27 source-dirs: app 28 ghc-options: 29 - -threaded 30 - -rtsopts 31 - -with-rtsopts=-N 32 dependencies: 33 - my-project 34 35tests: 36 my-project-test: 37 main: Spec.hs 38 source-dirs: test 39 ghc-options: 40 - -threaded 41 - -rtsopts 42 - -with-rtsopts=-N 43 dependencies: 44 - my-project
Main.hs
haskell
1module Main where 2 3import Lib 4 5main :: IO () 6main = hello
Lib.hs
{-# LANGUAGE OverloadedStrings, OverloadedLabels #-} module Lib ( hello ) where import qualified GI.Gtk as Gtk import Data.GI.Base hello :: IO () hello = do Gtk.init Nothing win <- new Gtk.Window [ #title := "こんにちは" ] on win #destroy Gtk.mainQuit button <- new Gtk.Button [ #label := "おしてね" ] on button #clicked (set button [ #sensitive := False, #label := "押してくれてありがとう、テストは成功しました" ] ) #add win button #showAll win Gtk.main
全てのソースコード
https://github.com/ringo-apo/haskell-gi
試したこと
公式サイトに従い、下記パッケージのインストール済み
sudo pacman -S gobject-introspection gobject-introspection-runtime gtksourceview3 webkit2gtk
補足情報(FW/ツールのバージョンなど)
OS: ArchLinux(VirtualBox内)
よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/10/30 08:12