Location of octave libraries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Location of octave libraries

sustik
Hi All,

I apologize if this is not the proper forum for this question.

While writing my Makefiles I have the problem that on different
machines I have to
deal with different versions of octave.  (On my laptop I have 2.3.4,
at school they have
2.3.3.)  There does not appear to be a uniform location for the lib
files.  /usr/lib/octave is not a
symlink to /usr/lib/octave-3.2.[3|4] on either systems.

I guess I could call octave --version and parse out and build the
directory name in the Makefile.  Is that how others tackle this issue?

I intend to release some code and I would prefer not have to tell the users
to figure out the location of the libs.  (By the way, Matlab has the
same issue or even worse, I could not figure out how to get
automatically the include and lib dirs.)

Thanks!
-Matyas
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Location of octave libraries

Alexander Hansen-2
On 11/19/11 7:44 PM, Matyas Sustik wrote:

> Hi All,
>
> I apologize if this is not the proper forum for this question.
>
> While writing my Makefiles I have the problem that on different
> machines I have to
> deal with different versions of octave.  (On my laptop I have 2.3.4,
> at school they have
> 2.3.3.)  There does not appear to be a uniform location for the lib
> files.  /usr/lib/octave is not a
> symlink to /usr/lib/octave-3.2.[3|4] on either systems.
>
> I guess I could call octave --version and parse out and build the
> directory name in the Makefile.  Is that how others tackle this issue?
>
> I intend to release some code and I would prefer not have to tell the users
> to figure out the location of the libs.  (By the way, Matlab has the
> same issue or even worse, I could not figure out how to get
> automatically the include and lib dirs.)
>
> Thanks!
> -Matyas

How about parsing the output of "mkoctfile -p OPTION" ?  There are a lot
of OPTIONs as noted under "mkoctfile --help", and it is portable between
different Octave setups.

For example, I get:

$ mkoctfile -p LFLAGS
-L/sw/lib/octave/3.4.3 -L/sw/lib
$ mkoctfile -p INCFLAGS
-I/sw/include/octave-3.4.3/octave/.. -I/sw/include/octave-3.4.3/octave
-I/sw/include

as appropriate to build against installation of Octave-3.4.3 on a Mac
using the Fink package manager, and

$ mkoctfile -p LFLAGS
-L/usr/lib/octave-3.2.4
$ mkoctfile -p INCFLAGS
-I/usr/include/octave-3.2.4 -I/usr/include/octave-3.2.4/octave

for an installation of Octave-3.2.4 under Ubuntu.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Location of octave libraries

sustik
On Sat, Nov 19, 2011 at 8:02 PM, Alexander Hansen
<[hidden email]> wrote:
> How about parsing the output of "mkoctfile -p OPTION" ?  There are a lot
> of OPTIONs as noted under "mkoctfile --help", and it is portable between
> different Octave setups.

Thanks a lot!  That is exactly what I needed! (And thanks for not
scolding me about the docs,
it is indeed documented in man mkoctfile, I found it under -p I just
did not know what to search for and I admit I have not read all the
documentation like a book.)

-Matyas
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Location of octave libraries

John W. Eaton
Administrator
On 19-Nov-2011, Matyas Sustik wrote:

| On Sat, Nov 19, 2011 at 8:02 PM, Alexander Hansen
| <[hidden email]> wrote:
| > How about parsing the output of "mkoctfile -p OPTION" ?  There are a lot
| > of OPTIONs as noted under "mkoctfile --help", and it is portable between
| > different Octave setups.
|
| Thanks a lot!  That is exactly what I needed! (And thanks for not
| scolding me about the docs,
| it is indeed documented in man mkoctfile, I found it under -p I just
| did not know what to search for and I admit I have not read all the
| documentation like a book.)

There is also the octave-config script which provides similar
information.

jwe
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave