Octave 3.3.50+ build on Mac OS X 10.6.2 8 Jan 2010 1. There was considerable trouble finding a working Fortran. This, it turned out, was mainly due to the fact that nothing worked reliably with -O2. After switching to -O0 it appears that most compiler choices work, but not all have been retested. The current one is: GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5646) 2. There was a problem when building with /usr/local/bin ahead of /usr/bin. I got a build to complete OK by putting /usr/local/bin after /usr/bin. This proved that some executables existed in both directories and the one in /usr/local/bin was wrong. There were a number of candidates since I had first built the programs that were installed in /usr/local/bin in 2007. The next step was to either delete or replace these with up-to-date versions. 3. All installation and updating was done from one of three sources: http://www.opensource.apple.com/release/mac-os-x-1062/ http://ftp.gnu.org/pub/gnu/ or from the "home" of the package. In all cases the .tar.gz packages installed into /usr/local I did not make any use of Fink or MacPorts. I do not think that installing into "non standard'\" directories is a very good idea and I had problems when I used these sources a few years ago. The packages installed were: flex-2.5.35.tar.gz fltk-1.1.10-source.tar,gz fontconfig-2.8.0.tar.gz freetype-2.3.9.tar.gz git-4.41.tar.gz MacTeX-2009.mpkg.zip (from TeX source) Mercurial-1.4.1-py2.6-macosx10.6.zip pcre-8.00.tar.gz pkg-config-0.23.tar.gz sed-4.2.tar.gz tcltk-8.5.5-x11.dmg All of the above packages ending in tar.gz installed without problems using the standard ./configure;make;make install sequence. The octave build commands are: ./autogen.sh;./configure "F77=gfortran -ff2c"; make; make -i ;make -i check The make -i check passed with 1 error (data.c) The -i was needed due to current lack of a working gnuplot. Since the backend fltk works, plots can be drawn and this works OK, including text since fontconfig works. At this point the ./configure "F77=gfortran -ff2c" produces: Octave is now configured for i386-apple-darwin10.2.0 Source directory: . Installation prefix: /usr/local C compiler: gcc -mieee-fp -Wall -W -Wshadow -Wformat -g -O0 -D_THREAD_SAFE C++ compiler: g++ -mieee-fp -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O0 Fortran compiler: gfortran -ff2c -O -mieee-fp Fortran libraries: -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -lm -lgfortranbegin -lgfortran Lex libraries: LIBS: -lm AMD CPPFLAGS: AMD LDFLAGS: AMD libraries: ARPACK libraries: BLAS libraries: -Wl,-framework -Wl,vecLib CAMD CPPFLAGS: CAMD LDFLAGS: CAMD libraries: CARBON libraries: -Wl,-framework -Wl,Carbon CCOLAMD CPPFLAGS: CCOLAMD LDFLAGS: CCOLAMD libraries: CHOLMOD CPPFLAGS: CHOLMOD LDFLAGS: CHOLMOD libraries: COLAMD CPPFLAGS: COLAMD LDFLAGS: COLAMD libraries: CURL CPPFLAGS: CURL LDFLAGS: CURL libraries: -lcurl CXSPARSE CPPFLAGS: CXSPARSE LDFLAGS: CXSPARSE libraries: DL libraries: -ldl FFTW3 CPPFLAGS: FFTW3 LDFLAGS: FFTW3 libraries: -lfftw3 FFTW3F CPPFLAGS: FFTW3F LDFLAGS: FFTW3F libraries: fontconfig CFLAGS: -I/usr/local/include fontconfig LIBS: -L/usr/local/lib -lfontconfig FT2_CFLAGS: -I/usr/local/include/freetype2 -I/usr/local/include FT2_LIBS: -L/usr/local/lib -lfreetype -lz GLPK CPPFLAGS: GLPK LDFLAGS: GLPK libraries: -lglpk graphics CFLAGS: -I/usr/local/include -I/usr/local/include/FL/images -arch i386 graphics LIBS: -L/usr/local/lib -arch i386 -lfltk_gl -framework AGL -framework OpenGL -lfltk -framework Carbon -framework ApplicationServices GraphicsMagick++ CPPFLAGS: GraphicsMagick++ LDFLAGS: GraphicsMagick++ libraries: HDF5 CPPFLAGS: HDF5 LDFLAGS: HDF5 libraries: LAPACK libraries: OPENGL libraries: -L/usr/local/lib -lfontconfig -Wl,-framework -Wl,OpenGL PTHREAD flags: -D_THREAD_SAFE PTHREAD libraries: QHULL CPPFLAGS: QHULL LDFLAGS: QHULL libraries: -lqhull QRUPDATE libraries: READLINE libraries: -lreadline REGEX libraries: -L/usr/local/lib -lpcre TERM libraries: -lncurses UMFPACK libraries: 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 configure: WARNING: UMFPACK not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow. configure: WARNING: AMD library not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: COLAMD library not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: CCOLAMD library not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: CHOLMOD library not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: CXSparse library not found. This will result in some lack of functionality for sparse matrices. configure: WARNING: arpack not found. The eigs function will be disabled. configure: WARNING: GraphicsMagick++ library not found. The imread function for reading image files will not be fully functional. configure: WARNING: HDF5 library not found. Octave will not be able to save or load HDF5 data files. configure: configure: NOTE: libraries may be skipped if a library is not found OR configure: NOTE: if the library on your system is missing required features. [godfrey_MBP:octave/hg/octave] godfrey% ===================================== The missing libraries should be pretty easy to resolve. The failure of gnuplot is due to its receiving the string: terminal aqua ... and it says it does not understand aqua. Someone probably knows how to fix this. Finally, having gotten tired of setting the _REENTRANT flag, I patched one of the Xcode headers to turn on lgamma_r and lgammal_r unconditionally. These tests seemed pretty silly to me. See /usr/include/architecture/i386/math.h at line 625. And, I edited out the SH1A test in bootstrap since it is not needed, and I do not have it. This is pretty close to a fully functional system. The most worrying thing is the requirement of -O0. It appears that gcc in its various forms will never converge to a reliable system. C is like that. As Kernigan said: "the only way to find out the meaning of C syntax is to ask the compiler." Michael 8 Jan 2010