building seamonkey - possible clang bug

Dimitry Andric dim at FreeBSD.org
Tue Oct 8 22:02:05 UTC 2013


On Oct 8, 2013, at 19:11, Tom Uffner <tom at uffner.com> wrote:
> On Tue Oct 8 15:57:07 UTC 2013, Florian Smeets wrote:
> > You were out of swap space, that's why the compiler was killed.
> 
> >> real memory  = 268435456 (256 MB)
> >> avail memory = 248418304 (236 MB)
> 
> > This is not nearly enough, I don't recall what how much a non debug
> > build needs right now, but i think it was close to 2-3GB.
> > You could add more swap, but that's not going to make it any faster :)
> 
> Thanks. I realize this. in my message I mentioned that the failure mode
> was running out of memory. and that I added swap. What I failed to include
> was that (including swap) i had 3/4 G of VM the 1st time, and a bit over
> 2 G on the 2nd try.
> 
> Is 2GB still not enough to compile ns_core.c, or is something else wrong?

No, this is a clang bug.  With your .c file I can reproduce the problem:
it looks like clang's optimizer gets into an endless loop, or something
similar, and it eats up memory until it dies.

Since it turns out recent trunk versions do not exhibit this behavior, I
will attempt to figure out exactly where it was fixed. :-)

Meanwhile, as a workaround, you can lower the optimization level from
-O3 to -O2, that should allow the build to continue.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20131009/e54ec539/attachment.sig>


More information about the freebsd-ports mailing list