-
Notifications
You must be signed in to change notification settings - Fork 40
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
Builds and a.out should find krun in $PATH #483
Comments
The build system is currently in a state of flux and the From a clean Ubuntu 18.04 (without K), I think this is a summary of all of the steps to build the current master (@charala1 let me know if I'm missing something):
|
Complementing Chris' response, the complete list of packages that we currently use to test the semantics (on Ubuntu 18.04) is:
You will also need these
Clone the repository:
If you face java version compatibility issues with the
(and then re-run the above At this point, you have a working installation of To compile the semantics, you can now run
This will build everything in the cloned directory under |
I built c-semantics on a computer running Ubuntu 18.04 and found some problems with file paths.
I followed INSTALL.md. In step 3 "Install K" I ran into some difficulties building K, then noticed that the instructions for installing K in Windows said to install a K deb file from https://github.com/kframework/k/releases into an Ubuntu WSL package. So I installed the deb in my Ubuntu system. The deb installed /usr/bin/kompile and /usr/bin/krun, and of course /usr/bin is in my $PATH.
Problem 1: in step 7 "Build our C tool", "
make
" produced this error:The build looks for kompile in a specific (and to mind, odd) place instead of finding it in $PATH, even though INSTALL.md instructed me to include it in my $PATH.
Problem 2: I tried to work around this by running "
make K_BIN=/usr/bin
". That produced... and eventually caused a "disk full" error because it was trying to copy all of /usr into my workspace. This was caused by Makefile's line 39,
K_DIST := $(realpath $(K_BIN)/..)
.I couldn't figure out what it was supposed to be copying out of K_DIST, so I tried running "
make K_BIN=/usr/bin K_DIST=
". That seemed to work.Problem 3: INSTALL.md says to execute
dist/kcc tests/unitTests/helloworld.c
. That C file doesn't exist.Problem 4: I compiled hello.C instead.
The generated a.out isn't looking for krun in $PATH. Apparently the environment variable K_BIN must be set when kcc runs.
The text was updated successfully, but these errors were encountered: