help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave On MacOSX


From: Joe Koski
Subject: Re: Octave On MacOSX
Date: Mon, 08 Jan 2007 13:54:45 -0700
User-agent: Microsoft-Entourage/11.2.5.060620

Thomas,

Your README file is certainly a big step forward for the Mac. Thanks for
taking the time to do it. There was once a octave wiki file on this, but,
last I looked, it was far out of date.

I have been building my own octave from source for over three years,
although, at times, I have also used the HPC and Fink versions. Based on my
octave building experience, here are some comments on your README.

My general comment is that Apple changes OS X and Xcode Developer Tools
frequently, and the instructions that worked today don't necessarily work
tomorrow. There have been times, especially soon after new OS X major
releases (10.2.0,10.3.0 and 10.4.0), that building of open source codes was
impossible. Typically, by about 10.x.6, the kinks are worked out and things
begin to work again.

Specific comments on your README:

- I have never found it necessary to upgrade bison, sed or awk. The versions
in the Xcode Developer Tools work for building octave on my G5 Mac. I hope
Apple upgrades all their tools for the Tiger release later this year. I did
have to upgrade automake in order to build the new gnuplot, for example.

- Yes, readline has been a problem right along, and installing a new
libreadline.a is essential to a fully working octave.

- I have X11 installed, but with AquaTerm, you may not need it. Maybe it is
needed for fonts or something?

- I hope that the newer versions of sparsesuite have a better installer. In
building octave-2.9.x, installing the spare matrix libraries has been a real
trip hazard. I realize that this is outside the scope of octave support, but
added help on the octave wiki may be in order. The Linux folks seem to count
on the sparsesuite version released with their OS. To compound the disorder,
sparsesuite seems to be changing rapidly, also.

- I have built octave with gfortran, g95 and g77, and, as far as I know,
they all currently work. gfortran tends to work or not work depending on the
current build version; however, gfortran should probably be the preferred
because it is part of gcc, and allows use of Fortran 95 features. There was
an extra update called cctools that, at times, has been required for the use
of Fortran. I hope that's a thing of the past. At least I haven't needed to
install cctools lately.

- octave-forge is another story. There are dependencies there like
ImageMagick that require some additional studies and downloads. My major
comment about any open source code on a Mac is that the biggest part of the
build is getting the dependencies correctly installed first. That's where
your README will really help.

Joe





on 1/8/07 9:28 AM, Thomas Treichl at address@hidden wrote:

