From: Thomas L. <ta...@gm...> - 2013-06-25 11:31:54
|
Here are my notes on compiling 0install's OCaml code on Windows. Probably I took some wrong turns (I don't know much about Windows). I built on Windows 7, and then ran the (1.5 MB) binary on Windows XP. I didn't have to install anything extra on XP to make the binary work. So, these instructions are only for developers, not users. Installed http://protz.github.io/ocaml-installer/ on Windows 7. It said it was installing Cygwin, but no sign of a bash shell afterwards, just Cygwin setup. I ran Cygwin Setup and it downloaded another load of stuff. In addition to the defaults, I installed make. Running "make" from a Cygwin terminal in the 0install/ocaml directory shows that the Xmlm and Yojson libraries we need are missing. opam doesn't work on Windows (https://github.com/OCamlPro/opam/issues/246) so had to install the libraries manually. No problem; 0install could handle this on Windows. Downloaded Yojson. Attempt co compile Yojson. No Cppo. Got that too. i686-w64-mingw32-as not found. Wrong turn: Installed that from mingw project on sf.net. Accepted defaults (C compiler only). Didn't help. Retried using Cygwin Setup. Installed mingw64-i686-binutils. Now missing i686-w64-mingw32-gcc. Installed mingw64-i686-gcc using Cygwin. Didn't help. Installed mingw64-i686-gcc-core using Cygwin. Now it works. "Error during linking". However, I did end up with a 'cppo.exe' binary, which seemed to work. Did "make install" and that worked fine. Installed easy-format. No problems. Installed biniou. No problems. Installed yojson. No problems. Installed Xmlm. No Makefile, but just follow instructions in README. "Access is denied" trying to write to "Program Files (x86)". Ignored problem; seemed to be installed anyway. Then "make" in 0install/ocaml worked and generated _build/main.native, which is the binary I tested with. -- Dr Thomas Leonard http://0install.net/ GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA |