Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (55 sloc) 2.47 KB
Install brew, see
(or install macports
$ brew install objective-caml camlp4
For codemap and codegraph:
install xquartz at
$ brew install gtk+
$ brew install cairo
For codequery:
$ brew install swi-prolog
=> you can now run './configure' and build the many pfff tools :)
See install.txt for the remaining steps.
- If you are using homebrew you may have problems compiling ocamlgtk and
ocamlcairo. First You need to
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig
so that configure can find one cairo.pc (the cairo of brew is keg-only),
and libpng16.pc. To test you can do
'pkg-config gtk+-2.0 --cflags'
and play with PKG_CONFIG_PATH until this previous command works.
Once this works, you want to force to link with the new cairo library in
homebrew because the default one of MacOS is causing a segfault.
So add -L/usr/local/opt/cairo/lib in the generated config.make
of ocamlcairo for the CAIRO_LIBS variable
(yep it's unfortunate and ugly).
update: I was enable to make codemap/codegraph work on Macos Lion (10.7).
Even after playing with PKG_CONFIG_PATH I got some runtime errors
about Fatal error 35 with xquartz. I think recent version of Xquartz and
brew don't mix well with old versions of MacOS.
- If you have problem installing cairo and get an error message like:
"Error: db46 requires the Java for Mac OS X development headers.
Error: Download the Java Developer Package from:
then follows the link and install the Java Developer Package.
An alternative fix may be to reinstall XCode as indicated at:
- If you have problem installing gtk2 and get an error related to atk,
$ sudo port install gobject-introspection
$ sudo port install gtk2
- If you have a problem when compiling pfff in its external/ocamlgtk directory
with an error like:
"Error: Error on dynamically loaded library:
./ dlopen(./, 138):
Symbol not found: _g_simple_async_result_take_error"
$ sudo port selfupdate
$ sudo port upgrade outdated
which should update glib2 and fix the bug.
- For cairo and gtk don't use the quartz setting as it is currently
buggy under macports.