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

Build error - possibly windows only #17

Open
RussellTaylor83 opened this issue Jan 21, 2019 · 3 comments
Open

Build error - possibly windows only #17

RussellTaylor83 opened this issue Jan 21, 2019 · 3 comments

Comments

@RussellTaylor83
Copy link

RussellTaylor83 commented Jan 21, 2019

Hello,

Firstly, thank you for this repo. When I get it working it'll be a really nice thing to have.

I'm having trouble building under windows, although I'm not sure it's a Windows only issue. I will try on a linux machine tomorrow but I need a dll for windows.

There is a dependency on HSrts, and for the life of me I cannot find it / figure it out. HS means written in C I believe. I have found one google reference to bilding rts yourself but cannot find the source.

Anyone any ideas please?

Thank you

C:\Users\Russ\Documents\src\libpandoc>make
GHC is version 8.6.3
cabal configure
Warning: The configure command is a part of the legacy v1 style of cabal
usage.

Please switch to using either the new project style and the new-configure
command or the legacy v1-configure alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies...
Configuring libpandoc-0.8...
cabal: Missing dependency on a foreign library:
* Missing (or bad) C library: HSrts
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.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

make: *** [main] Error 1
@ShabbyX
Copy link
Owner

ShabbyX commented Jan 21, 2019

Hi,

I don't use windows, so I can hardly tell. But also I have not been working on this project for a few years. I'm sure Pandoc is already way ahead. It looks like cabal is changing too (from your message).

So, first, if you can get things updated (and work on both Linux and windows), please send a PR :)

Regarding HSrts, look inside libpandoc.cabal:

  if !os(windows)
    Ghc-Options:        -dynamic
    extra-libraries:    HSrts-ghc$compiler
  else
    extra-libraries:    HSrts

This commit originally added dynamic linking: 1331f02. At some point when I tried it on windows, I ended up doing this to fix the build: a9f5ac9. Note that even then I got some nonesense dll related crash when running the test which I never figured out how to resolve.

@toroidal-code what was the original reason for doing this? 1331f02

@RussellTaylor83
Copy link
Author

Thank you for getting back to me. Sorry it's been so long, I really need to check commit dates etc. :)

I would be very interested to know what HSrts brings to the party.

I think I have a fair bit of learning to do to get this working again, it's a volunteer project so for now I'll just call out to pandoc itself. But it'd be good to figure this out and give something back. Appreciate your time, thanks.

@ShabbyX
Copy link
Owner

ShabbyX commented Jan 25, 2019

Thank you, looking forwards to learn whatever you find out.

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

2 participants