Re: Improving www/chromium build time on arm64

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Tue, 23 May 2023 10:23:20 UTC
 
Van: Nuno Teixeira <eduardo@freebsd.org>
Datum: dinsdag, 23 mei 2023 09:48
Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>, freebsd-arm@freebsd.org
Onderwerp: Re: Improving www/chromium build time on arm64
> 
> (...)
> Â 
> But I also found that poudriere:
> [88:53:28] Failed ports: www/chromium:build/timeout
> Â 
> So I will search how do I increase build time to avoid timeout:
> ---
> # This defines the max time (in seconds) that a command may run for a build
> # before it is killed for taking too long. Default: 86400
> #MAX_EXECUTION_TIME=86400
> ---
> Â 
> I suspect it can be the cause of build failure because build >24h.
> Â 
> Nuno Teixeira <eduardo@freebsd.org> escreveu no dia terça, 23/05/2023 à (s) 08:31:
>> 
>> Hello all,
>> Â 
>> I'm running 13-STABLE on rpi4 8 and since firefox{-esr} is constantly tab crashing and seg faulting I decided to give chromium a try.
>> chromium pkg isn't available for arm64 and I didn't found error log at https://pkg-status.freebsd.org/ so I decided to build it on poudriere.
>> Â 
>> It fails to build around 70% but my biggest concern is build time: 27 hours for 70% compilation!
>> Â 
>> Just for comparison:
>> llvm15: 12h
>> rust: 9h
>> firefox: 6h
>> Â 
>> rip4 v1.5 8GB @ 2000Hz ~62 Celsius
>> zfs
>> poudriere:
>> USE_TMPFS=no
>> PARALLEL_JOBS=1
>> ALLOW_MAKE_JOBS=yes
>> Â 
>> Any hints on how to speed build? ccache?
>> Does cflags "-O -pipe" not present in compilation is related to build time? 
>> Â 
>> Full log:
>> https://people.freebsd.org/~eduardo/logs/chromium/chromium-113.0.5672.126.log
>> Â 
>> Thanks!
>> Â 
>> ---
>> <SNIP>
>> In file included from ../../base/check.h:11:
>> ../../base/compiler_specific.h:8:10: fatal error: 'build/build_config.h' file not found
>> #include "build/build_config.h"
>>          ^~~~~~~~~~~~~~~~~~~~~~
>> 1 error generated.
>> ninja: build stopped: subcommand failed.
>> ===> Compilation failed unexpectedly.
>> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
>> the maintainer.
>> *** Error code 1
>> 
>> Stop.
>> make: stopped in /usr/ports/www/chromium
>> build of www/chromium | chromium-113.0.5672.126 ended at Tue May 23 02:22:56 WEST 2023
>> build time: 27:15:37
>> !!! build failure encountered !!!
>> ---
>> -- 
>> Nuno Teixeira
>> FreeBSD Committer (ports)
> 
>  
> Â 
> -- 
> Nuno Teixeira
> FreeBSD Committer (ports)


Hi,

My poudriere.conf for building ports on rpi4 contains these two changes:

# This defines the max time (in seconds) that a command may run for a build
# before it is killed for taking too long. Default: 86400
#MAX_EXECUTION_TIME=86400
MAX_EXECUTION_TIME=172800

# This defines the time (in seconds) before a command is considered to
# be in a runaway state for having no output on stdout. Default: 7200
#NOHANG_TIME=7200
NOHANG_TIME=172800


I'm maintaining some mongodb ports which also take a long long time to build on rpi4.
But I don't remember which of these settings has the preferred impact on your situation.

Oh... now I'm reading your log better. It contains this:
"=>> Killing timed out build after 86400 seconds"

And some time later:
"=>> Cleaning up wrkdir
===> Cleaning for chromium-113.0.5672.126"

So the errors about missing files happen because poudriere is removing files while some processes of the build are still running.

I'm curious how far it gets after you increase MAX_EXECUTION_TIME.

Regards,
Ronald.
Â