Re: libxul compilation problem

2010-10-18 Thread Fernando Apesteguía
On Sun, Oct 17, 2010 at 7:55 PM, Robert Bonomi bon...@mail.r-bonomi.com wrote:
 From owner-freebsd-questi...@freebsd.org  Sun Oct 17 11:46:48 2010
 Date: Sun, 17 Oct 2010 18:47:09 +0200
 From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= fernando.apesteg...@gmail.com
 To: Rob Farmer rfar...@predatorlabs.net
 Cc: User Questions freebsd-questions@freebsd.org
 Subject: Re: libxul compilation problem

 2010/10/16 Rob Farmer rfar...@predatorlabs.net:
  2010/10/16 Fernando Apestegu=EDa fernando.apesteg...@gmail.com:
  I didn't run X or whatsoever. That's why I think I should have enough me=
 mory.
  In fact after getting that error, I rebooted so I could update the
  ports from a fresh
  running system (nothing cached or so). But even in that case, I'm gettin=
 g the
  same error.
 
  Any VM tuning I can try?
 
  I'm not really knowledgeable about that kind of thing.
 
  However, the port is marked MAKE_JOBS_SAFE which means that it will
  try to run multiple compiler instances in parallel, to speed things up
  if you have multiple CPUs/cores. You can try running with make
  -DDISABLE_MAKE_JOBS to just run one at a time - maybe you have enough
  memory for that but not multiple jobs at once?

 Hi Rob,

 The machine has one single core cpu. Finally I was able to compile the
 thing, compiling
 the offending file by hand (nsHtml5ElementName.cpp) without the -O2
 optimization flag.
 With this flag, cc1plus eats up all the memory of my system in a few
 seconds. Without
 the flag, the file is compiled without any problems and quite fast.

 Should this issue be a candidate for filing a PR?

 *ONLY* if you can provide a 'fix' _with_ the report!  grin
 (Make sure the fix works on a machine with only 64mb ram and 256m swap. )

Hehe, OK, I'll try to have a look at it.


 Turning on optimization virtually _always_ results in the compiler needing
 more resources.   How much more depends on the size, complexity, and '
 optimizability' of the code being compiled.

 The simple fix for your problem is to add swap space to the system.
 swap space does -not- have to be in a dedicated partition, see 'man swapon'
 for how to use a -file- as temporary swap space.

I had done it if disabling the optimization wouldn't have changed anything. The
main problem was that I didn't know how much swap I had to add.
Right now I have an updated system but I will have a look at how much RAM
this takes using -O2.



 Note: if you find someting that won't compile, given a combined 4 gigs of
 RAM and swap space, and the build isthe only thing running beyond core
 system services, *then* you've got the basis for 'good' PR filing.

Thanks!




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-18 Thread Fernando Apesteguía
2010/10/17 Rob Farmer rfar...@predatorlabs.net:
 2010/10/17 Fernando Apesteguía fernando.apesteg...@gmail.com:
 The machine has one single core cpu. Finally I was able to compile the
 thing, compiling
 the offending file by hand (nsHtml5ElementName.cpp) without the -O2
 optimization flag.
 With this flag, cc1plus eats up all the memory of my system in a few
 seconds. Without
 the flag, the file is compiled without any problems and quite fast.

 Should this issue be a candidate for filing a PR?

 It's hard to say whether this is really a bug or not - I still think
 your overall memory is low - 1 GB of RAM should be a supported
 configuration, but that assumes a decent amount of swap - I'll bet
 sysinstall's recommended partitioning would give you 2 GB.

I still refuse to think 1GB is low ;) though I could be wrong.


 Try mailing the maintainers (ge...@freebsd.org) and see what they say.

I'll do it.

Thanks for your advices.

Cheers.


 --
 Rob Farmer

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-18 Thread Robert Bonomi

 Date: Mon, 18 Oct 2010 08:28:15 +0200
 From: Fernando_Apesteguia fernando.apesteg...@gmail.com
 Subject: Re: libxul compilation problem


 I still refuse to think 1GB is low ;) though I could be wrong.

One gig of RAM is not the problem.  1.25 gig total of VM _is_.

I have some stuff I run on an *OLD* (next year it will be old enough to vote :)
80486 box with only 96 megs or actual RAM, but 2gig of VM.

Compiling is a complicated process, all the more so with the features that
have been added to the languages over the years. *and* the need to support
multiple character sets, -especially- those that don't fit in an 8-bit
enumerationn.  these tHings, along with improvements in code optimization
techniques, have combined to radically increae the footprint that a language
compiler requires these days. 

Factor in the increasing size of the applicaiton modules themselves, and
it should be -no- surprise that compilation of an app of significant 
complexity has a large memory footprint.   I've got a FBSD 7.2 box that
shows 80 megs of 'actively used' VM with the basic system services running.
I've got a -dinosaur- running a *BSD releae from th prior century, running
a the same stuff, -plus- a webserver, in only 16 megs of active memory.

'code bloat' is a fact of life.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-17 Thread Fernando Apesteguía
2010/10/16 Rob Farmer rfar...@predatorlabs.net:
 2010/10/16 Fernando Apesteguía fernando.apesteg...@gmail.com:
 I didn't run X or whatsoever. That's why I think I should have enough memory.
 In fact after getting that error, I rebooted so I could update the
 ports from a fresh
 running system (nothing cached or so). But even in that case, I'm getting the
 same error.

 Any VM tuning I can try?

 I'm not really knowledgeable about that kind of thing.

 However, the port is marked MAKE_JOBS_SAFE which means that it will
 try to run multiple compiler instances in parallel, to speed things up
 if you have multiple CPUs/cores. You can try running with make
 -DDISABLE_MAKE_JOBS to just run one at a time - maybe you have enough
 memory for that but not multiple jobs at once?

Hi Rob,

The machine has one single core cpu. Finally I was able to compile the
thing, compiling
the offending file by hand (nsHtml5ElementName.cpp) without the -O2
optimization flag.
With this flag, cc1plus eats up all the memory of my system in a few
seconds. Without
the flag, the file is compiled without any problems and quite fast.

Should this issue be a candidate for filing a PR?

Cheers.


 --
 Rob Farmer

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-17 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Sun Oct 17 11:46:48 2010
 Date: Sun, 17 Oct 2010 18:47:09 +0200
 From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= fernando.apesteg...@gmail.com
 To: Rob Farmer rfar...@predatorlabs.net
 Cc: User Questions freebsd-questions@freebsd.org
 Subject: Re: libxul compilation problem

 2010/10/16 Rob Farmer rfar...@predatorlabs.net:
  2010/10/16 Fernando Apestegu=EDa fernando.apesteg...@gmail.com:
  I didn't run X or whatsoever. That's why I think I should have enough me=
 mory.
  In fact after getting that error, I rebooted so I could update the
  ports from a fresh
  running system (nothing cached or so). But even in that case, I'm gettin=
 g the
  same error.
 
  Any VM tuning I can try?
 
  I'm not really knowledgeable about that kind of thing.
 
  However, the port is marked MAKE_JOBS_SAFE which means that it will
  try to run multiple compiler instances in parallel, to speed things up
  if you have multiple CPUs/cores. You can try running with make
  -DDISABLE_MAKE_JOBS to just run one at a time - maybe you have enough
  memory for that but not multiple jobs at once?

 Hi Rob,

 The machine has one single core cpu. Finally I was able to compile the
 thing, compiling
 the offending file by hand (nsHtml5ElementName.cpp) without the -O2
 optimization flag.
 With this flag, cc1plus eats up all the memory of my system in a few
 seconds. Without
 the flag, the file is compiled without any problems and quite fast.

 Should this issue be a candidate for filing a PR?

*ONLY* if you can provide a 'fix' _with_ the report!  grin
(Make sure the fix works on a machine with only 64mb ram and 256m swap. )

Turning on optimization virtually _always_ results in the compiler needing
more resources.   How much more depends on the size, complexity, and '
optimizability' of the code being compiled.

The simple fix for your problem is to add swap space to the system.
swap space does -not- have to be in a dedicated partition, see 'man swapon'
for how to use a -file- as temporary swap space.


