1 ;; https://discuss.ocaml.org/t/dune-how-to-link-statically-on-linux-not-on-others/8537/4?u=mro
6 (run sh %{dep:gen_flags.sh})))
11 ; (run echo "let dune_project_num = \"%{version:seppo}\"")
12 (run sh %{dep:gen_version.sh} "%{version:seppo}" # ${build-number}) ; https://github.com/ocaml/dune/issues/255#issuecomment-372077123
15 ; https://stackoverflow.com/a/53325230/349514
32 ; https://discuss.ocaml.org/t/lwt-ppx-binary-footprint/11818/2
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34 ;; Prepare for static linking
36 ; http://rgrinberg.com/posts/static-binaries-tutorial/
37 ; https://discuss.ocaml.org/t/statically-link/1464/9
38 ; Issue https://discuss.ocaml.org/t/statically-link/1464/13
39 ; https://www.systutorials.com/how-to-statically-link-ocaml-programs/
42 ; Tue Mar 24 11:36:40 CET 2020
46 ; Devuan GNU/Linux 1 \n \l
48 ; # on Ubuntu Bionic note
49 ; # https://github.com/ocaml/ocaml/issues/9131#issuecomment-599765888
50 ; $ sudo add-apt-repository ppa:avsm/musl
52 ; $ sudo apt-get install musl-tools
54 ; $ opam switch create 4.11.2+musl+static+flambda
55 ; $ opam switch 4.11.2+musl+static+flambda
57 ; $ cat */deps | xargs opam install --yes
58 ; $ make test clean build
59 ; $ file _build/default/chkr/*.exe
60 ; _build/default/chkr/apchk.exe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
62 (:include flags.sexp)))