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

Cannot run kcc script due to a current profile missing #656

Open
NotBad4U opened this issue May 31, 2021 · 4 comments
Open

Cannot run kcc script due to a current profile missing #656

NotBad4U opened this issue May 31, 2021 · 4 comments

Comments

@NotBad4U
Copy link

I tried to install the c-semantic in my ubuntu Ubuntu 20.04.2 LTS. I followed the INSTALL.md instructions. I got a dist folder with the different compiled semantics in the profiles folder, clang-tools and scripts.

But when I tried to run the command: ./dist/scripts/kcc tests/unitTests/helloworld.c, I got the error:

Couldn't find current profile: please fix /home/alessio/Project/c-semantics/dist/scripts/current-profile.

I put the logs of my build in this gist.

Thank you

@h0nzZik
Copy link
Contributor

h0nzZik commented Jun 1, 2021

I would try building the semantics in docker:

./scripts/docker-build

@dwightguth
Copy link
Member

Looks like the build failed because it rejected your installation of llvm for having the wrong version. I have no idea why though... It is the right version. LLVM shouldn't care about the patch version when comparing compatibility, but maybe llvm 6 is so old that it does? You could try installing llvm 6.0.0 from source and see what happens. I don't really know what else to suggest if @h0nzZik 's suggestion doesn't work.

@NotBad4U
Copy link
Author

NotBad4U commented Jun 9, 2021

Hi @h0nzZik ,

when I try to run the docker command: sudo ./scripts/docker-build, it fails with this error:

Sending build context to Docker daemon  527.7MB
Step 1/14 : FROM runtimeverificationinc/kframework:ubuntu-bionic
 ---> 5a700dd2c3ad
Step 2/14 : RUN     apt-get update -q     &&  apt install --yes libstdc++6 llvm-6.0 clang++-6.0 clang-6.0
 ---> Using cache
 ---> 19a6c48db240
Step 3/14 : RUN    git clone 'https://github.com/z3prover/z3' --branch=z3-4.8.7 && cd z3 && python scripts/mk_make.py                                        && cd build && make -j8  && make install && cd ../.. && rm -rf z3
 ---> Using cache
 ---> 61e87accb017
Step 4/14 : ARG USER_ID=1000
 ---> Using cache
 ---> 8c4e05f6f1e0
Step 5/14 : ARG GROUP_ID=1000
 ---> Using cache
 ---> f9b3bb4149b9
Step 6/14 : RUN usermod -u $USER_ID user
 ---> Running in 1f4f7c15ad25
usermod: UID '0' already exists
The command '/bin/sh -c usermod -u $USER_ID user' returned a non-zero code: 4
Unable to find image 'old-c-semantics:latest' locally
docker: Error response from daemon: pull access denied for old-c-semantics, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

@h0nzZik
Copy link
Contributor

h0nzZik commented Jun 10, 2021

The Dockerfile assumes the user is not root; try running it without sudo. (The current user will need permission to run Docker containers).

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

3 participants