New comment by Eluminae on void-packages repository https://github.com/void-linux/void-packages/pull/20136#issuecomment-599730646 Comment: > I don't see the whole error in your last comment so I can't tell exactly but, Stack doesn't have to have the package you're trying to build it has to have all it's dependencies and it's not the case for matterhorn anyway so that won't work. Yeah I just tried to play with the lts stack variable without understanding what I was doing, stucked on the "omg it miss all of those dependencies" step. > The error you get with cabal is caused by it being built as a dynamically linked binary, all the haskell libraries are being linked dynamicaly, and then you don't include them in the package, xbps goest to search for them and then it tells you it couldn't find any package providing those libraries. The solution is (since those libraries wouldn't be useful to anything else) is to link the binary statically. > > This made it build properly > ``` > diff --git a/srcpkgs/matterhorn/template b/srcpkgs/matterhorn/template > index 83dbcd0aac..95681b649c 100644 > --- a/srcpkgs/matterhorn/template > +++ b/srcpkgs/matterhorn/template > @@ -16,7 +16,7 @@ nopie_files="/usr/bin/matterhorn" > do_build() { > rm -f cabal.project > cabal new-update > - cabal new-build -j --enable-shared --enable-executable-dynamic --ghc-options=-dynamic > + cabal new-build --jobs="${XBPS_MAKEJOBS}" --disable-executable-dynamic > } > > do_install() { > ``` Oh yeah, it feels always better when you understand what your doing. Thanks a lot for you help, you made it working! > but there are more things that should be fixed about your template, definitely installing with `vbin "$(find ...)"` is a bad idea, either change it to the exact location of the output binary or better use the `cabal new-install` subcommand if it's possible to give it a `$DESTDIR`. I agree, I'll try something better. It seems there is a destdir cabal argument but I think using the bin path a more minimalist way (but the full path is horrible x)) Thanks again for your help!