ellisk42 / ec

MIT License
482 stars 138 forks source link

Fail to run ``make'' in the root dir. #87

Closed XgDuan closed 3 years ago

XgDuan commented 3 years ago

Thanks for sharing this repo. I am trying to run this code. Firstly, when trying to run the code with `singularity', I meet an error when installing the image (I was stuck when selecting the timezone, with singularity version 3.8.4, and Ubuntu 18.04). Then I decide to install all the dependencies directly.

Currently, those apt dependencies have been installed (apt-get update && apt-get -y install python3 git wget opam m4 libcairo2-dev libzmq3-dev swig graphviz); and python dependencies have been installed via pip. And OCaml is installed via:

    opam init -y --auto-setup --root ~/.opam
    opam update
    opam switch set 4.06.1+flambda   // seems that the `create` command is removed. the `set' command helps me installed the compelier.
    eval `opam config env`
    opam install -y  ppx_jane core re2 yojson vg cairo2 camlimages menhir ocaml-protoc zmq utop jbuilder

After the above dependencies. I run make clean; make under the root dictionary, and met the following error:

File "geomLib/Renderer.ml", line 30, characters 65-66:                                         
Error: The function applied to this argument has type    
         int -> int -> Cairo.Surface.t                                             
This argument cannot be applied with label ~w                
         ppx logoTest.pp.ml                                                           

I think there should be something wrong with my installation. Do you have any suggestions?

XgDuan commented 3 years ago

I somehow solve this problem via https://github.com/ellisk42/ec/issues/67. I am currently learning OCaml to figure out the problem

sneiman commented 2 years ago

Here is a fix to build singularity container on Ubuntu 20.04. It currently fails with tzdata config interaction. To fix:

In the singularity file after %post and before apt-get update ... add:

    export TZ=America/Los_Angeles
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone**

Set TZ variable to the appropriate tzdata time zone phrase (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Then run the singularity build line as provided in README.doc:

sudo singularity build container.img singularity

This works on Ubuntu 20.04. Still testing whether or not you can build the ocaml libs in the container.