问题
Perhaps this is stupid but I'm unable to find out which package I have to install in Cygwin to fix the following missing libraries:
config.status: creating unix.buildinfo config.status: creating include/HsUnixConfig.h cabal.exe: Missing dependencies on foreign libraries: * Missing header file: HsUnix.h * Missing C libraries: rt, dl
Any ideas or how do you generally find out which package to install when you get feedback that file xxx is missing (I remember that in gentoo this was quite straightforward)...
回答1:
I have been having this problem and I just found this.
http://www.haskell.org/haskellwiki/Windows#Tools_for_compilation
回答2:
On "weird" systems, librt and libdl are provided by libc directly and we can't link to them directly.
There was a recent patch to the unix library that should address this: https://ghc.haskell.org/trac/ghc/ticket/8713 https://github.com/haskell/unix/pull/8
That said, this may not be sufficient to let you install unix
on cygwin
-- for years it was considered simply a case of "don't do that then" (i.e. if you want to run on windows, port it to use the appropriate functions from the windows libraries instead, and if you want to use both then use CPP).
来源:https://stackoverflow.com/questions/1465426/libraries-rt-and-dl-in-cygwin