> Hi,
> 
> on January, 4, 2007 GMT22:30 I sent an email to the help-list with the subject
> "How To Minimalistically GNUify MacOSX For Building Octave From Scratch".
> Maybe
> the spam-filter has eaten my email, but never mind about that, here is already
> the first update of README.MacOSX.
> 
> The good thing about this update is, that we do already know that the step by
> step procedure does work on a CoreDuo Mac as well as on a PPC G4 Mac if one
> follows step by step the README.MacOSX file.
> 
> Also make sure, that you didn't mix up a lot of programs and libraries from
> different Internet resources: One might have the idea to install "bison" from
> the hmug.org and the "sed" from the fink.sourceforge.net and the "gfortran"
> from
> the hpc.sourceforge.net site. This won't be working! This is like mixing a
> Debian/RedHat/SuSE-distribution all together - this doesn't work very well
> too!
> 
> So what I mean is that you should decide which resource you want to use: if
> you
> want to use fink.sourceforge.net then you need everything from fink, or use
> the
> darwinports.com you take everything from darwinports etc. - or you take this
> README.MacOSX file for building everything from scratch.
> 
> Ok, that's it, enjoy!
> Thomas
> How To Minimalistically GNUify MacOSX For Building Octave From Scratch
> ======================================================================
> 
> Author:    address@hidden
> Created:   2007.01.04
> ChangeLog: -at the bottom of this file-
> 
> 
> Binary-Releases:
> ================
> If you are looking for an already build version of octave for MacOSX
> then visit one of the following web pages that do provide a
> binary-release of octave and follow the instructions for installing
> octave from these web pages:
>   - http://fink.sourceforge.net/
>   - http://hpc.sourceforge.net/
>   - http://www.hmug.org/
> 
> 
> Source-Compilation:
> ===================
> Before building octave from scratch on a MacOSX platform you need to
> install several GNU programs and libraries that are not shipped with
> your Mac. This description will guide you through the procedure of
> GNUifying your MacOSX step by step, so that you are then be able to
> configure, compile, install and run the octave program.
> 
> If available then binary-releases of the necessary programs are
> preferred, otherwise there is no other way as to configure, compile and
> install other source-releases of these programs. The minimalistical
> requirements for installing these programs on your Mac are that you
> have at least MacOSX version 10.4.x running on your Mac (either
> CoreDuo or PPC).
> 
> 
> Step-By-Step Procedure:
> =======================
> 
> ( 1) Install the Xcode-Tools (ie. the gcc-suite, the c-library and
>      other tools) that are shipped with your computer from "MacOSX
>      Install Disc 1". Optionally you can get the latest version of
>      these tools from http://developer.apple.com/tools/download.
>      Follow the instructions from the "About Xcode Tools.pdf" file on
>      how to install these tools. Make sure that you have installed the
>      latest releases.
> 
> ( 2) Install the X11 environment (ie. the Xserver application etc.)
>      that are shipped with your computer from "MacOSX Install Disc
>      1". The X11 environment can be installed via the "Optional
>      Installs.mpkg" program and is needed by the GnuPlot program
>      ( 6). Make sure that you have installed the latest release.
>      Choose "Software-Update" in your menu bar to download and to
>      reinstall the latest versions.
> 
> ( 3) Prepare a directory and the settings on your environment for
>      installing the following programs and libraries. Create the
>      directory /usr/local that is not present by default on your new
>      Mac and set up some variables in either your .profile file (if
>      you plan to use the Terminal.app from MacOSX for compiling
>      octave) or your .bashrc file (if you plan to use the terminal
>      application from your X11 environment). Do this the following
>      way:
> 
>        sudo mkdir /usr/local
> 
>      Edit .profile or .bashrc
> 
>        export PATH=$PATH:/usr/local/bin:/usr/X11R6/bin
>        export CFLAGS="-I/usr/local/include"
>        export LDFLAGS="-L/usr/local/lib"
> 
> ( 4) Download and install a binary-release of a TeX environment for
>      your Mac in order to build the documentation for octave. One of
>      the binary-distributions that can be downloaded from Internet at
>      this time is the Mac-TeX environment that can be found there
>      http://tug.org/mactex. Follow the installation instructions
>      provided by this package.
> 
> ( 5) Download and install a binary-release of a Fortran-compiler
>      environment for your Mac. One of the binary-distributions that
>      can be downloaded from Internet at this time is the GFortran
>      environment. It is hosted at http://www.macresearch.org. The
>      GFortran compiler is shipped in a binary-tar.gz file. Unpack and
>      install this program the following way:
>        
>        tar -xzf gfortran-intel-bin.tar.gz
>        sudo cp -r ./usr/local/* /usr/local
> 
>      Also read the troubleshooting part at the bottom of this file for
>      further details about which Fortran compiler to use for MacOSX.
> 
> ( 6) Download and install a source-release of the program "sed"
>      because the one that is implied in MacOSX is out of date in order
>      to build octave. The source-release of the latest sed program can
>      be downloaded from Internet at
>      http://ftp.gnu.org/pub/gnu/sed. Unpack, configure, compile and
>      install this program the following way:
> 
>        tar -xzf sed-X.x.x.tar.gz
>        cd sed-X.x.x
>        ./configure --prefix=/usr/local/ --with-included-regex
> --with-included-gettext
>        make && sudo make install
> 
>      and then move your old /usr/bin/sed program to another name, eg.:
> 
>        sudo mv /usr/bin/sed /usr/bin/__sed
> 
>      Also read the troubleshooting part at the bottom of this file for
>      further details if an error occurs at compilation.
> 
> ( 7) Download and install a source-release of the program "bison"
>      because the one that is implied in MacOSX is out of date in order
>      to build octave. The source-release of the latest bison program
>      can be downloaded from Internet at
>      http://ftp.gnu.org/pub/gnu/bison. Unpack, configure, compile and
>      install this program the following way:
> 
>        tar -xzf bison-X.x.tar.gz
>        cd bison-X.x
>        ./configure --prefix=/usr/local/
>        make && sudo make install
> 
>      and then move your old /usr/bin/bison program to another name, eg.:
> 
>        sudo mv /usr/bin/bison /usr/bin/__bison
> 
> ( 8) Download and install a source-release of the program "gawk". Gawk
>      is not included in MacOSX (the program "awk" is included in
>      MacOSX but "gawk" is needed to compile octave). The
>      source-version of the latest gawk-release can be downloaded from
>      Internet at http://ftp.gnu.org/pub/gnu/gawk. Unpack, configure,
>      compile and install this program the following way:
> 
>        tar -xzf bison-X.x.x.tar.gz
>        cd bison-X.x.x
>        ./configure --prefix=/usr/local/
>        make && sudo make install
> 
> ( 9) Download and install a source-release of the "readline"
>      library. There is already a readline-library included in MacOSX
>      but by now I do not know how to include the installed version in
>      the compilation procedure of octave. The source-version of the
>      latest readline-release can be downloaded from Internet at
>      http://ftp.gnu.org/pub/gnu/readline. Unpack, configure, compile
>      and install this program the following way:
> 
>        tar -xzf readline-X.x.tar.gz
>        cd readline-X.x
>        ./configure --prefix=/usr/local/ --enable-shared
>        make && sudo make install
> 
> (10) Download and install a source-release of the program
>      "gnuplot". The source-release of the latest gnuplot program can
>      be downloaded from Internet at http://www.gnuplot.info. Unpack,
>      configure, compile and install this program the following way:
> 
>        tar -xzf gnuplot-X.x.x.tar.gz
>        cd gnuplot-X.x.x
>        ./configure --prefix=/usr/local/
>        make && sudo make install
> 
> (**) You are already done setting up your MacOSX for configuring,
>      building, installing and running the minimalistic version of
>      octave. If you want full octave functionality you need to
>      download and install more source packages before building octave,
>      read the EXTENSIONS part of this file at the bottom.
> 
> (11) Download and install a source-release of the latest "octave"
>      program. The latest release can always be found at
>      http://www.octave.org. Unpack, configure, compile and install
>      this program the following way:
> 
>        tar -xzf octave-X.x.x.tar.gz
>        cd octave-X.x.x
>        ./configure --prefix=/usr/local/ --enable-shared
>        make && make check && sudo make install
> 
>      Also read the troubleshooting part at the bottom of this file for
>      further details if an error occurs at compilation.
> 
> (12) Enjoy using octave!
> 
> 
> EXTENSIONS:
> ===========
> 
> For using the full functionality of octave some more source-packages
> need to be installed on your Mac.
> 
> (+A) Download and install a source-release of the "pcre"
>      library. There is no pcre-library included in MacOSX. The
>      source-version of the latest pcre-release can be downloaded from
>      Internet at http://www.pcre.org. Unpack, configure, compile and
>      install this program by following the installation
>      instructions by this package.
> 
> (+B) Download and install a source-release of the "hdf5"
>      library. There is no hdf5-library included in MacOSX. The
>      source-version of the latest hdf5-release can be downloaded from
>      Internet at http://www.hdfgroup.org. Unpack, configure, compile
>      and install this program by following the installation
>      instructions by this package.
> 
> (+C) Download and install a source-release of the "SuiteSparse"
>      library. There is no SuiteSparse-library included in MacOSX. The
>      source-version of the latest release can be downloaded from
>      Internet at
>      http://www.cise.ufl.edu/research/sparse/SuiteSparse. Unpack,
>      configure, compile and install by following the installation
>      instructions by this package.
> 
> 
> TROUBLESHOOTING:
> ================
> 
> ( 5) When compiling octave there may occur an error eg.
> 
>        ld: Undefined symbols:
>        restFP
>        saveFP
>        /usr/bin/libtool: internal link edit command failed
> 
>     This is a known MacOSX problem for over years now and may occur if
>     you have multiply version of Fortran compilers installed on your
>     system. GFortran is one of the known Fortran compilers that do
>     work very well with the gcc-suite that is shipped with your
>     computer. When running "./configure" in your octave path then make
>     sure that GFortran is the one and only Fortran compiler on your
>     system.
> 
> ( 6) When installing sed there may occur an error that sed cannot be
>      build. This is a known problem, you first need a working sed (the
>      one implied in MacOSX is too old) to build another sed for your
>      system, so do the following:
> 
>      (a) Enter the sed directory and edit config.h ca. line 14:
>            #define ENABLE_NLS 0
>      (b) Call ./bootstrap.sh
>      (c) sudo mv /usr/bin/sed /usr/bin/__sed
>      (d) sudo ln -s /Users/YourHOME/sed-X.x.x/sed/sed /usr/bin/sed
>      (e) ./configure --prefix=/usr/local/ --with-included-regex
> --with-included-gettext
>      (f) make && sudo make install
>      (g) sudo rm /usr/bin/sed
> 
> (11) On PPC Macs it seems like you need to add another linker option
>      that will not be added by default. If you see an error like
> 
>        ld: Undefined symbols:
>        _do_fio
>        _e_wsfe...
> 
>      you should better do at step ( 3) for also taking the
>      libg2c.dylib library at linking time and that the linker finds
>      the desired functions:
> 
>        export LDFLAGS="-L/usr/local/lib -lg2c"
> 
> 
> ChangeLog of this README.MacOSX file:
> =====================================
> 
> 2007.01.07 Thomas Treichl
>   It is now possible to compile octave also on PPC machines. The
>   README.MacOSX file has been updated.
> 
> 2007.01.08 Thomas Treichl
>   Added (11) in Troubleshooting.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]