Skip to content

Instantly share code, notes, and snippets.

@amosr
Last active May 24, 2016 08:17
Show Gist options
  • Save amosr/c00ff1b19e46555845e881d8f17a672e to your computer and use it in GitHub Desktop.
Save amosr/c00ff1b19e46555845e881d8f17a672e to your computer and use it in GitHub Desktop.
Installing and running Lucid Synchrone (Lucy)
#!/bin/sh -eu
# The version of Lucid Synchrone / Lucy on the website was built a long time ago, and only has bytecode available.
# It seems that between ocaml 4.00.1 and 4.00.2, the bytecode format changed,
# so you need to use that version.
# This should:
# install the right version of the compiler (assuming you have opam);
# download lucy;
# change the shebang of the binaries to point to the right version;
# and put lucyc in /usr/local/bin.
# Try to install the 'right' version of OCaml
opam switch set 4.00.1
# Download and unpack lucy
wget http://www.di.ens.fr/~pouzet/lucid-synchrone/lucid-synchrone-3.0b.byte.tar.gz
tar -xvzf lucid-synchrone-3.0b.byte.tar.gz
# Hacky substitute into the shebang of the binaries
WHICH=`which ocamlrun`
perl -pi -e "s,/usr/local/bin/ocamlrun,$WHICH," lucy/bin/lucyc lucy/bin/lucys
# The makefile will now put lucyc in /usr/local
make -C lucy
# Set lib directory
echo 'You should probably add this to your profile:'
echo 'LUCYLIB=/usr/local/lib/lucid-synchrone'
export LUCYLIB=/usr/local/lib/lucid-synchrone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment