help-octave
[Top][All Lists]
Advanced

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

Statically linking octave-2.1.72 in MacOS X


From: Carlos Sánchez de La Lama
Subject: Statically linking octave-2.1.72 in MacOS X
Date: Thu, 9 Feb 2006 23:22:45 +0100

Hello,

I have been trying to compile octave-2.1.72 in my Tiger iBook, and after peering a bit on this list I found the accepted method for doing it is to use dynamic libraries (configure --enable-shared -- enable-dynamic --disable-static). Personally I do not like fixing linking errors this way, it makes me feel something is not really fixed but only somehow "hidden", so after some testing I have found a way to compile it statically. I send it to the list just it is useful for someone.

I have installed in $HOME/Unix/local the following packages octave requires: dejagnu-1.4.4 (not really needed), gcc-3.4.5 (I put it after system directories in PATH so I use Apple's gcc, but I need this for g77), gnuplot-4.0.0, readline-5.1 (MacOS seems to have libedit instead of this) and ncurses-5.5 (system ncurses has a symbol conflict with my compiled readline).

Now I configure with:

./configure --prefix=$HOME/Unix/local CPPFLAGS=-I$HOME/Unix/local/ include LDFLAGS="-L$HOME/Unix/local/lib -lcc_dynamic -Wl,- search_paths_first"

to be sure it will take the ncurses from my local directory (Apple's ld appears to always take the .dylib instead of any present .a unless given the -search_paths_first parameter).

After the I edit src/Makefile to comment out the line "XERBLA = ../ libcruft/blas-xtra/xerbla.o", and also edit libcruft/Makefile to remove blas-xtra from the CRUFT_DIRS definition (I think these two are configure errors, as it detect MacOS X has a blas framework and uses it, but it also wants to put blas-xtra into liboctinterp and libcruft, causing a duplicate symbol error during linking if not removed).

And then make & make install as usual. I have an local user static octave build, working correctly so far (make check was also sucessful). I am quite new to MacOS X, and I do not really know a lot about how dynamic libs work on this system , so if anybody sees something wrong in this procedure feel free to comment.


Carlos Sánchez de La Lama
address@hidden



-------------------------------------------------------------
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]