editors/vscode: add pkg-message for build Error: EMFILE: too many open files
When building vscode with poudriere, the build was failing with:
[04:20:50] Error: EMFILE: too many open files, open '/wrkdirs/usr/ports/editors/vscode/work/vscode-1.41.0/out-build/vs/workbench/common/editor/textDiffEditorModel.js.map'
This is because poudriere imposes a limit on the maximum files allowed open in the jail to 1024. This can be fixed by adding the following line to poudriere.conf:
@Ben Thanks for the report. Presumably that means vscode wont package out of the box, for example on our official package builders, unless they also set a higher MAX_FILES setting.
Could/should "complete resolution" of this issue also include either (or both) of the following:
- Ability for ports to mark (metadata) specific settings to inform poudriere of additional things they need (including this MAX_FILES setting)
- Request for portmgr to add this setting to the official builder configurations
Request feedback from Bryan whether poudriere might be amenable to a general 'ports metadata hints for poudriere' feature as he's likely aware of other 'hint types' where this might be useful
@Ben This (Adding pkg-message to help/inform a build failure) is probably as close to a portmgr blanket approval case without actually being one (explicitly listed as such). I'd just go ahead and commit it if the issue is verified and there's no better way to resolve it (in the short term)
- Reporter is committer, assign accordingly
On second thought, pkg-message is not the right answer here, because we need a warning during the port extract phase, rather than the pkg install phase (which we will never reach).
(In reply to Ben Woods from comment #2)
www/chromium port defines pre-everything target to warn users about memory and disk space requirements for building. Maybe we can prepare a similar warning message about EMFILE error?
adding MAX_FILES_vscode=4096 to poudriere.conf fixed the build for me, thanks!
A commit references this bug:
Date: Mon Dec 30 10:59:43 UTC 2019
New revision: 521479
editors/vscode: add warning for build Error: EMFILE: too many open files
Suggested by: Hiroki Tagato <firstname.lastname@example.org>
Reported by: woodsb02
Approved by: portmgr blanket
pre-everything warning message added to port. Thanks for the idea Hiroki - it seems to align with other ports.
bdrewery - any thoughts on whether a port could indicate to poudriere it needs more resources than the default limits?
I'll mark this bug as closed for now, but feel free to still respond to it.