在regex-pcre-builtin中编译libpandoc和对utf8_table4的未定义引用

时间:2013-06-28 09:04:48

标签: c haskell

我正在尝试将libpandoc更新到更新的版本(1.10以上),并且我已经修复了所有代码(基本上ParserState必须更改为ReaderOptions并更新默认设置)。

但是,在构建期间,我收到以下错误:

  

加载包regex-pcre-builtin-0.94.4.6.8.31 ...链接... ghc:/home/XXXX/.cabal/lib/regex-pcre-builtin-0.94.4.6.8.31/ghc-7.4 .1 / HSregex-pcre-builtin-0.94.4.6.8.31.o:未知符号`utf8_table4'

  ghc:无法加载包`regex-pcre-builtin-0.94.4.6.8.31'

尝试重新安装regex-pcre-builtin我得到:

$ cabal install regex-pcre-builtin --reinstall
Resolving dependencies...
In order, the following would be installed:
regex-pcre-builtin-0.94.4.6.8.31 (reinstall)
cabal: The following packages are likely to be broken by the reinstalls:
highlighting-kate-0.5.4
pandoc-1.11.1
Use --force-reinstalls if you want to install anyway.

其中说重新安装实际上可能会破坏pandoc本身。

我对Haskell很陌生,而且我在Google上搜索regex-pcre-builtinutf8_table4的所有搜索都会在hpaste.org上发布帖子,其中人们粘贴了相同的错误。

如何解决此问题?在这种情况下我应该寻找什么?


编辑:这是有问题的代码:

{-# LANGUAGE TemplateHaskell #-}

module LibPandoc.Instances where

import Data.Data
import Data.DeriveTH
import Text.Pandoc
import Text.Pandoc.Shared

$( derive makeTypeable ''ReaderOptions )
$( derive makeData ''ReaderOptions )
$( derive makeTypeable ''WriterOptions )
$( derive makeData ''WriterOptions )
$( derive makeTypeable ''HTMLMathMethod )
$( derive makeData ''HTMLMathMethod )
$( derive makeTypeable ''ObfuscationMethod )
$( derive makeData ''ObfuscationMethod )

1 个答案:

答案 0 :(得分:1)

我最近也遇到过这个问题,它似乎是最新版本中的一个错误。您可以使用以前的版本解决此问题,例如:

ghc-pkg unregister regex-pcre-builtin
cabal install regex-pcre-builtin-0.94.4.5.8.31