octave-maintainers
[Top][All Lists]
Advanced

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

How can I build Octave without debugging symbols? (What is the "official


From: irrational John
Subject: How can I build Octave without debugging symbols? (What is the "official" method?)
Date: Fri, 18 May 2012 21:56:46 -0400

Apologies if this question is inappropriate here. I honestly just did
not know where else to ask it. I did ask on the help-octave mailing
list a month ago, but got no response at all.

Because the version of Octave installed from the Ubuntu repository is
somewhat older (v3.2), I have been experimenting with building Octave
from the source code using the commands below.

> ./configure
> make
> make check
> make install

This went mostly fine for me except that it seemed to require a build
directory of nearly 2GB?!?

Eventually I stumbled across the comment below in appendix G.2 of the
Octave documentation.

> Octave requires approximately 1.4 GB of disk storage to unpack and compile
> from source (significantly less, 400 MB, if you don't compile with debugging
> symbols). To compile without debugging symbols try the command
>          make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
> instead of just make.

OK, fine. The only problem is that this direction does not work. Or at
least it did not work for me.

If I use "make CFLAGS=-O CXXFLAGS=-O LDFLAGS=" all the modules appear
to still be compiled with the "-g" option and include the symbol
information used only when debugging.

Is it possible that the documentation is just wrong?

What DOES seem to work for me is to specify the flags as arguments to
"./configure" rather than to "make".

Using "./configure CFLAGS=-O2 CXXFLAGS=-O2" cut down the size of the
directory I built octave in from ~1.7GB to ~250MB.

But I was just guessing when I did this. I do not know if this method is "safe".

Is specifying the options on ./configure the recommended way to change
the compile options when building Octave or is another approach
recommended?

I  also am curious if using other options to increase the level of
optimization might be known to cause problems.

For example, I have also tried
   ./configure CFLAGS="-O3 -m64" CXXFLAGS="-O3 -m64"
and
   ./configure CFLAGS="-O3 -march=native" CXXFLAGS="-O3 -march=native"

(Note: I understand that using "-march=native" implies you can only
use the octave built with that option on the computer you compiled it
on. But for my purposes that is OK. And I was curious to see how much
of a difference it might make in performance.)

-irrational john


reply via email to

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