A. Let's do the clean installation of pandoc on Windows. Cabal tell us that something went wrong
>cabal install regex-pcre-builtin
Resolving dependencies...
Downloading regex-pcre-builtin-0.94.4.1.8.31...
Configuring regex-pcre-builtin-0.94.4.1.8.31...
cabal: Missing dependency on a foreign library:
* Missing C library: pcre
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
regex-pcre-builtin-0.94.4.1.8.31 failed during the configure step. The
exception was:
ExitFailure 1
regex-pcre-builtin-0.94.4.1.8.31 could not pass build, even cabal config.
Dependencies: pandoc -> highlighting-kate -> regex-pcre-builtin
- Get the source tar ball of pcre-8.31 from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/, and extract it into a directory.
- Get the source tar ball of regex-pcre-builtin-0.94.4.1.8.31 from hackage, and extract it into a directory.
- Remove all files in the directory of regex-pcre-builtin-0.94.4.1.8.31\pcre.
- According to pcre-8.31\NON-AUTOTOOLS-BUILD, copy the required files for building as follows:
- copy pcre-8.31\config.h.generic as regex-pcre-builtin-0.94.4.1.8.31\pcre\config.h
- copy pcre-8.31\pcre.h.generic as regex-pcre-builtin-0.94.4.1.8.31\pcre\prec.h
- copy the files so that regex-pcre-builtin-0.94.4.1.8.31 contains the foloowing files:
pcre/pcreposix.c
pcre/pcreposix.h
pcre/pcre_byte_order.c
pcre/pcre_chartables.c
pcre/pcre_compile.c
pcre/pcre_config.c
pcre/pcre_dfa_exec.c
pcre/pcre_exec.c
pcre/pcre_fullinfo.c
pcre/pcre_get.c
pcre/pcre_globals.c
pcre/pcre_internal.h
pcre/pcre_jit_compile.c
pcre/pcre_maketables.c
pcre/pcre_newline.c
pcre/pcre_ord2utf8.c
pcre/pcre_refcount.c
pcre/pcre_string_utils.c
pcre/pcre_study.c
pcre/pcre_tables.c
pcre/pcre_ucd.c
pcre/pcre_valid_utf8.c
pcre/pcre_version.c
pcre/pcre_xclass.c
pcre/sljit/sljitConfig.h
pcre/sljit/sljitConfigInternal.h
pcre/sljit/sljitExecAllocator.c
pcre/sljit/sljitLir.c
pcre/sljit/sljitLir.h
pcre/sljit/sljitNativeARM_Thumb2.c
pcre/sljit/sljitNativeARM_v5.c
pcre/sljit/sljitNativeMIPS_32.c
pcre/sljit/sljitNativeMIPS_common.c
pcre/sljit/sljitNativePPC_32.c
pcre/sljit/sljitNativePPC_64.c
pcre/sljit/sljitNativePPC_common.c
pcre/sljit/sljitNativeX86_32.c
pcre/sljit/sljitNativeX86_64.c
pcre/sljit/sljitNativeX86_common.c
pcre/sljit/sljitUtils.c
pcre/ucp.h
- rewrite regex-pcre-builtin.cabal as follows:
$ diff regex-pcre-builtin.cabal regex-pcre-builtin-0.94.4.1.8.31/regex-pcre-builtin.cabal
19c19,61
< pcre/config.h pcre/pcre.h pcre/pcre_byte_order.c pcre/pcre_compile.c pcre/pcre_config.c pcre/pcre_dfa_exec.c pcre/pcre_exec.c pcre/pcre_fullinfo.c pcre/pcre_get.c pcre/pcre_globals.c pcre/pcre_internal.h pcre/pcre_jit_compile.c pcre/pcre_jit_test.c pcre/pcre_maketables.c pcre/pcre_newline.c pcre/pcre_ord2utf8.c pcre/pcre_printint.c pcre/pcre_refcount.c pcre/pcre_scanner.h pcre/pcre_string_utils.c pcre/pcre_study.c pcre/pcre_tables.c pcre/pcre_ucd.c pcre/pcre_valid_utf8.c pcre/pcre_version.c pcre/pcre_xclass.c pcre/pcrecpp.h pcre/pcrecpp_internal.h pcre/pcreposix.h pcre/ucp.h
---
> pcre/config.h
> pcre/pcre.h
> pcre/pcreposix.c
> pcre/pcreposix.h
> pcre/pcre_byte_order.c
> pcre/pcre_chartables.c
> pcre/pcre_compile.c
> pcre/pcre_config.c
> pcre/pcre_dfa_exec.c
> pcre/pcre_exec.c
> pcre/pcre_fullinfo.c
> pcre/pcre_get.c
> pcre/pcre_globals.c
> pcre/pcre_internal.h
> pcre/pcre_jit_compile.c
> pcre/pcre_maketables.c
> pcre/pcre_newline.c
> pcre/pcre_ord2utf8.c
> pcre/pcre_refcount.c
> pcre/pcre_string_utils.c
> pcre/pcre_study.c
> pcre/pcre_tables.c
> pcre/pcre_ucd.c
> pcre/pcre_valid_utf8.c
> pcre/pcre_version.c
> pcre/pcre_xclass.c
> pcre/sljit/sljitConfig.h
> pcre/sljit/sljitConfigInternal.h
> pcre/sljit/sljitExecAllocator.c
> pcre/sljit/sljitLir.c
> pcre/sljit/sljitLir.h
> pcre/sljit/sljitNativeARM_Thumb2.c
> pcre/sljit/sljitNativeARM_v5.c
> pcre/sljit/sljitNativeMIPS_32.c
> pcre/sljit/sljitNativeMIPS_common.c
> pcre/sljit/sljitNativePPC_32.c
> pcre/sljit/sljitNativePPC_64.c
> pcre/sljit/sljitNativePPC_common.c
> pcre/sljit/sljitNativeX86_32.c
> pcre/sljit/sljitNativeX86_64.c
> pcre/sljit/sljitNativeX86_common.c
> pcre/sljit/sljitUtils.c
> pcre/ucp.h
69c111
< Extra-Libraries: pcre
---
> --Extra-Libraries: pcre
75c117,138
< pcre/pcre_byte_order.c pcre/pcre_compile.c pcre/pcre_config.c pcre/pcre_dfa_exec.c pcre/pcre_exec.c pcre/pcre_fullinfo.c pcre/pcre_get.c pcre/pcre_globals.c pcre/pcre_jit_compile.c pcre/pcre_jit_test.c pcre/pcre_maketables.c pcre/pcre_newline.c pcre/pcre_ord2utf8.c pcre/pcre_printint.c pcre/pcre_refcount.c pcre/pcre_string_utils.c pcre/pcre_study.c pcre/pcre_tables.c pcre/pcre_ucd.c pcre/pcre_valid_utf8.c pcre/pcre_version.c pcre/pcre_xclass.c
---
> pcre/pcreposix.c
> pcre/pcre_byte_order.c
> pcre/pcre_chartables.c
> pcre/pcre_compile.c
> pcre/pcre_config.c
> pcre/pcre_dfa_exec.c
> pcre/pcre_exec.c
> pcre/pcre_fullinfo.c
> pcre/pcre_get.c
> pcre/pcre_globals.c
> pcre/pcre_jit_compile.c
> pcre/pcre_maketables.c
> pcre/pcre_newline.c
> pcre/pcre_ord2utf8.c
> pcre/pcre_refcount.c
> pcre/pcre_string_utils.c
> pcre/pcre_study.c
> pcre/pcre_tables.c
> pcre/pcre_ucd.c
> pcre/pcre_valid_utf8.c
> pcre/pcre_version.c
> pcre/pcre_xclass.c
- "cabal configure" and "cabal build" in the directory of regex-pcre-builtin-0.94.4.1.8.31 in order to confirm that your task has been successfully completed.
- "cabal clean" and move to the parent directory, then "tar czf regex-pcre-builtin-0.94.4.1.8.31".
- Place the tarball you created in C:\Users\YourName\AppData\Roaming\cabal\packages\hackage.haskell.org\regex-pcre-builtin\0.94.4.1.8.31.
- Retry the installation of pandoc.