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

How I managed to install kexc #18

Open
alemuller opened this issue Nov 9, 2021 · 0 comments
Open

How I managed to install kexc #18

alemuller opened this issue Nov 9, 2021 · 0 comments

Comments

@alemuller
Copy link

alemuller commented Nov 9, 2021

Don't waste your time with cabal (you did, didn't you?). Use stack as suggested in #9.

I installed stack with my distro's package manager.

I had some minor issues with stack (described bellow). To avoid them:

  1. Make sure $PREFIX is set to some local directory.
export PREFIX=`${HOME}/.local/share`
  1. Add this import declaration to src/KMC/Kleenex/Actions.hs.
import Data.Semigroup

Now, on the the directory ./kleenexlang, run:

stack setup
stack build
stack exec env # Not sure if this is needed

Then, to run kexc with stack:

stack exec kexc

The binary is installed in a hidden folder at ./kleenexlang/.stack-work/install/*/*/*/bin.

It it doesn't work, build again.


If you don't set $PREFIX, stack will try (and fail) to install at /usr/bin. Running sudo make install on the some exotic directory will install it. But this only causes more problem, stack will know it is installed, but will refuses to use (or to build again).

I had to delete ${HOME}/.stack/programs/x86_64-linux/ghc-tinfo6-8.0.1.installed for be able to try again (this time with $PREFIX).

If you don't add the import, the compilation will fail with this error:

[15 of 37] Compiling KMC.Kleenex.Actions ( src/KMC/Kleenex/Actions.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-1.24.0.0/build/KMC/Kleenex/Actions.o )

src/KMC/Kleenex/Actions.hs:40:10: error:
    Not in scope: type constructor or class `Semigroup'
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

1 participant