help-octave
[Top][All Lists]
Advanced

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

Re: Statically linking octave-2.1.72 in MacOS X


From: Joe Koski
Subject: Re: Statically linking octave-2.1.72 in MacOS X
Date: Thu, 09 Feb 2006 16:09:30 -0700
User-agent: Microsoft-Entourage/11.2.1.051004

on 2/9/06 3:22 PM, Carlos Sánchez de La Lama at address@hidden wrote:

> 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
> 
Carlos,

If I'm wrong, jwe can correct me, but the purpose of enabling dynamic
linking is to allow .oct (compiled C or Fortran) files to be easily
accessible. You also get a much smaller executable than if you statically
load everything including the kitchen sink. Correct? I initially had the
same feeling that a static linking approach would be better, but have found
that the dynamic library approach works just fine with octave.

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]