Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal install pandoc fails due to linker errors with regex-pcre-builtin #1380

Closed
jsw-fnal opened this issue Jun 29, 2014 · 6 comments
Closed

Comments

@jsw-fnal
Copy link

I am attempting to install pandoc on an RHEL5 machine, and I think that I am very close. However, cabal install pandoc fails, reporting lots of linker errors (e.g. undefined reference to _pcre_utf8_table1) just after the output:

Linking dist/build/pandoc/pandoc ...

The linker errors are all coming from the regex-pcre-builtin library (version 0.94.4.8.8.35). I have run cabal update and cabal install --reinstall --force-reinstalls regex-pcre-builtin hightlighting-kate pandoc, to no avail. I've also manually installed the PCRE C library, just in case it was looking for symbols there. Any ideas?

@mpickering
Copy link
Collaborator

Please can you post the full log from the install.

@jsw-fnal
Copy link
Author

I put the log into a gist.

@mpickering
Copy link
Collaborator

Note that highlighting-kate is the package that uses this library,
so first try reinstalling it:

cabal install --reinstall --force highlighting-kate pandoc

If it fails, as a workaround, you might try

cabal install --reinstall --force highlighting-kate pandoc -fpcre-light

This will cause the pcre-light library to be used instead of
regex-pcre-builtin. This requires that you have the C library pcre
installed on your system, which you can do via your package manager.

There is some more information in this thread about the problem if that doesn't work.

@jsw-fnal
Copy link
Author

Well well! Using -fpcre-light after installing the C library pcre seems to have succeeded. (I had already tried force-reinstalling both highlighting-kate and regex-pcre-builtin without affecting the problem.) Do you have any idea why this happened? Are there changes to pandoc's dependencies that could be made to avoid this problem for future users?

@jgm
Copy link
Owner

jgm commented Jul 1, 2014

Well, it's baffling, because I can't reproduce the problem. If you try again with

cabal install --flags "-pcre-light" regex-pcre-builtin highlighting-kate pandoc

does it work?

@jsw-fnal
Copy link
Author

jsw-fnal commented Jul 1, 2014

This (a conda recipe) was what eventually worked:

$ cat pandoc/build.sh 
#!/bin/bash

export LANG="en_US.UTF8"

cabal sandbox init || exit 1
cabal update || exit 2
cabal install -j4 --prefix="$PREFIX" --flags="-support_aesni" cipher-aes || exit 3
cabal install -j4 --prefix="$PREFIX" -fembed_data_files -fpcre-light highlighting-kate --reinstall --extra-lib-dirs="$PREFIX/lib" --extra-include-dirs="$PREFIX/include" || exit 4
cabal install -j4 --prefix="$PREFIX" -fembed_data_files pandoc-1.12.4.2 || exit 5

And, while the sandbox feature is really quite nice, it is not airtight, since it still creates a directory under $HOME and fills it with hundreds of megabytes of package files...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants