octave-maintainers
[Top][All Lists]
Advanced

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

Re: How can I build Octave without debugging symbols? (What is the "offi


From: Mike Miller
Subject: Re: How can I build Octave without debugging symbols? (What is the "official" method?)
Date: Sat, 19 May 2012 10:15:33 -0400

On Fri, May 18, 2012 at 11:10 PM, Jordi Gutiérrez Hermoso
<address@hidden> wrote:
> On 18 May 2012 21:56, irrational John <address@hidden>
> wrote:
>> 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.
>
> Normally this should go in the help list, but I guess today is the day
> for having discussions on the dev list about building Octave.
>
>> 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?!?
>
> Yes?!? I believe so?!? Perhaps you should update this part of the FAQ:
>
>    http://octave.org/wiki/index.php?title=FAQ#Installation_issues_and_problems
>
>> 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.
>
> Yes, I am not sure what brought about this change, but it looks like
> your assessment that you need to do this with ./configure and not make
> is correct. I thought earlier versions of Octave did allow you to pass
> the flags to make, but I suppose this is no longer true.
>
> I can make it work this way if I pass flags through the internal
> CONFIGURE_CXX and CONFIGURE_C flags. Perhaps libtool is interfering
> here.

I took a look at this, it seems that the user's CFLAGS and CXXFLAGS
are being prepended to AM_CFLAGS and AM_CXXFLAGS in Octave, and then
automake (correctly) appends them after the AM_ flags during the
build.

Why are they prepended?  I'm sure this was done for a reason but I
haven't been around long enough to know what that was.

The normal (required?) GNU build methodology is for CFLAGS and
CXXFLAGS to be completely up to the user and to appear after any flags
that are particular to the project.  The order of precedence (from
highest to lowest) is:

  1) command-line arguments to make
  2) command-line arguments to configure
  3) environment variables
  4) none (configure chooses sane defaults, usually "-g -O2")

Octave seems to be (somewhat) trashing this because it actually builds
with (simplified)

  $(CONFIGURE_CFLAGS) [...] $(CFLAGS) -pthread $(CFLAGS).

So user flags will override, as they should, but you'll still get the
"-g" if that's how configure was run.

I'd suggest taking out the redundant CFLAGS/CXXFLAGS and get rid of
the CONFIGURE_x variables completely.  I am willing to investigate and
patch, but I don't know what problems these extra definitions were put
in place to fix.

-- 
mike


reply via email to

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