evincarofautumn / kitten

A statically typed concatenative systems programming language.
http://kittenlang.org/
Other
1.1k stars 42 forks source link

Can't run kitten outside of source directory #207

Open antoyo opened 6 years ago

antoyo commented 6 years ago

Hi. I get the following error when trying to run kitten outside of the source directory:

kitten: common.ktn: openBinaryFile: does not exist (No such file or directory)

(It works fine when running from the source directory.) I followed the instruction from here for building and installation. Thanks to fix this issue.

evincarofautumn commented 6 years ago

I’ve added a note to the installation instructions:

Currently, you will also need to manually copy the standard library, referred to as the common vocabulary, common.ktn, to the same location.

This is due to a deficiency in Stack’s support of Cabal’s data-files feature, where if you install data files (such as common.ktn) with stack install, they’ll have the wrong path prefix: it searches for them in the build directory instead of the install location. So I haven’t been using data-files as a result.

I’ll see if I can add support for this with Cabal builds and add instructions for installing using Cabal, although ideally we’d be able to do everything through just Stack. If I can’t get that to work, I’ll just add a Makefile with a make install target.

evincarofautumn commented 6 years ago

This should be fixed in 4712cfe196df3301e2c69855ffc7f7de557f4af8 and I will update the instructions in the book as well. Please confirm that this works for you so I can close this.