使用cabal为ghc haskell安装cairo后端的问题

时间:2013-11-27 13:46:16

标签: macos haskell ghc cabal cairo

我在运行os x 10.9的mac上使用cabal安装ghc的cairo后端时遇到了一些问题。看起来pkg-config中缺少cairo-pdf包。我曾尝试使用自制程序重新安装pkg-config但它似乎没有改变任何东西。 cabal的输出如下:

andylawrence$ cabal install Cairo
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/cairo-0.12.4-98407/cairo-0.12.4/SetupWrapper.hs, /var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/cairo-0.12.4-98407/cairo-0.12.4/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/cairo-0.12.4-98407/cairo-0.12.4/Setup.hs, /var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/cairo-0.12.4-98407/cairo-0.12.4/dist/setup/Main.o )
Linking /var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/cairo-0.12.4-98407/cairo-0.12.4/dist/setup/setup ...

Gtk2HsSetup.hs:107:59:
     warning: missing terminating ' character [-Winvalid-pp-token]
        -- If there are several .dll files matching the one we're after then we
                                                              ^

Gtk2HsSetup.hs:145:50:
     warning: missing terminating ' character [-Winvalid-pp-token]
             -> RegisterFlags -- ^Install in the user's database?; verbose
                                                     ^

Gtk2HsSetup.hs:210:41:
     warning: missing terminating ' character [-Winvalid-pp-token]
      -- have the header file name if we don't have the precompiled header yet
                                            ^

Gtk2HsSetup.hs:249:40:
     warning: missing terminating ' character [-Winvalid-pp-token]
      mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi] . toFilePath)
                                           ^

Gtk2HsSetup.hs:293:28:
     warning: missing terminating ' character [-Winvalid-pp-token]
                     , let name' = filter isAlpha (display name)
                               ^

Gtk2HsSetup.hs:294:31:
     warning: missing terminating ' character [-Winvalid-pp-token]
                     , tag <- name'
                                  ^

Gtk2HsSetup.hs:295:33:
     warning: missing terminating ' character [-Winvalid-pp-token]
                            : [ name' ++ "-" ++ show major ++ "." ++ show digit
                                    ^
7 warnings generated.
[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.12.4...

/var/folders/cb/1j0fjp2n4x12b8tfg2cz64vm0000gn/T/98471.c:1:12:
     warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
           ^
1 warning generated.
setup: The pkg-config package cairo-pdf is required but it could not be found.
Failed to install cairo-0.12.4
cabal: Error: some packages failed to install:
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

pkg-config只是一个工具,可以告诉您是否安装了本机(即非Haskell)软件包(以及它的配置是什么,用于编译目的)。您需要安装cairo-pdf(可能是一个单独的软件包,或者它可能是构建本机cairo时需要启用的选项,我不确定。或者可能只是你没有安装了原生的cairo。)

相关问题