0

Does anyone have installed Frama-C on Mavericks ? Because i can't install it or do not know how to install it (Gui Version)!

I already installed ocaml on my pc, but for the Gui version i need to install these libraries : Gtk, GtkSourceView, GnomeCanvas and Lablgtk2.

So i saw a previous post and did that :

export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
sudo port install opam
opam init
  Y
eval `opam config env`
sudo port install gtksourceview2 lablgtk2 ocaml-ocamlgraph
opam install frama-c

Im' having a problem in making "make" with frama-c which is :

Ocamlc       src/logic/property_status.cmo
File "src/logic/property_status.ml", line 1444, characters 4-2027:
Error: Signature mismatch:
   ...
   Values do not match:
     val vertex_attributes :
       v ->
       [> `Color of int
        | `Label of string
        | `Shape of [> `Box | `Diamond ]
        | `Style of [> `Bold | `Filled ] list
        | `Width of float ]
       list
   is not included in
     val vertex_attributes :
       V.t -> Graph.Graphviz.DotAttributes.vertex list
   File "src/logic/property_status.ml", line 1479, characters 16-33:
     Actual declaration
make: *** [src/logic/property_status.cmo] Error 2

How am i able to solve this ?

Damiii
  • 1,363
  • 4
  • 25
  • 46

3 Answers3

4

i've just successfully installed Frama-c neon (with Gui) on maverick, using opam and homebrew.

here's my walkthrough. (Thanks to tips above)

1) Install homebrew

$ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

2) Install opam:

$ brew install opam
$ opam init

(i had to modify .profile instead of .bashrc with f option)

$ eval `opam config env`

3) Install all dependencies

$ brew install gtk+
$ brew install gtksourceview
$ brew install libgnomecanvasmm libgnomecanvas
$ brew install lablgtk

4) Install Frama-c

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ opam install frama-c

If you prefer install dependencies with macports, change the PKG_CONFIG_PATH to /opt/X11/lib/pkgconfig as explained here

Hope this help

  • Tip: If you don't want all those dependencies (or the installation fails for some reason), try installing `frama-c-base` instead. – dom96 Apr 13 '18 at 16:25
1

I have successfully installed frama-c Neon with gui on mavericks using brew to get all the dependencies and using the source code in http://frama-c.com/download.html . If you try to do it using brew, you should install lablgtk from this repository(https://github.com/mht208/homebrew-formal) and only after all the other dependencies so the commands to install with gui would be(in source folder):

  brew install ocaml
  brew install gtk
  brew install gtksourceview
  brew install gnomecanvasmm gnomecanvas
  brew tap mht208/formal
  brew install lmht208/formal/lablgtk -with-gnomecanvas -with-gtksourceview2 
  ./configure
  make

You can also install ocamlgraph with opam, and you can compile Zarith and install in your system.

user2291590
  • 218
  • 1
  • 2
  • 9
  • Thanks ! :) I installed the Carbon version on mavericks which works and that's why i don't need it for now the Neon version ! But if it works, i really appreciate your answer for me and others who wanna install it on mavericks ! :) – Damiii May 08 '14 at 08:05
0

Graph.Graphviz is from OCamlGraph. There seems to be an incompatibility between the two latest versions of each.

You'll have to add version contraints on the frama-c library, or change the Style attribute to have a list of the polymorphic variant set.

EDIT -

you don't need to install ocamlgraph via port, you should install that by opam as well.

nlucaroni
  • 47,556
  • 6
  • 64
  • 86
  • And how can i do that ? :/ – Damiii Apr 28 '14 at 18:15
  • 1
    @Damiii, you are installing a couple of libraries using `port` command. Can you try to install them via opam? use `opam list -a| grep name` to get suitable opam packages' names – Kakadu Apr 28 '14 at 18:23
  • 2
    @Kakadu I believe that opam is for OCaml libraries. Am I wrong? In this case it would be perfectly normal to use MacPorts's `port` to install all the Gtk dependencies before starting to install the OCaml binding libraries. On the other hand, using `port` to install ocaml-ocamlgraph is probably not going to mix well with `opam`, (and MacPorts' packages are not up-to-date enough to provide OCamlgraph packages that are compatible with Frama-C. Better not install that and let Frama-C use the included OCamlgraph snapshot). – Pascal Cuoq Apr 28 '14 at 18:41
  • so i did these installations : opam install lablgtk opam install conf-gnomecanvas opam install gtk-light opam install lablgtk-extras And didn't change anything :/ – Damiii Apr 28 '14 at 18:42
  • "... let Frama-C use the included OCamlgraph snapshot)." Which is ? Where do i get that ? – Damiii Apr 28 '14 at 18:44
  • ocamlgraph is also in OPAM, Damiii. – nlucaroni Apr 28 '14 at 18:58
  • z$ opam install ocamlgraph [NOTE] Package ocamlgraph is already installed (current version is 1.8.5). – Damiii Apr 28 '14 at 19:44
  • looks like it's the issue I mentioned originally, and you need to have version 1.8.4 of ocamlgraph with frama-c currently. You can modify the opam file for frama-c in `.opam/repo/default/packages/frama-c/frama-c.20130601/opam` and add an additional constraint. – nlucaroni Apr 28 '14 at 20:06
  • and how can i dowload that version ? – Damiii Apr 28 '14 at 20:07
  • hmmm, i had no problem downloading and installing frama-c just now iva OPAM. I'm skeptical, something else may be happening here. – nlucaroni Apr 28 '14 at 20:32
  • hummm the version on that file is : depends: [ "ocamlgraph" {>= "1.8.3"} "lablgtk" "conf-gtksourceview" "conf-gnomecanvas" ] – Damiii Apr 28 '14 at 20:38
  • And you have Mavericks ? :( – Damiii Apr 28 '14 at 20:39
  • how did you manage to install it nlucaroni ? Which commands have you done on mavericks ? – Damiii Apr 28 '14 at 21:19
  • it wasn't on mavericks, but this isn't a mavericks issue. this is a version issue of those packages. `opam install frama-c`. – nlucaroni Apr 28 '14 at 21:34
  • the opam install drama-c does work ! but where is my GUI then ? – Damiii Apr 28 '14 at 21:40
  • Doesn't appear on my terminal. Only frama-c – Damiii Apr 28 '14 at 22:09
  • You might be missing gnomecanvas? – nlucaroni Apr 28 '14 at 22:21
  • There is no such gnome canvas on opam – Damiii Apr 28 '14 at 22:39
  • Nobody can helps me? :( – Damiii Apr 29 '14 at 11:25
  • gnome-canvas is not provided by OPAM. OPAM currently only has OCaml packages. From the frama-c user manual installation section, "Gtk -related packages: gtk+ version 2.4 or higher, GtkSourceView version 2.x, Gnome-Canvas version 2.x as well as LablGtk version 2.14 or higher are required for building the Graphical User Interface (GUI) of Frama-C." THen you have to reinstall frama-c, since the gui is an optional dependency. – nlucaroni Apr 29 '14 at 14:00