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

RHEL8 Install #35

Open
lwli11 opened this issue Jun 19, 2024 · 9 comments
Open

RHEL8 Install #35

lwli11 opened this issue Jun 19, 2024 · 9 comments

Comments

@lwli11
Copy link

lwli11 commented Jun 19, 2024

Please feel free to ignore this if CN is not intended to support RHEL.

Installing on CN works according to: https://github.com/rems-project/cerberus/blob/master/backend/cn/INSTALL.md until 'make install'.

$ make install
[DUNE] cerberus
[DUNE] install cerberus
Error: The mandir installation directory is unknown.
Hint: It can be specified with '--prefix' or by setting '--mandir'
make: *** [Makefile:294: install] Error 1

@podhrmic
Copy link
Contributor

Would running CN in a docker container work for you? See https://github.com/rems-project/cerberus?tab=readme-ov-file#docker-image

@lwli11
Copy link
Author

lwli11 commented Jun 21, 2024

It should! To confirm, which of deps/release/dev-env should I pick?

$ make -f Makefile_docker
targets: deps|release|dev-env

Thanks!

@podhrmic
Copy link
Contributor

We have been using the release image:

make -f Makefile_docker release

@lwli11
Copy link
Author

lwli11 commented Jun 24, 2024

Thanks! I seem to run into an issue. Have you seen this before?:
STEP 12/13: RUN eval opam env && make install && make install_cn
WARN[0012] Failed to mount subscriptions, skipping entry in /usr/share/containers/mounts.conf: getting host subscription data: failed to read subscriptions from "/usr/share/rhel/secrets": open /usr/share/rhel/secrets/rhsm/rhsm.conf: permission denied
[WARNING] Running as root is not recommended
[DUNE] cerberus
Warning: one state has shift/reduce conflicts.
Warning: one state has reduce/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Warning: 4 reduce/reduce conflicts were arbitrarily resolved.
Warning: one state has shift/reduce conflicts.
Warning: one state has reduce/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Warning: 4 reduce/reduce conflicts were arbitrarily resolved.
Read 1186 sample input sentences and 1186 error messages.
Read 1186 sample input sentences and 1186 error messages.
Warning: one state has shift/reduce conflicts.
Warning: one state has reduce/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Warning: 4 reduce/reduce conflicts were arbitrarily resolved.
Read 1186 sample input sentences and 1186 error messages.
Warning: one state has shift/reduce conflicts.
Warning: one state has reduce/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Warning: 3 reduce/reduce conflicts were arbitrarily resolved.
Warning: one state has shift/reduce conflicts.
Warning: one state has reduce/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Warning: 4 reduce/reduce conflicts were arbitrarily resolved.
(debug 0): constructValue_aux: is WRONG for union ==> always assigning the first member
[DUNE] install cerberus
[DUNE] cn
File "backend/cn/report.ml", line 689, characters 10-30:
689 | Some (In_channel.input_all ic)
^^^^^^^^^^^^^^^^^^^^
Error: Unbound module In_channel
make: *** [Makefile:79: cn] Error 1
Error: building at STEP "RUN eval opam env && make install && make install_cn": while running runtime: exit status 2

@cp526
Copy link
Collaborator

cp526 commented Jun 24, 2024

I suspect this is due to too old an OCaml version. Which version of OCaml do you have?
We depend on an OCaml version of at least 4.14.0 (This information was previously missing in CN's build machinery, I just added that.)

@lwli11
Copy link
Author

lwli11 commented Jun 24, 2024

Thanks, the docker image now builds.

I also see the image:
docker image ls
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/cerberus release 635ba847a591 19 minutes ago 2.96 GB

However, when I run the docker run command:
docker run --volume PWD:/data/ cerberus:0.1 tests/tcc/00_assignment.c --pp=core
bash: PWD: command not found...
Similar command is: 'pwd'
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
? Please select an image:
▸ registry.access.redhat.com/cerberus:0.1
registry.redhat.io/cerberus:0.1
docker.io/library/cerberus:0.1

Or when I replace 'PWD' with 'pwd':
docker run --volume pwd:/data/ cerberus:0.1 tests/tcc/00_assignment.c --pp=core
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
? Please select an image:
▸ registry.access.redhat.com/cerberus:0.1
registry.redhat.io/cerberus:0.1
docker.io/library/cerberus:0.1

@podhrmic
Copy link
Contributor

@cp526 maybe this issue could be a gentle nudge to add the missing token to rems-project/cerberus#323 and actually publish the docker image so it doesn't need to be built locally?

We have our cerberus image published in the VERSE registry, but sadly I cannot make it public yet...

@lwli11
Copy link
Author

lwli11 commented Jun 24, 2024

I think I've found the command that works!

docker run --volume pwd:/data -it cn /data/tests/tcc/00_assignment.c
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
WARN[0000] Failed to mount subscriptions, skipping entry in /usr/share/containers/mounts.conf: getting host subscription data: failed to read subscriptions from "/usr/share/rhel/secrets": open /usr/share/rhel/secrets/rhsm/rhsm.conf: permission denied
[WARNING] Running as root is not recommended
/root/.opam/default/lib/cerberus/runtime/libc/include/stdio.h:58:5: error: unsupported variadic functions
int fprintf(FILE * restrict stream, const char * restrict fmt, ...);
^~~~~~~

@septract
Copy link
Collaborator

septract commented Aug 19, 2024

The docker container is now built in CI. Could we close this issue @lwli11 ?

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

4 participants