help-octave
[Top][All Lists]
Advanced

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

Building octave on a Mac with g95


From: Joe Koski
Subject: Building octave on a Mac with g95
Date: Wed, 11 Jan 2006 11:35:37 -0700
User-agent: Microsoft-Entourage/11.2.1.051004

With some help from the Apple unix-porting list and the g95 compiler
developer, Andy Vaught, I have successfully built octave-2.1.72 with g95 on
my Mac. My system is still at OS X 10.3.9, so I can't confirm that this
approach works for OS X 10.4, but it should be worth a try. The g95 compiler
is built with gcc-4.0.1, so it may be more compatible with the OS X 10.4
developer tools.

There was a problem because Linux and Macs do not access environment
variables the same way. Andy applied a patch to the Jan. 10, 2006 version of
g95 that solved the problem. The g95 compiler is easy to install and upgrade
with the use of a single symbolic link in /usr/local/bin (or wherever you
like). The instructions are on the web site (http://g95.sourceforge.net/).

To build octave with the bash shell, first, when starting in the octave
build directory

  export LDFLAGS="-L/usr/lib -lcc_dynamic"

This picks up some undefined symbols (saveFP and restFP). This approach also
works with gfortran and g77 on my machine.

Then ./configure --enable-shared --disable-static F77=/usr/local/lib/g95 (or
wherever your symbolic link to g95 is located) and make as usual.

It's relatively straight forward, once you know how, but it took me a week
of part-time tinkering and e-mailing to find out how.

Joe











-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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