stack documentation

38 views
Skip to first unread message

Shajen m

unread,
Jun 29, 2016, 2:57:13 PM6/29/16
to haskell-stack
The stack documentation is very good and useful. It was easy for me to try out creating and running simple projects.

One topic I like to add in the documentation is that how resolve a projects dependency on system library. After reading the stack documentation
I tried out some packages which has dependency on OpenGL graphics. The stack was giving many error messages on installation failed because of missing openGL library in my Ubuntu system. It was not easy for me to figure out that the  errors are because of missing linux system library and which version is the package depending on.

It would be great if you add a section on how to resolve system library dependencies of a haskell package

Thanks
-Shajen

Erik Rantapaa

unread,
Jul 9, 2016, 5:55:21 PM7/9/16
to haskell-stack

On Wednesday, June 29, 2016 at 1:57:13 PM UTC-5, Shajen m wrote:
...


It would be great if you add a section on how to resolve system library dependencies of a haskell package

I agree - there should be an easy way for users to resolve missing library issues.

In order to build an entire resolver I had to figure out a bunch of missing libraries, and I've put my accumulated knowledge in this repo:


The repo contains a script - analyze-log - which can scan the output of a cabal build or stack build command and suggest which packages you should install to resolve errors related to missing libraries. Right now it know about Ubuntu packages, but the system could be extended to other Linux variants and even other packaging systems, e.g. rpms, brew, macports, etc.

Simon Jakobi

unread,
Jul 13, 2016, 5:14:37 PM7/13/16
to Erik Rantapaa, haskell-stack
Hi!

2016-07-09 23:55 GMT+02:00, Erik Rantapaa <eran...@gmail.com>:
> In order to build an entire resolver I had to figure out a bunch of missing
>
> libraries, and I've put my accumulated knowledge in this repo:
>
> https://github.com/erantapaa/hackage-helper

This is useful info, thanks Erik!

I have found an idea in stack's issue tracker that might be interesting for you:

>> However, maybe it's within the scope
>> of Cabal to allow meta-data which can give suggestions for library
>> installation? If such meta-data existed, I'd be in favor of stack
>> displaying it.
>
> You can use the pkgconfig-depends field of Cabal for showing external
> dependencies. An automated tool could scan available packages of Ubuntu or
> Debian or MSYS/Arch for the according .pc files.

(https://github.com/commercialhaskell/stack/issues/1384#issuecomment-158613465)

Installation recommendations for system libraries would be a very cool
addition to stack!
Reply all
Reply to author
Forward
0 new messages