Skip to content
This repository was archived by the owner on Aug 25, 2022. It is now read-only.
This repository was archived by the owner on Aug 25, 2022. It is now read-only.

installing on linux #4

@joewilliams

Description

@joewilliams

FWIW this is the procedure I used to get SLAyer running on a freshly installed VM with Ubuntu 14.04.1 LTS.

I started with the following per the ocaml website:

sudo add-apt-repository --yes ppa:avsm/ppa
sudo apt-get update -qq
sudo apt-get install -y ocaml ocaml-native-compilers camlp4-extra opam pkg-config build-essential m4
opam init
eval $(opam config env)
opam switch install 4.02.3
export OCAMLLIB=/home/joe/.opam/4.02.3/lib/ocaml/
opam install ocamlbuild ocamlfind 
mv /usr/local/lib/ocaml  /usr/local/lib/ocaml.old
sudo ln -s /home/joe/.opam/4.02.3/lib/ocaml /usr/local/lib/ocaml
opam install camlidl

camlidl seems to hardcode /usr/local/lib/ocaml in the configure/Makefile.

Then followed did the following:

git clone https://github.com/Microsoft/SLAyer.git
cd SLAyer/
git submodule init
git submodule update
. config.sh
cd src/
make

I seemed to need to modify a Makefile, ~/SLAyer/tools/Z3/build/api/ml/Makefile to:

CAMLIDL=-I/home/joe/.opam/4.02.3/lib/camlidl rather than the path from ocamlc -where.

cd ~/SLAyer/tools/Z3/build/api/ml/
make
cd ~/SLAyer/src
make

This failed, I then had to remove the repo and try again, afterwards it then complied fully. I assume this is something getting screwed up in the ENV or various library paths during the initial install attempt that restarting from scratch seems to fix. Unfortunately I am not sure what it is.

cd ..
rm -rf SLAyer/
git clone git clone https://github.com/Microsoft/SLAyer.git
git clone https://github.com/Microsoft/SLAyer.git
eval $(opam config env)
cd SLAyer/src/
git submodule init
git submodule update
. config.sh
cd src/
export OCAMLLIB=/home/joe/.opam/4.02.3/lib/ocaml
make
joe@ubuntu:~/SLAyer$ ./bin/slayer -version
SLAyer  debug (Z3 dll v4.3.2)

From there slayer runs but exits quietly but with an exit code of 1. strace -f shows that this is due to nothing called frontend on the path. Which #1 seems to be about.

For the heck of it I created a frontend file:

joe@ubuntu:~/SLAyer$ cat /usr/local/bin/frontend
echo $@

Which tells me it's trying to run frontend $MYCFILENAME -fe_norm true. Seems like without some sort of special frontend client it's not very usable on linux at least.

Also possibly worth noting, cygpath isn't installed:

joe@ubuntu:~/SLAyer$ . config.sh
cygpath: command not found
cygpath: command not found

Also, best I can tell something like cp /home/joe/SLAyer/src/../tools/Z3/build/api/ml/* /home/joe/.opam/4.02.3/lib/ocaml/ doesn't seem to help.

Thanks for open sourcing this project. Hope this helps others!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions