Skip to content

Instantly share code, notes, and snippets.

@yoshihiro503
Last active February 14, 2019 12:04
Show Gist options
  • Save yoshihiro503/093b2d54b433f2ae9dd7354ff6415600 to your computer and use it in GitHub Desktop.
Save yoshihiro503/093b2d54b433f2ae9dd7354ff6415600 to your computer and use it in GitHub Desktop.

注意: こちらもご参照ください fialyzer環境開発構築2019.md

fialyzer の開発環境を構築する方法 2018

構築する環境

  • opam 2.0.0
  • ocaml 4.07.1
  • dune 1.2.1

準備

opam 2.0.0 のインストール

Ubuntuの人

sudo apt install bubblewrap
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init

MacOSの人

brew update
brew install opam
opam init

fialyzer用のocaml開発環境を作成

opam switch create fialyzer-4.07 ocaml-base-compiler.4.07.1
eval $(opam env) 

プロジェクトをclone

git clone [email protected]:dwango/fialyzer.git
cd fialyzer/
git submodule init && git submodule update

依存ライブラリをインストール

opam pin add -y obeam obeam
opam pin add -y fialyzer .

ビルド

make

付録 A. 依存ライブラリの詳細

  * install conf-m4                 1          [required by ocamlfind]
  * install ocamlbuild              0.12.0     [required by ounit, ppx_deriving]
  ∗ install dune                    1.3.0      [required by obeam]
  ∗ install ocamlfind               1.8.0      [required by ounit, camlzip, ppx_deriving]
  ∗ install jbuilder                transition [required by bisect_ppx, bitstring]
  ∗ install ppx_tools               5.1+4.06.0 [required by ppx_deriving]
  ∗ install camlzip                 1.07       [required by obeam]
  ∗ install base-bytes              base       [required by ounit]
  ∗ install result                  1.3        [required by ppx_deriving]
  ∗ install ppx_derivers            1.0        [required by ppx_deriving]
  ∗ install cppo                    1.6.5      [required by ppx_deriving]
  ∗ install ounit                   2.0.8      [required by obeam]
  ∗ install ocaml-migrate-parsetree 1.1.0      [required by bitstring, bisect_ppx, ppx_deriving]
  ∗ install cppo_ocamlbuild         1.6.0      [required by ppx_deriving]
  ∗ install ppx_tools_versioned     5.2.1      [required by bisect_ppx, bitstring]
  ∗ install ppx_deriving            4.2.1      [required by obeam]
  ∗ install bitstring               3.1.0      [required by obeam]
  ∗ install bisect_ppx              1.3.4      [required by obeam]
  ∗ install obeam                   0.0.3*

  ∗ install ocaml-compiler-libs v0.11.0 [required by ppxlib]
  ∗ install sexplib0            v0.11.0 [required by sexplib]
  ∗ install num                 1.1     [required by batteries, sexplib]
  ∗ install parsexp             v0.11.0 [required by sexplib]
  ∗ install base                v0.11.1 [required by ppx_sexp_conv]
  ∗ install batteries           2.8.0   [required by fialyzer]
  ∗ install sexplib             v0.11.0 [required by fialyzer]
  ∗ install stdio               v0.11.0 [required by ppxlib]
  ∗ install ppxlib              0.3.1   [required by ppx_sexp_conv]
  ∗ install ppx_sexp_conv       v0.11.2 [required by fialyzer]
  ∗ install fialyzer            ~dev*
@kmizu
Copy link

kmizu commented Oct 4, 2018

現時点でbatteriesに依存してないので、

opam switch create fialyzer-4.07 ocaml-base-compiler.4.07.0

としても、ビルドは問題なく通るようです。

@yoshihiro503
Copy link
Author

ありがとうございます。文章修正しました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment