Port-mac68k archive

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

Re: Using pkgsrc with low RAM

On 4 April 2013 19:03, James Stocks <stocksy%stocksy.co.uk@localhost> wrote:
> Hi,
> I'm trying to build lighttpd from pkgsrc on my Mac LC 475 which has 32MB RAM 
> and 50MB swap.  I get as far as building pcre, where the build stops.  From 
> this log message:
> UVM: pid 29033 (cc1), uid 0 killed: out of swap
> I gather that I'm running out of available memory.  I read somewhere that 
> putting CFLAGS+=-O0 in /etc/mk.conf would help, but it didn't have any effect 
> (and I don't understand what it would do).
> I realise that this probably isn't a mac68k specific problem, but I reasoned 
> that many people on this list will have systems with small amounts of RAM and 
> might be willing to offer advice.

I suspect pcre may use C++, which uses CXX flags.

Could you try adding the following to mk.conf:

CFLAGS+=-O1    # for c
CXXFLAGS+=-O1  # for c++
MAKE_FLAGS+=-O1  # For imake

In each case the line is adding (the +=) "-O1" to the existing compiler options.

The default compiler optimisation option is -O2 (For optimise very
hard, and trade off large quantities of memory and time compiling for
small runtime gains).

-O1 is optimise relatively well, but do not spend large quantities of
memory and compile time

-O0 is do not optimise at all, which gives the fastest compile, but
definitely worse runtime performance.

Home | Main Index | Thread Index | Old Index