User Tools

  • Logged in as: anonymous (anonymous)
  • Logout

Site Tools


mantis:frama-c:compiling_from_source

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mantis:frama-c:compiling_from_source [2016/12/08 08:24]
maroneze [Compiling under Windows (Cygwin + MinGW)]
mantis:frama-c:compiling_from_source [2017/03/15 18:18] (current)
maroneze [Compiling under Windows (Cygwin + MinGW)]
Line 11: Line 11:
  
 ===== Compiling under Windows (Cygwin + MinGW) ===== ===== Compiling under Windows (Cygwin + MinGW) =====
 +
 +**If you already know how to use OPAM, simply install the ''​frama-c''​ package. The instructions below are for users who have never used OPAM + Cygwin.**
  
 Although Frama-C is **not** officially supported on Windows (that is, the Frama-C team cannot guarantee that it will always work on Windows environments),​ it it possible to compile and use it. In case of errors, you can refer to StackOverflow questions tagged ''​frama-c''​ (or ask them yourself). Although Frama-C is **not** officially supported on Windows (that is, the Frama-C team cannot guarantee that it will always work on Windows environments),​ it it possible to compile and use it. In case of errors, you can refer to StackOverflow questions tagged ''​frama-c''​ (or ask them yourself).
  
-The recommended procedure is to use OPAM for MinGW OCaml. ​An obsolete procedure using WODI is also presented but only for historical reasonsIt is unlikely to work with recent lablgtk and Frama-C releases.+The recommended procedure is to use OPAM for MinGW OCaml
 + 
 +  - Install [[https://​fdopen.github.io/​opam-repository-mingw/​|OCaml ​for Windows]] (the graphical installer should be fine)Note that newer releases of OCaml are not always backwards-compatible ​with Frama-C releases. 
 +  - Follow fdopen'​s instructions,​ in particular:​ 
 +     * Install depext (''​opam install depext''​) and [[http://​fdopen.github.io/​opam-repository-mingw/​depext-cygwin/​|depext-cygwinports]]. This is necessary especially for the Frama-C GUI, which uses lablgtk. 
 +     * Do not forget to update your PATH variable as indicated, or use ''​ocaml-env''​. 
 +  - Install Frama-C dependencies:​ <​code>​opam depext frama-c</​code>​ 
 +  - Install Frama-C itself: <​code>​opam install frama-c</​code>​ 
 +   
 +And it's done! 
 + 
 +**Note:** By default, Cygwin defines the ''​CPP''​ variable in its environment. If you are using Frama-C 14 (Silicon) or older, append ''​-C -I.''​ to the value of that variable. For instance, by adding the following line to your ''​.bashrc''​ file:
  
-**If you already know how to use OPAM, simply install the frama-c packageThe instructions below are for users who have never used OPAM + Cygwin.**+<​code>​export CPP="​x86_64-w64-mingw32-cpp.exe -C -I."</​code>​
  
-=== Using OPAM for MinGW OCaml ===+The snippet above is for the 64-bit version.
  
-There is a [[https://​github.com/​fdopen/​opam-repository-mingw|GitHub OPAM repository for MinGW]] which includes patches for several packages ​to ensure they work on Windows.+You also need to systematically add ''​-pp-annot'' ​to your command-line,​ otherwise annotations in source files may not be processed.
  
-Frama-C Magnesium has been tested on Windows 8.1 using that repository (it should also work on other Windows, such as 7). 
  
-Frama-C Aluminium ​(20160501should also compile without issues.+===== Obsolete procedures ​should NOT be necessary ​(only presented for historical reasons=====
  
-Frama-C ​14 (Silicon, 20161101) can also be compiled without problems.+ An obsolete procedure using WODI is also presented but only for historical reasons. It is unlikely to work with recent lablgtk and Frama-C ​releases.
  
 **Note**: the procedure below is not 100% robust, but it has been tested on a few different configurations. We recommend referring to the [[https://​github.com/​fdopen/​opam-repository-mingw|GitHub OPAM repository for MinGW]] or asking a question on [[http://​stackoverflow.com|StackOverflow]] if you have problems compiling it (e.g. if your Windows username contains spaces, [[https://​www.cygwin.com/​faq.html#​faq.setup.name-with-space|this Cygwin FAQ]] referenced by fdopen indicates how to fix it). **Note**: the procedure below is not 100% robust, but it has been tested on a few different configurations. We recommend referring to the [[https://​github.com/​fdopen/​opam-repository-mingw|GitHub OPAM repository for MinGW]] or asking a question on [[http://​stackoverflow.com|StackOverflow]] if you have problems compiling it (e.g. if your Windows username contains spaces, [[https://​www.cygwin.com/​faq.html#​faq.setup.name-with-space|this Cygwin FAQ]] referenced by fdopen indicates how to fix it).
mantis/frama-c/compiling_from_source.txt · Last modified: 2017/03/15 18:18 by maroneze