Note: if you find someting that won't compile, given a combined 4 gigs of
RAM and swap space, and the build isthe only thing running beyond core
system services, *then* you've got the basis for 'good' PR filing.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-17 Thread Rob Farmer
2010/10/17 Fernando Apesteguía fernando.apesteg...@gmail.com:
 The machine has one single core cpu. Finally I was able to compile the
 thing, compiling
 the offending file by hand (nsHtml5ElementName.cpp) without the -O2
 optimization flag.
 With this flag, cc1plus eats up all the memory of my system in a few
 seconds. Without
 the flag, the file is compiled without any problems and quite fast.

 Should this issue be a candidate for filing a PR?

It's hard to say whether this is really a bug or not - I still think
your overall memory is low - 1 GB of RAM should be a supported
configuration, but that assumes a decent amount of swap - I'll bet
sysinstall's recommended partitioning would give you 2 GB.

Try mailing the maintainers (ge...@freebsd.org) and see what they say.

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-16 Thread Fernando Apesteguía
2010/10/15 Rob Farmer rfar...@predatorlabs.net:
 2010/10/15 Fernando Apesteguía fernando.apesteg...@gmail.com:
 The process being killed is cc1plus while compiling libxul. I'm
 running a stock 8.1-RELEASE GENERIC kernel on amd64 platform.
 The machine has 1Gb of physical memory and 256MB for swap (I have had
 this setup for quite a long time and have always kept
 my system up to date using the ports infrastructure without problems).

 1.25 GB of total memory is rather low these days, especially if you
 were compiling with X or other things running (you didn't say one way
 or another). For a large port like this you are probably going to need
 more swap - Mozilla stuff is not know for being light on resources.

Thanks for the reply.

I didn't run X or whatsoever. That's why I think I should have enough memory.
In fact after getting that error, I rebooted so I could update the
ports from a fresh
running system (nothing cached or so). But even in that case, I'm getting the
same error.

Any VM tuning I can try?

Thanks.


 --
 Rob Farmer

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-16 Thread Rob Farmer
2010/10/16 Fernando Apesteguía fernando.apesteg...@gmail.com:
 I didn't run X or whatsoever. That's why I think I should have enough memory.
 In fact after getting that error, I rebooted so I could update the
 ports from a fresh
 running system (nothing cached or so). But even in that case, I'm getting the
 same error.

 Any VM tuning I can try?

I'm not really knowledgeable about that kind of thing.

However, the port is marked MAKE_JOBS_SAFE which means that it will
try to run multiple compiler instances in parallel, to speed things up
if you have multiple CPUs/cores. You can try running with make
-DDISABLE_MAKE_JOBS to just run one at a time - maybe you have enough
memory for that but not multiple jobs at once?

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


libxul compilation problem

2010-10-15 Thread Fernando Apesteguía
Hi,

I have a ports version fetched on Oct 13th. I wanted to update all the
ports I have installed.
In order to do that I run:

swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(12): failed
...
...
swap_pager_getswapspace(3): failed
swap_pager_getswapspace(3): failed

The process being killed is cc1plus while compiling libxul. I'm
running a stock 8.1-RELEASE GENERIC kernel on amd64 platform.
The machine has 1Gb of physical memory and 256MB for swap (I have had
this setup for quite a long time and have always kept
my system up to date using the ports infrastructure without problems).

Do I need any special setup to compile this package? Maybe any systcl
vm.* should be tunned?

Thanks in advance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: libxul compilation problem

2010-10-15 Thread Rob Farmer
2010/10/15 Fernando Apesteguía fernando.apesteg...@gmail.com:
 The process being killed is cc1plus while compiling libxul. I'm
 running a stock 8.1-RELEASE GENERIC kernel on amd64 platform.
 The machine has 1Gb of physical memory and 256MB for swap (I have had
 this setup for quite a long time and have always kept
 my system up to date using the ports infrastructure without problems).

1.25 GB of total memory is rather low these days, especially if you
were compiling with X or other things running (you didn't say one way
or another). For a large port like this you are probably going to need
more swap - Mozilla stuff is not know for being light on resources.

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org