This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 205
/
install_macos.txt
66 lines (55 loc) · 2.47 KB
/
install_macos.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Install brew, see http://brew.sh
(or install macports http://www.macports.org/)
Then
$ brew install objective-caml camlp4
For codemap and codegraph:
install xquartz at http://xquartz.macosforge.org/landing/
$ 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.
Troubles?
---------
- 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:
<https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
"
then follows the link and install the Java Developer Package.
An alternative fix may be to reinstall XCode as indicated at:
http://yoodey.com/how-fix-db46-problem-macport-installation-or-install-db46-mac-os-x-1065
- If you have problem installing gtk2 and get an error related to atk,
do:
$ sudo port install gobject-introspection
and
$ sudo port install gtk2
again.
- If you have a problem when compiling pfff in its external/ocamlgtk directory
with an error like:
"Error: Error on dynamically loaded library:
./dlllablgtk2.so: dlopen(./dlllablgtk2.so, 138):
Symbol not found: _g_simple_async_result_take_error"
do:
$ 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.