Bug 297157 - devel/electron41: Fails to build
Summary: devel/electron41: Fails to build
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL: https://people.freebsd.org/~yuri/elec...
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-30 05:25 UTC by Yuri Victorovich
Modified: 2026-07-30 07:12 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (tagattie)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2026-07-30 05:25:11 UTC
See the log in the URL field.
Comment 1 Hiroki Tagato freebsd_committer freebsd_triage 2026-07-30 06:47:48 UTC
I found only one line indicating an error in the log:
FAILED: [code=255] obj/content/browser/browser/preload_handler.o

There seem no other suspicious lines.

I'm not sure what exactly caused the error, but I suspect the process was killed due to out of memory. So decreasing MAKE_JOBS_NUMBER (or set MAKE_JOBS_UNSAFE to yes) may help if you don't have abundant memory.

In my experience, building with MAKE_JOBS_NUMBER=6 on 32GB of memory does not have an out of memory issue.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2026-07-30 06:50:55 UTC
(In reply to Hiroki Tagato from comment #1)

I have an abundant memory of 64GB.
How much memory does it need?
Comment 3 Hiroki Tagato freebsd_committer freebsd_triage 2026-07-30 07:04:32 UTC
(In reply to Yuri Victorovich from comment #2)

It depends on how much parallelism you use for the build. I don't have an exact figure but 64GB should allow up to around MAKE_JOBS_NUMBER=10, I guess.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2026-07-30 07:12:35 UTC
(In reply to Hiroki Tagato from comment #3)

It was MAKE_JOBS_NUMBER=16.
I will try with MAKE_JOBS_NUMBER=10.


Something like this might be able to adjust MAKE_JOBS_NUMBER automatically:

# Get memory in bytes and convert directly to GB
_MEM_GB!=	expr $$(sysctl -n hw.physmem) / 1073741824

# Scale jobs (5 jobs per 32 GB) using pure make arithmetic
_CALC_JOBS=	${_MEM_GB:tW:C/.*/& * 5 \/ 32/:p}

# Apply the max cap of 16 using make modifiers
MAKE_JOBS_NUMBER=	${_CALC_JOBS:tW:C/.*($$((${_CALC_JOBS})) > 16).*/16/:C/.*([0-9]+).*/\1/:p}