OS X上的Helm安装失败

时间:2014-11-24 19:42:34

标签: haskell cabal

我已经尝试了几个小时来安装Helm,我无法弄明白。我按照这里的说明进行操作:http://helm-engine.org/guide/installing/。其全部输出位于底部。我遇到过几个与我的问题herehere类似的案例,但解决方案不起作用。有没有办法在OS X Yosemite上安装Helm?

输出:

helm-test~ cabal sandbox init
Writing a default package environment file to
/Users/marcusbuffett/Documents/programming/playground/helm-test/cabal.sandbox.config
Creating a new sandbox at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
helm-test~ brew install sdl2
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/sdl2-2.0.3.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/sdl2-2.0.3.yosemite.bottle.1.tar.gz
==> Pouring sdl2-2.0.3.yosemite.bottle.1.tar.gz
  /usr/local/Cellar/sdl2/2.0.3: 75 files, 3.9M
helm-test~ brew install cairo --without-x
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cairo-1.14.0.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cairo-1.14.0.yosemite.bottle.1.tar.gz
==> Pouring cairo-1.14.0.yosemite.bottle.1.tar.gz
  /usr/local/Cellar/cairo/1.14.0: 106 files, 6.4M
helm-test~ brew install pango --without-x
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pango-1.36.8.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/pango-1.36.8.yosemite.bottle.1.tar.gz
==> Pouring pango-1.36.8.yosemite.bottle.1.tar.gz
  /usr/local/Cellar/pango/1.36.8: 132 files, 4.8M
helm-test~ cabal update
Downloading the latest package list from hackage.haskell.org
helm-test~ cabal install gtk2hs-buildtools
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
Configuring hashtables-1.1.2.1...
Building hashtables-1.1.2.1...
Installed hashtables-1.1.2.1
Configuring gtk2hs-buildtools-0.13.0.3...
Building gtk2hs-buildtools-0.13.0.3...
Installed gtk2hs-buildtools-0.13.0.3
helm-test~ cabal install helm
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
Configuring sdl2-1.3.0...
Configuring transformers-base-0.4.3...
Configuring utf8-string-0.3.8...
Building utf8-string-0.3.8...
Building transformers-base-0.4.3...
Building sdl2-1.3.0...
Installed transformers-base-0.4.3
Configuring elerea-2.8.0...
Building elerea-2.8.0...
Installed utf8-string-0.3.8
Configuring cairo-0.13.0.5...
Configuring glib-0.13.0.6...
Failed to install cairo-0.13.0.5
Build log ( /Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox/logs/cairo-0.13.0.5.log ):
[1 of 2] Compiling SetupWrapper     ( /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/SetupWrapper.hs, /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/setup.hs, /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/Main.o )
Linking /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring cairo-0.13.0.5...
setup: Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
Building glib-0.13.0.6...
Installed elerea-2.8.0
Installed glib-0.13.0.6
Installed sdl2-1.3.0
cabal: Error: some packages failed to install:
cairo-0.13.0.5 failed during the configure step. The exception was:
ExitFailure 1
helm-0.6.0 depends on cairo-0.13.0.5 which failed to install.
pango-0.13.0.4 depends on cairo-0.13.0.5 which failed to install.

2 个答案:

答案 0 :(得分:6)

你的问题在这里:

Configuring cairo-0.13.0.5...
setup: Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found

如果您已安装XQuartx,则所需文件(xcb-shm.pc等)位于/opt/X11/lib/pkgconfig

我首先设置了cairopango

export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig

更新

我尝试针对helm-0.6.0构建pango-0.13.0.3时出现编译错误。这就是我最终能够成功构建的方式:

  1. cabal get helm-0.6.0
  2. cd helm-0.6.0
  3. 修改helm.cabal并将glib添加到第一个build-depends部分
  4. 对文件src/FTP/Helm.hs进行以下编辑:
    • 第222行:将paFamily = textTypeface更改为paFamily = stringToGlib textTypeface
    • 添加导入:import System.Glib.UTFString (stringToGlib)
  5. cabal configure
  6. cabal install

答案 1 :(得分:0)

除了user5402所说的,你还需要手动安装sdl2-1.2.0。最新版本(1.3.0)目前与helm不兼容。