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

Missing dependency on a foreign library #15

Open
manzznam opened this issue Jun 30, 2016 · 6 comments
Open

Missing dependency on a foreign library #15

manzznam opened this issue Jun 30, 2016 · 6 comments

Comments

@manzznam
Copy link

manzznam commented Jun 30, 2016

I tried to install the package with CygWin on Windows 10 and got the following error:

Determining GHC version: 8.0.1
cabal.exe: Missing dependency on a foreign library:
* Missing C library: HSrts-ghc8.0.1
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: Leaving directory 'C:\Users\Manfred\AppData\Local\Temp\cabal-tmp-1208\call-haskell-from-anything-1.0.1.0'
cabal: Error: some packages failed to install:
call-haskell-from-anything-1.0.1.0 failed during the configure step. The
exception was:
ExitFailure 1

With the use of Cygwin i solved the problem with the configure script in issue #13.
Where is the location of this HSrts-ghc8.0.1 library by default?

@nh2
Copy link
Owner

nh2 commented Jun 30, 2016

Where is the location of this HSrts-ghc8.0.1 library by default?

Oh well. I'll try to boot up a Windows to answer this question.

@manzznam
Copy link
Author

manzznam commented Jul 3, 2016

In the meantime i tried it also with "stack" tool and "stack install call-haskell-from-anything" and got a similar error only with GHC version 7.10.3.

C:\Users\Manfred>stack install call-haskell-from-anything
Run from outside a project, using implicit global project config
Using resolver: lts-6.5 from implicit global project's config file: C:\Users\Manfred\AppData\Roaming\stack\global-project\stack.yaml
call-haskell-from-anything-1.0.1.0: configure

--  While building package call-haskell-from-anything-1.0.1.0 using:
      C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist\2672c1f3\setup\setup --builddir=.stack-work\dist\2672c1f3 configure --with-ghc=C:\Users\Manfred\AppData\Local\Programs\stack\x86_64-windows\ghc-7.10.3\bin\ghc.exe --with-ghc-pkg=C:\Users\Manfred\AppData\Local\Programs\stack\x86_64-windows\ghc-7.10.3\bin\ghc-pkg.exe --user --package-db=clear --package-db=global --package-db=C:\Users\Manfred\AppData\Roaming\stack\snapshots\bdebfcf9\pkgdb --package-db=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\pkgdb --libdir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\lib --bindir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\bin --datadir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\share --libexecdir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\libexec --sysconfdir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\etc --docdir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\doc\call-haskell-from-anything-1.0.1.0 --htmldir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\doc\call-haskell-from-anything-1.0.1.0 --haddockdir=C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\install\793afecd\doc\call-haskell-from-anything-1.0.1.0 --dependency=base=base-4.8.2.0-14035a44a8b95c6832da6dae1420f59e --dependency=bytestring=bytestring-0.10.6.0-342400f3bb78fee60dde2cecf10f8e3b --dependency=msgpack=msgpack-1.0.0-989da699a2ef20d7beb2a27a39f7d221 --dependency=mtl=mtl-2.2.1-b85491d29485f54f395006786223e6a0 --dependency=template-haskell=template-haskell-2.10.0.0-bcb07fec12f32563bb45d7fb009640b1 --dependency=vector=vector-0.11.0.0-2ce50bc0eff5c877562e8cc16c8366f6 --extra-include-dirs=C:\Users\Manfred\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\Manfred\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Manfred\AppData\Roaming\stack\global-project\.stack-work\logs\call-haskell-from-anything-1.0.1.0.log

    [1 of 1] Compiling Main             ( C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\Setup.hs, C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist\2672c1f3\setup\Main.o )
    Linking C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist\2672c1f3\setup\setup.exe ...
    Configuring call-haskell-from-anything-1.0.1.0...
    Determining GHC version: 7.10.3
    setup.exe: Missing dependency on a foreign library:
    * Missing C library: HSrts-ghc7.10.3
    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.

@jchia
Copy link

jchia commented Aug 8, 2016

I don't think it's Windows-specific. I get the same problem with GHC 8.0.1 on Linux, and adding extra-lib-dirs and extra-include-dirs to .stack/config.yaml didn't help.

@mgsloan
Copy link

mgsloan commented Aug 8, 2016

@nh2
Copy link
Owner

nh2 commented Aug 8, 2016

@jchia How do you try with GHC 8, what version of https://hackage.haskell.org/package/msgpack do you use?

@jchia
Copy link

jchia commented Aug 9, 2016

@nh2 I used a patched version of the the msgpack/msgpack-haskell on github:
jchia/msgpack-haskell@64485b7

This is a project setup that has the build error:
https://gist.github.com/jchia/09e631bdd44351f7772f3892f4a9f651

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

4 participants