How can I install OCaml with OPam on windows?

前端 未结 3 2038
灰色年华
灰色年华 2020-12-17 15:01

How can I install OCaml with OPam on windows?

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-17 15:38

    Windows 10   CygWin64   standard C toolchain   OCaml 4.02.3 + BuckleScript-1   **   WebAssembly spec/interpreter   compiling from source   OPam

    install CygWin 64-bit setup-x86_64.exe
    - choose your path (in the following abbreviated with cwd), everything else only default or next
    - move the installer to cwd

    install required packages for standard C toolchain from windows cmd prompt

    cwd>setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel
    

    edit cwd/home\username\.bash_profile, add

    export SHELLOPTS
    set -o igncr
    

    start via Icon Cygwin64 Terminal

    choose your path for installing the BuckleScript git (in the following abbreviated with bwd)

    cd /cygdrive/bwd
    git config --global core.eol lf
    git config --global core.autocrlf false
    git clone --recursive https://github.com/bloomberg/bucklescript
    

    (cloning to /cygdrive/bwd/bucklescript)

    edit /cygdrive/bwd/bucklescript/.gittattribute, add

    * text=auto  
    

    choose your path for OCaml compiler to build (in the following abbreviated with owd)

    configure and make

    cd /cygdrive/owd/bucklescript/ocaml
    ./configure -prefix /owd
    make world.opt
    make install
    

    install OPam

    create switch (open issue, wait for answer)
    compile bsc.exe (open issue, wait for answer)
    install WebAssembly spec interpreter (WASM WAST switching)

    issue WebAssembly/spec/interpreter/1052

    ... to be completed!

提交回复
热议问题