Octave 3.3.50+ build on MacOS X 10.6.2, 17 Mar 2010 1. There was considerable trouble finding a working Fortran compliler. Apple's gcc 4.2.1 is required to link to Apple's OpenGL and Carbon frameworks. Unfortunately, Apple's variant of gcc 4.2.1 does not include a fortran compiler. Fortunately, that problem is resolved by installing the package available at the link below. http://r.research.att.com/tools/ 2. There were problems with the compiler options as well. The compiler option "-D_REENTRANT" (or equivalent) must be included to successfully complete the build process. 3. There are some new dependencies required since 3.2.x. Automake >= 1.11 Libtool >= 2.2.2 Autoconf >= 2.6.0 flex >= 2.5.30 (? ... I'm actually using 2.5.35) To install these using Fink ... $ fink install automake1.11 $ fink install libtool2 $ fink install autoconf2.6 $ fink install flex-devel Not having the specified versions may not be caught by the build process. Be sure to verify you have these installed, and that the build process sees them before their counter- parts that may be bundled with MacOS X. I satisified these dependencies using Fink. Be careful to ensure the include path (-I...) and lib path (-L...) places the include files and libraries associated with these dependencies ahead of those that are bundled with MacOS X. Other build dependencies I installed using Fink are; arpack fftw3 fltk-aqua (? not sure this is needed) fltk-aqua-shlibs glpk-dev graphicsmagick-shlibs <= 1.3.7 hdf5 libncurses5 libcurl4 pcre qhull qrupdate (**) readline5 sed suitesparse The run time dependencies are; glpk-shlibs gnuplot graphicsmagick readline5-shlibs fftw3-shlibs hdf5-shlibs ncurses libncurses5-shlibs aquaterm libcurl4-shlibs pcre-shlibs (**) Fink does not yet have a qrupdate package. However, I did submit a rudementary version to the Fink team. http://sourceforge.net/tracker/index.php?func=detail&aid=2861045&group_id=17203&atid=414256 The files attached to the above tracker item should be placed in the locations below. /sw/fink/10.6/local/main/finkinfo/sci/qrupdate.info /sw/fink/10.6/local/main/finkinfo/sci/qrupdate.patch /sw/src/qrpudate-1.0.1.tar.gz Then do the following to install qrupdate; fink scanpackages fink index fink install qrupdate 4. To build, I separated the process into three parts. 4.1 - pre-configure - - - - hg pull; hg update -C cd gnulib sed -i 's/^extern int _gl_warn_on_use$/_GL_EXTERN_C int _gl_warn_on_use/g' ./build-aux/warn-on-use.h cd .. patch -p1 < ../acx_pthread.diff export LIBTOOL=glibtool ./autogen.sh patch -p1 < ../sighandlers.diff - - - - 4.2 - configure (not all below may be necessary) - - - - export OPTFLAGS="-O0 -g" export LDFLAGS="-L$PREFIX/lib -L/usr/lib -m32" export CFLAGS="-I$PREFIX/include $OPTFLAGS -m32" export CXXFLAGS=$CFLAGS export CPPFLAGS=$CXXFLAGS export ACLOCAL_FLAGS="-I$PREFIX/share/aclocal" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" export PATH="$PREFIX/var/lib/fink/path-prefix-10.6/:$PATH" export MACOSX_DEPLOYMENT_TARGET=10.5 export PATH="$PREFIX/lib/flex/bin:$PATH" export CPPFLAGS="-I$PREFIX/lib/flex/include $CPPFLAGS" export LDFLAGS="-L$PREFIX/lib/flex/lib $LDFLAGS" export CC="gcc-4.2" export CPP="cpp-4.2" export CXX="g++-4.2" export F77="/usr/bin/gfortran-4.2" export FLIBS="-lgfortran -lgfortranbegin" export FFLAGS="-ff2c $OPTFLAGS -m32" export CPPFLAGS="$CPPFLAGS -I$PREFIX/include/freetype2 \ -I$PREFIX/include/qhull \ -I/usr/include" export CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE -D_REENTRANT" ./configure --prefix=$PREFIX \ --infodir='${prefix}/share/info' \ --mandir='${prefix}/share/man' \ --libexecdir='${prefix}/lib' \ --with-blas="-Wl,-framework -Wl,vecLib" - - - - 4.3 - post-configure - - - - export PREFIX="/sw" export PATH="$PREFIX/lib/flex/bin:$PATH" make make check - - - - As of today, I have one failure for data.cc 5. The result of my configure process is; Octave is now configured for i386-apple-darwin10.2.0 Source directory: . Installation prefix: /sw C compiler: gcc-4.2 -mieee-fp -Wall -W -Wshadow -Wformat -I/sw/include -O1 -m32 -D_THREAD_SAFE C++ compiler: g++-4.2 -mieee-fp -I/sw/include/freetype2 -I/sw/include -I/usr/X11/include -Wall -W -Wshadow -Wold-style-cast -Wformat -I/sw/include -O1 -m32 -D_THREAD_SAFE -D_REENTRANT Fortran compiler: /usr/bin/gfortran-4.2 -ff2c -O1 -m32 Fortran libraries: -lgfortran -lgfortranbegin Lex libraries: LIBS: -lm AMD CPPFLAGS: AMD LDFLAGS: AMD libraries: -lamd ARPACK libraries: -larpack BLAS libraries: -Wl,-framework -Wl,vecLib CAMD CPPFLAGS: CAMD LDFLAGS: CAMD libraries: -lcamd CARBON libraries: -Wl,-framework -Wl,Carbon CCOLAMD CPPFLAGS: CCOLAMD LDFLAGS: CCOLAMD libraries: -lccolamd CHOLMOD CPPFLAGS: CHOLMOD LDFLAGS: CHOLMOD libraries: -lcholmod COLAMD CPPFLAGS: COLAMD LDFLAGS: COLAMD libraries: -lcolamd CURL CPPFLAGS: CURL LDFLAGS: CURL libraries: -lcurl CXSPARSE CPPFLAGS: CXSPARSE LDFLAGS: CXSPARSE libraries: -lcxsparse DL libraries: -ldl FFTW3 CPPFLAGS: FFTW3 LDFLAGS: FFTW3 libraries: -lfftw3 FFTW3F CPPFLAGS: FFTW3F LDFLAGS: FFTW3F libraries: -lfftw3f fontconfig CFLAGS: -I/usr/X11/include fontconfig LIBS: -L/usr/X11/lib -lfontconfig FT2_CFLAGS: -I/sw/include/freetype2 -I/sw/include FT2_LIBS: -L/sw/lib -lfreetype -lz -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices GLPK CPPFLAGS: GLPK LDFLAGS: GLPK libraries: -lglpk graphics CFLAGS: -I/sw/include -arch i386 -D_THREAD_SAFE -D_REENTRANT graphics LIBS: -L/sw/lib/fltk-aqua/lib -L/sw/lib -L/sw/lib -arch i386 -lfltk_gl -framework AGL -framework OpenGL -lfltk -lpthread -framework Carbon -framework ApplicationServices GraphicsMagick++ CPPFLAGS: -I/sw/include/GraphicsMagick GraphicsMagick++ LDFLAGS: -L/sw/lib GraphicsMagick++ libraries: -lGraphicsMagick++ -lGraphicsMagick HDF5 CPPFLAGS: HDF5 LDFLAGS: HDF5 libraries: -lhdf5 LAPACK libraries: OPENGL libraries: -L/usr/X11/lib -lfontconfig -Wl,-framework -Wl,OpenGL PTHREAD flags: -D_THREAD_SAFE PTHREAD libraries: QHULL CPPFLAGS: QHULL LDFLAGS: QHULL libraries: -lqhull QRUPDATE libraries: -lqrupdate READLINE libraries: -lreadline REGEX libraries: -L/sw/lib -lpcre TERM libraries: -lncurses UMFPACK libraries: -lumfpack X11 include flags: X11 libraries: -L/usr/X11/lib -lX11 Z CPPFLAGS: Z LDFLAGS: Z libraries: -lz Default pager: less gnuplot: gnuplot Do internal array bounds checking: false Build static libraries: false Build shared libraries: true Dynamic Linking: true (dlopen) Include support for GNU readline: true 64-bit array dims and indexing: false 6. Warning: My build process does *not* provide a means to *install* Octave. A functional Fink package needs to be developed for that. To run Octave I placed a simple shell script in /usr/local/bin which contains ... - - - - - #! /bin/sh -ev /run-octave $1 $2 $3 $4 $5 $6 - - - - - Eventually, a Fink package will be available. However, that will will require a new gcc-4.2 package that includes gfortran.