How do I install a current Frama-C release and its prerequisites on Macs?
I have a laptop running Mac OS X 10.6.8 and a desktop running Mac OS X 10.7.5 which I can install software on. I also have access to a lab of machines running Mac OS X 10.8 which our technical support people will install stuff on if I ask nicely.
I have a student who is interested in program analysis and needs something that we have a fighting chance of understanding and adding to. I was already aware of Frama-C, and a colleague at another university recommended it.
I had previously tried to install Frama-C and failed miserably. The colleague commented that he'd had the same experience. Well, times change. So I visited the Frama-C web site, was more impressed and keener to have it than ever, and set about it.
The frama-c.com download page doesn't have links to any binaries for the current (Flourine 3) release for any platform. The link to installation instruction takes me to a page that says to download the auto-installer. What auto-installer?
There are instructions for an old version of Mac OS X, but following them didn't work; loading one set of prerequisites as instructed produced a state where the next prerequisite (gtksourceview) would not install.
Of course I checked the older releases, and I see that there's a Nitrogen version for Mac OS X Leopard, but "Please untar the archive as root in /" asks me to perform the impossible. I don't have a root account and will never be given one (the machines all belong to the university). It is perfectly possible to install gcc and clang anywhere you like; why does Frama-C want to be in /?
In addition to Pascal's answer, you can also have a look to opam, which is a source package manager for OCaml applications. It appears to run on MacOS X, and there are packages for Frama-C's Oxygen and Fluorine.
All Frama-C binary packages want to install in / (precisely, in /usr/local/Frama-C) because Frama-C uses GTK+ and various GTK+-related libraries that were never designed to run from anything other than a fixed location. They load configuration files and resources from paths that have been hard-coded at compile-time. GCC and Clang install anywhere because they don't rely on GTK+. Like them, the command-line version of Frama-C can be relocated through various environment variables listed here.
Note that to take advantage of a binary package, you would only need one symbolic link pointing from /usr/local/Frama-C to the place where you really extracted the files, if your administrator(s) can grant you that. Binary packages only work for one OS X version. For packages available from the official website, this version is usually 10.6 (Snow Leopard).
I have ceased making Frama-C binary packages for two reasons:
This said, Frama-C the Open-Source advanced research prototype continues to be developed and maintained, and continues to be a great testbed to experiment in. You can install Frama-C without root access on a Mac in two ways apart from what you have already tried:
For Fluorine, the oldest supported OCaml version is 3.12.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With