comparison README.MacOS @ 11410:2df163be223e

Update build instructions in README.MacOS
author Ben Abbott <bpabbott@mac.com>
date Fri, 24 Dec 2010 07:19:01 -0800
parents fba7b5538b18
children cbe3963daefd
comparison
equal deleted inserted replaced
11409:dd539a976451 11410:2df163be223e
1 Building on MacOS can vary significantly between versions. These instructions 1 1. General Users
2 document the procedure for MacOS 10.6.X. 2 ================
3
4 A MacOS bundle is available from sourceforge.
5
6 http://octave.sourceforge.net/index.html
7
8 There are also Octave packages available from both Fink and MacPorts. Each
9 of these package managers handle the details of compiling Octave from source.
10
11 http://www.finkproject.com
12 http://www.macports.org/
13
14 2. Developers
15 =============
16
17 Building on MacOS can vary significantly between versions. These
18 instructions document the procedure for MacOS 10.6.X.
19
20 2.1 Development Tools
21 ----------------------
22
23 Apple's Xcode Developer's Tool must be installed to build from source code.
24
25 http://developer.apple.com/technologies/xcode.html
26
27 A Fortran compiler is also required. AT&T Research provides versions of
28 gfortran which have been patched to work with recent versions of Xcode.
29
30 http://r.research.att.com/tools/
31
32 2.2 Dependencies
33 ----------------
34
35 There are additional build dependencies and run-time dependencies which
36 must be met. Using a package management system such as Fink or MacPorts
37 is the easiest way to meet these requirements.
38
39 http://www.finkproject.com
40 http://www.macports.org/
41
42 The list of dependencies is below. Dependencies in the list are referred to
43 using the name of the Fink package.
44
45 aquaterm
46 arpack
47 autoconf (>= 2.6.0)
48 automake (>= 1.11)
49 fftw3 (>= 3.1.1)
50 fftw3-shlibs (>= 3.1.1)
51 flex >= 2.5.30
52 fltk-aqua-shlibs
53 glpk-dev
54 glpk-shlibs
55 gnuplot (>= 4.2.6)
56 graphicsmagick (<= 1.3.7)
57 graphicsmagick-shlibs (<= 1.3.7)
58 hdf5 (>= 1.6.5)
59 hdf5-shlibs (>= 1.6.5)
60 libcurl4
61 libcurl4-shlibs
62 libncurses5
63 libncurses5-shlibs
64 libtool >= 2.2.2
65 ncurses
66 pcre
67 pcre-shlibs
68 qhull
69 qrupdate (**)
70 readline5
71 readline5-shlibs
72 sed
73 suitesparse (= 3.1.0-1 )
74
75 Some of Octave's dependencies are among the default packages for Fink. These
76 include the list below, and possibly others as well.
77
78 tetex
79 texinfo
80
81 (**) Fink does not yet have a package for qrupdate. However, one is
82 available in the tracker at the link below.
83
84 http://sourceforge.net/tracker/index.php?func=detail&aid=2861045&group_id=17203&atid=414256
85
86 2.3 Building With Dependencies Satisfied by Fink
87 ------------------------------------------------
88
89 After installing each of the dependencies, the sources are compiled by
90 setting the proper environment variables and then following the standard build
91 sequence. The following is an example set of variables for a 32-bit processor
92 compling with gcc-4.2.
93
94 export FINK_PREFIX="/sw"
95 export PREFIX="/usr/local/bin"
96
97 export OPTFLAGS="-O0 -g"
98 export LDFLAGS="-L$FINK_PREFIX/lib -L/usr/lib -m32"
99 export CFLAGS="-I$FINK_PREFIX/include $OPTFLAGS -m32"
100 export CXXFLAGS=$CFLAGS
101 export CPPFLAGS=$CXXFLAGS
102 export ACLOCAL_FLAGS="-I$FINK_PREFIX/share/aclocal"
103 export PKG_CONFIG_PATH="$FINK_PREFIX/lib/pkgconfig"
104 export PATH="$FINK_PREFIX/var/lib/fink/path-prefix-10.6/:$PATH"
105 export MACOSX_DEPLOYMENT_TARGET=10.5
106 export PATH="$FINK_PREFIX/lib/flex/bin:$PATH"
107 export CPPFLAGS="-I$FINK_PREFIX/lib/flex/include $CPPFLAGS"
108 export LDFLAGS="-L$FINK_PREFIX/lib/flex/lib $LDFLAGS"
109 export CC="gcc-4.2"
110 export CPP="cpp-4.2"
111 export CXX="g++-4.2"
112 export F77="/usr/bin/gfortran-4.2"
113 export FLIBS="-lgfortran -lgfortranbegin"
114 export FFLAGS="-ff2c $OPTFLAGS -m32"
115 export CPPFLAGS="$CPPFLAGS -I$FINK_PREFIX/include/freetype2 \
116 -I$FINK_PREFIX/include/qhull \
117 -I/usr/include"
118 export CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE -D_REENTRANT"
119
120 ./autogen.sh
121 ./configure --prefix=$PREFIX \
122 --libexecdir='${prefix}/lib' \
123 --with-blas="-Wl,-framework -Wl,vecLib"
124 make
125
126 2.4 Building With Dependencies Satisfied by MacPorts
127 ----------------------------------------------------
128
129 TODO - add instructions.
130
131 2.5 Building without a package manager
132 --------------------------------------
133
134 TODO - add instructions.
3 135
4 136
5 Last updated: Fri Dec 17 20:19:25 PST 2010 137 John W. Eaton
138 jwe@octave.org
139
140 Ben Abbott
141 bpabbott@mac.com
142
143 Sat, 28 Oct 2010 16:06:00 EDT