Bug 258492

Summary: www/firefox: Fails to build in any of ports-mgmt/synth, ports-mgmt/portmaster, ports-mgmt/portupgrade, and many other environments.
Product: Ports & Packages Reporter: Geezer <pr.freebsd.only.2021090501>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: bdrewery, fluffy, gecko, se
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
The last 100 lines of the log file for a build of firefox within synth. none

Description Geezer 2021-09-14 04:36:05 UTC
Created attachment 227889 [details]
The last 100 lines of the log file for a build of firefox within synth.

Firefox will build using make from the ports if run from the command line on the console only.

I have only tried with the default config and no /etc/make.conf .

When I try within any of ports-mgmt/synth, ports-mgmt/portmaster,  ports-mgmt/portupgrade, and many other environments, the build stops and hangs. It does not stop at the same place each time. But it always stops incomplete and hangs. 

When I try within an X terminal within a DE using make from the ports, it may build or it may hang. But within all management programs it stops and hangs. All other ports that I have tried do not hang.

The machine that I am using has plenty of ram and spare disk space.

The last time that I tried was using synth from the console. The build stopped and hung on:
gmake[4]: Leaving directory '/construction/xports/www/firefox/work/.build/media/ffvpx/libavcodec'

Thank you.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-09-14 08:27:51 UTC
After ports 6ec985b72d58 linking libxul.so (browser engine) is expected to take a lot of time, often with no output to indicate progress. Try building with LTO port option disabled.

(In reply to Geezer from comment #0)
> ###  Watchdog killed runaway process!  (no activity for 30 minutes)  ###

Try bumping to 120 minutes in order to match poudriere default, see
https://github.com/freebsd/poudriere/blob/3.3.7/src/share/poudriere/common.sh#L7931
Comment 2 Geezer 2021-09-14 09:03:43 UTC
Building now within synth without LTO as advised. Will report. 

Thank you.
Comment 3 Geezer 2021-09-14 09:20:27 UTC
Built! Extremely fast too. Without LTO.

I will now try again, with LTO, and without a timeout for synth. I will leave it going for a few hours and report.

Thank you.
Comment 4 Geezer 2021-09-14 14:52:56 UTC
I have built again, within synth and removed the timeout. It hung (where it hung below), or appeared to hand for close to 120 minutes. And then it did actually complete.

LTO appears to have the opposite effect to desired.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2021-09-14 19:43:49 UTC
(In reply to Geezer from comment #4)
> LTO appears to have the opposite effect to desired.

LTO optimizes the result not the process i.e., makes the runtime faster. https://cgit.freebsd.org/ports/log/?qt=grep&q=LTO+by+default documents some gains but benchmarking is often time-consuming and complicated by statistical noise.