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

Add reproducible container #63

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bjodah
Copy link

@bjodah bjodah commented Oct 25, 2022

Hi, I came across herbgrind and I wanted to try it out. I had some trouble getting it to compile (version mismatch in tools etc).

I understand that this is a research project and that focus might have shifted elsewhere since, but I added a Containerfile with an environment specification to at least get it to compile and have some tests pass.

I do get (at least) one test failure though:

output from test run
Successfully tagged localhost/herbgrind:12160762
49ee16c7408a740a96e1d35cdc5e63ec2ed216b551670e7e430c56111767b024
Try runing herbgrind's test suite by issuing:

   $ /opt/run_hergrind_tests.sh

tests should ideally pass.
root@6bb243e9a86d:/home/bjorn/vc/herbgrind/.container# /opt/run_herbgrind_tests.sh 
+ cd /opt/herbgrind
++ opam config env
[WARNING] Running as root is not recommended
+ eval 'CAML_LD_LIBRARY_PATH="/root/.opam/4.06.1/lib/stublibs";' export 'CAML_LD_LIBRARY_PATH;' 'MANPATH="/root/.opam/4.06.1/man:";' export 'MANPATH;' 'PERL5LIB="/root/.opam/4.06.1/lib/perl5";' export 'PERL5LIB;' 'OCAML_TOPLEVEL_PATH="/root/.opam/4.06.1/lib/toplevel";' export 'OCAML_TOPLEVEL_PATH;' 'PATH="/root/.opam/4.06.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";' export 'PATH;'
++ CAML_LD_LIBRARY_PATH=/root/.opam/4.06.1/lib/stublibs
++ export CAML_LD_LIBRARY_PATH
++ MANPATH=/root/.opam/4.06.1/man:
++ export MANPATH
++ PERL5LIB=/root/.opam/4.06.1/lib/perl5
++ export PERL5LIB
++ OCAML_TOPLEVEL_PATH=/root/.opam/4.06.1/lib/toplevel
++ export OCAML_TOPLEVEL_PATH
++ PATH=/root/.opam/4.06.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export PATH
+ make test
make -C bench tiny.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o tiny.c.out tiny.c -g -lm -std=c11
chmod u+x tiny.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench var-test.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o var-test.c.out var-test.c -g -lm -std=c11
chmod u+x var-test.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench diff-simple.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o diff-simple.c.out diff-simple.c -g -lm -std=c11
chmod u+x diff-simple.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench sum-500.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o sum-500.c.out sum-500.c -g -lm -std=c11
chmod u+x sum-500.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench hello_world.ml.out
make[1]: Entering directory '/opt/herbgrind/bench'
ocamlopt -g -o hello_world.ml.out hello_world.ml 
chmod u+x hello_world.ml.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench simple-negate.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o simple-negate.c.out simple-negate.c -g -lm -std=c11
chmod u+x simple-negate.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench same-small.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o same-small.c.out same-small.c -g -lm -std=c11
chmod u+x same-small.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench diff-roots.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o diff-roots.c.out diff-roots.c -g -lm -std=c11
chmod u+x diff-roots.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench mini.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o mini.c.out mini.c -g -lm -std=c11
chmod u+x mini.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench multi-args.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o multi-args.c.out multi-args.c -g -lm -std=c11
chmod u+x multi-args.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench diff_roots.ml.out
make[1]: Entering directory '/opt/herbgrind/bench'
ocamlopt -g -o diff_roots.ml.out diff_roots.ml 
chmod u+x diff_roots.ml.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench small.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o small.c.out small.c -g -lm -std=c11
chmod u+x small.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench diff-roots-simple.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o diff-roots-simple.c.out diff-roots-simple.c -g -lm -std=c11
chmod u+x diff-roots-simple.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench var-test-2.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o var-test-2.c.out var-test-2.c -g -lm -std=c11
chmod u+x var-test-2.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench some-trig.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o some-trig.c.out some-trig.c -g -lm -std=c11
chmod u+x some-trig.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench fma.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o fma.c.out fma.c -g -lm -std=c11
chmod u+x fma.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench exp2l.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o exp2l.c.out exp2l.c -g -lm -std=c11
chmod u+x exp2l.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench sum-50.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o sum-50.c.out sum-50.c -g -lm -std=c11
chmod u+x sum-50.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench redir.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o redir.c.out redir.c -g -lm -std=c11
chmod u+x redir.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench compare-zero-self.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o compare-zero-self.c.out compare-zero-self.c -g -lm -std=c11
chmod u+x compare-zero-self.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
make -C bench sqrtf.c.out
make[1]: Entering directory '/opt/herbgrind/bench'
gcc-8 -o sqrtf.c.out sqrtf.c -g -lm -std=c11
chmod u+x sqrtf.c.out
make[1]: Leaving directory '/opt/herbgrind/bench'
python3 bench/test.py bench/simple-negate.c.out bench/fma.c.out bench/small.c.out bench/tiny.c.out bench/compare-zero-self.c.out bench/multi-args.c.out bench/sum-500.c.out bench/diff-roots-simple.c.out bench/sum-50.c.out bench/hello_world.ml.out bench/diff-roots.c.out bench/exp2l.c.out bench/same-small.c.out bench/var-test-2.c.out bench/sqrtf.c.out bench/some-trig.c.out bench/diff-simple.c.out bench/diff_roots.ml.out bench/redir.c.out bench/var-test.c.out bench/mini.c.outCalling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/simple-negate.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/fma.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/small.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/tiny.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/compare-zero-self.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/multi-args.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/sum-500.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/diff-roots-simple.c.out`... Outputs match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/sum-50.c.out`... Outputs match.Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/hello_world.ml.out`... Outputs 
match.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/diff-roots.c.out`... Outputs ma
tch.
Calling `./valgrind/herbgrind-install/bin/valgrind --tool=herbgrind --output-sexp bench/exp2l.c.out`... Empty file at b
ench/exp2l.c.out.gh!
Outputs do not match!
Actual::

Expected::
No marks found!

stdout::
nan

stderr::
==199== Herbgrind, a valgrind tool for Herbie
==199== Copyright (C) 2016-2017, and GNU GPL'd, by Alex Sanchez-Stern
==199== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info
==199== Command: bench/exp2l.c.out
==199== 
==199== 
Didn't find any marks!
Makefile:269: recipe for target 'test' failed
make: *** [test] Error 1

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

Successfully merging this pull request may close these issues.

1 participant