Bug 245461 - net-mgmt/icinga2 [patch] add option to build without unity build system on low memory systems
Summary: net-mgmt/icinga2 [patch] add option to build without unity build system on lo...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lars Engels
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2020-04-08 20:12 UTC by alexander
Modified: 2020-04-29 20:35 UTC (History)
1 user (show)

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


Attachments
patch for net-mgmt/icinga2/Makefile (893 bytes, patch)
2020-04-08 20:12 UTC, alexander
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexander 2020-04-08 20:12:35 UTC
Created attachment 213201 [details]
patch for net-mgmt/icinga2/Makefile

By default icinga2 builds using their unity build system which concatenates all their source files into one huge file to compile in one go for speed (see https://icinga.com/docs/icinga2/v2.11.0-rc1/doc/21-development/). Unfortunately, this is a straight trade of RAM for time, meaning the build fails for systems with low memory (< 4 GB). This is also the reason behind bug #221797 prohibiting building icinga2 on an RPi.

The attached patch exposes an option (on by default => no change in default port behavior) to disable the unity build system for such systems. This leads to longer compilation time as each source file is built separately, but the build requires only 10% of the memory.
Comment 1 Automation User 2020-04-23 00:28:04 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/138923786
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-04-29 20:33:54 UTC
A commit references this bug:

Author: lme
Date: Wed Apr 29 20:33:24 UTC 2020
New revision: 533395
URL: https://svnweb.freebsd.org/changeset/ports/533395

Log:
  net-mgmt/icinga2:

  - Update to 2.11.3 which fixes a long standing bug in the Icinga API that led to crashes [1]
  - Fix directory permissions for 'icinga2 feature enable / disable'
  - Add new option UNITY to enable or disable the build with Unity. Unity
    makes building Icinga 2 faster but memory intensive. With Unity disabled it is
    possible to build Icinga 2 on memory restricted machines like a Raspberry Pi. [2]

  PR:		245985 [1], 245461 [2]
  Submitted by:	Armin Gruner <ag-freebsd@muc.de> [1], Alexander Wittig <alexander@wittig.name> [2]
  MFH:		2020Q2

Changes:
  head/net-mgmt/icinga2/Makefile
  head/net-mgmt/icinga2/distinfo
  head/net-mgmt/icinga2/pkg-plist
Comment 3 Lars Engels freebsd_committer freebsd_triage 2020-04-29 20:35:38 UTC
Thanks, I just committed your patch!