Re: [oi-dev] Out of memory when trying to compile icinga2 with gcc6 - problem persists
Hi Till, sorry for the late answer, had to struggle around with Git :D I have this repository on GitHub: https://github.com/sysadmama/oi-userland There’s the branch feature_icinga2-2.10.2 now which you can use; I had to set linker options, and without unity build it seems to compile fine now - but it would be great if you could have a look and tell me when there’s need for improvement (I’m always a bit unsure about REQUIRED_PACKAGES). Thanks a lot, Marianne On 14 Jan 2019, at 14:32, Till Wegmüller wrote: Hi Marianne I have a quite beefy Machine with 32Gb RAM. If you send me the Link to your Git Fork/Branch I could try to compile and see if It works on my machine. Our Buildserver also has enough RAM as Rust was similarly stupid with allocation. Greetings Till On 14.01.19 10:37, Marianne Spiller wrote: Hi all, nearly 1 year ago I asked the same and was not able to resolve this issue… https://openindiana.org/pipermail/oi-dev/2018-March/005802.html Now I’m back with a freshly updated hardware host and trying to compile icinga2-2.10.2. I made a change in my Makefile: |COMPONENT_BUILD_ARGS+= -j1|, but in comparison with the -j4 default the only difference are different values when crashing with out of memory. RAM consumption nearly 1.9GB when |Building CXX object lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o|, swap leaving untouched. It would be really nice to get some help on this ‘cause I’m stucked like I was last year at this point ;) Cheers, Marianne |$ uname -a SunOS zfs-2011 5.11 illumos-9c7c0c4b59 i86pc i386 i86pc $ ulimit unlimited $ swap -lh swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 302,2 4K 31.9G 31.9G $ prtconf | grep Memory Memory size: 196495 Megabytes root@zfs-2011:/scratch/oi-userland/components/sysutils/icinga2# gmake sample-manifest /scratch/oi-userland/tools/userland-fetch --file /scratch/oi-userland/archives/icinga2-2.10.2.tar.gz --url https://github.com/Icinga/icinga2/archive/v2.10.2.tar.gz --hash sha256:99ab0c511a8a7014b9cf9467fe126d4a369026e9353f6e64c05ae39a15b32ad9 Source /scratch/oi-userland/archives/icinga2-2.10.2.tar.gz... validating signature... skipping (no signature URL) validating hash... ok /usr/bin/touch /scratch/oi-userland/archives/icinga2-2.10.2.tar.gz /bin/rm -f -r /scratch/oi-userland/components/sysutils/icinga2/icinga2-2.10.2 /usr/bin/env RUBY_VERSION=2.3 /scratch/oi-userland/tools/userland-unpack /scratch/oi-userland/archives/icinga2-2.10.2.tar.gz /usr/bin/touch /scratch/oi-userland/components/sysutils/icinga2/icinga2-2.10.2/.unpacked /usr/bin/touch /scratch/oi-userland/components/sysutils/icinga2/icinga2-2.10.2/.prep (/bin/rm -f -rf /scratch/oi-userland/components/sysutils/icinga2/build/amd64 ; /bin/mkdir -p /scratch/oi-userland/components/sysutils/icinga2/build/amd64) (cd /scratch/oi-userland/components/sysutils/icinga2/build/amd64 ; /usr/bin/env CONFIG_SHELL="/bin/bash" CC="/usr/gcc/6/bin/gcc" CXX="/usr/gcc/6/bin/g++" F77="/usr/gcc/6/bin/gfortran" FC="/usr/gcc/6/bin/gfortran" CFLAGS="-m64 -O3 " CXXFLAGS=" -m64 -O3 " FFLAGS=" -m64 -O3 " FCFLAGS="-m64 -O3 " LDFLAGS="-m64" PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig" \ cmake -DCMAKE_C_COMPILER:STRING="/usr/gcc/6/bin/gcc" -DCMAKE_CXX_COMPILER:STRING="/usr/gcc/6/bin/g++" -DCMAKE_Fortran_COMPILER:STRING="/usr/gcc/6/bin/gfortran" -DCMAKE_C_FLAGS:STRING="-m64 -O3 " -DCMAKE_CXX_FLAGS:STRING=" -m64 -O3 " -DCMAKE_Fortran_FLAGS:STRING="-m64 -O3 " LDFLAGS="-m64" PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig" -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_LIBDIR:PATH=lib/amd64 -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_DATADIR:PATH=share -DCMAKE_INSTALL_INFODIR:PATH=share/info -DCMAKE_INSTALL_LOCALEDIR:PATH=share/locale -DCMAKE_INSTALL_MANDIR:PATH=share/man -DLIBEXEC_INSTALL_DIR="/usr/lib/amd64" -DLIB_INSTALL_DIR="/usr/lib/amd64" -DLIB_SUFFIX="/amd64" -DCMAKE_INSTALL_PREFIX="/usr" -DICINGA2_GIT_VERSION_INFO=OFF -DICINGA2_USER=icinga -DICINGA2_GROUP=icinga -DICINGA2_COMMAND_GROUP=icingacmd -DICINGA2_RUNDIR="/var/lib" -DCMAKE_INSTALL_SYSCONFDIR="/etc" -DICINGA2_SYSCONFIGFILE="/usr/lib/icinga2/icinga2" -DCMAKE_INSTALL_LOCALSTATEDIR="/var" -DICINGA2_PLUGINDIR="/usr/lib/nagios/plugins" -DICINGA2_UNITY_BUILD=ON -DICINGA2_LTO_BUILD=OFF -DUSE_SYSTEMD=OFF -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=OFF -DICINGA2_WITH_CHECKER=ON -DICINGA2_WITH_COMPAT=ON -DICINGA2_WITH_DEMO=OFF -DICINGA2_WITH_HELLO=OFF -DICINGA2_WITH_LIVESTATUS=ON -DICINGA2_WITH_NOTIFICATION=ON -DICINGA2_WITH_PERFDATA=ON -DICINGA2_WITH_STUDIO=OFF -DICINGA2_WITH_TESTS=ON -DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF /scratch/oi-userland/components/sysutils/ic
[oi-dev] Out of memory when trying to compile icinga2 with gcc6 - problem persists
inga2/build/amd64' make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 36%] Building CXX object lib/remote/CMakeFiles/remote.dir/remote_unity.cpp.o make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 36%] Built target remote make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 37%] Generating cli_unity.cpp Scanning dependencies of target cli make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 38%] Building CXX object lib/cli/CMakeFiles/cli.dir/cli_unity.cpp.o make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 38%] Built target cli make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 39%] Generating icinga_unity.cpp [ 40%] Generating icinga-itl.cpp [ 41%] Generating checkable-ti.cpp, checkable-ti.hpp [ 42%] Generating checkcommand-ti.cpp, checkcommand-ti.hpp [ 43%] Generating checkresult-ti.cpp, checkresult-ti.hpp [ 44%] Generating command-ti.cpp, command-ti.hpp [ 45%] Generating comment-ti.cpp, comment-ti.hpp [ 46%] Generating customvarobject-ti.cpp, customvarobject-ti.hpp [ 47%] Generating dependency-ti.cpp, dependency-ti.hpp [ 48%] Generating downtime-ti.cpp, downtime-ti.hpp [ 48%] Generating eventcommand-ti.cpp, eventcommand-ti.hpp [ 49%] Generating host-ti.cpp, host-ti.hpp [ 50%] Generating hostgroup-ti.cpp, hostgroup-ti.hpp [ 51%] Generating icingaapplication-ti.cpp, icingaapplication-ti.hpp [ 52%] Generating notification-ti.cpp, notification-ti.hpp [ 53%] Generating notificationcommand-ti.cpp, notificationcommand-ti.hpp [ 54%] Generating scheduleddowntime-ti.cpp, scheduleddowntime-ti.hpp [ 55%] Generating service-ti.cpp, service-ti.hpp [ 56%] Generating servicegroup-ti.cpp, servicegroup-ti.hpp [ 57%] Generating timeperiod-ti.cpp, timeperiod-ti.hpp [ 58%] Generating user-ti.cpp, user-ti.hpp [ 59%] Generating usergroup-ti.cpp, usergroup-ti.hpp Scanning dependencies of target icinga make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 59%] Building CXX object lib/icinga/CMakeFiles/icinga.dir/icinga-itl.cpp.o [ 60%] Building CXX object lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o cc1plus: out of memory allocating 2500880 bytes after a total of 74653696 bytes make[3]: *** [lib/icinga/CMakeFiles/icinga.dir/build.make:289: lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o] Error 1 make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[2]: *** [CMakeFiles/Makefile2:1646: lib/icinga/CMakeFiles/icinga.dir/all] Error 2 make[2]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[1]: *** [Makefile:163: all] Error 2 make[1]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' gmake: *** [/scratch/oi-userland/make-rules/cmake.mk:179: /scratch/oi-userland/components/sysutils/icinga2/build/amd64/.built] Error 2 ``` _ Marianne Spiller - Infrastrukturgruppe DFKI - Campus D3.2 - 66123 Saarbrücken Phone: (+49) 681 85775-7741 Fax: (+49) 861 85775-5020 Email: marianne.spil...@dfki.de Deutsches Forschungszentrum für Künstliche Intelligenz GmbH, Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany, www.dfki.de * Geschäftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vors.), Dr. Walter Olthoff * Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes * Amtsgericht Kaiserslautern, HRB 2313 _ ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
Re: [oi-dev] Out of memory when trying to compile icinga2 with gcc6
On Wed, Mar 28, 2018 at 12:06:58PM +, Toomas Soome wrote: > yes, now try to monitor it while building… as you do not have problem now but > at build time:) Aye. Free available RAM decreases from ~16GB to ~14GB. Swap remains untouched. On the main file server I can't build it at all anymore: it has gcc-4.9. Cheers, Marianne -- "There's nothing wrong with having a tree as a friend." - Bob Ross ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
Re: [oi-dev] Out of memory when trying to compile icinga2 with gcc6
> /tmp is mounted with tempfs which is using virtual memory, that is, ram + > swap. see swap -lh Okay... swap -lh swapfile devswaplo blocks free /dev/zvol/dsk/rpool/swap 270,24K12.0G12.0G :-| -- "There's nothing wrong with having a tree as a friend." - Bob Ross ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
Re: [oi-dev] Out of memory when trying to compile icinga2 with gcc6
On Wed, Mar 28, 2018 at 11:19:52AM +, Aurélien Larcher wrote: > How many build jobs (-j) did you specifiy with COMPONENT_BUILD_ARGS? First try: I did not set anything, so it used system defaults Second try: I tried explicitly with -j8, same error Last try: I tried explicitly with -j1, but... same error :( @toomas: this is what my /tmp is looking: swap 24.7G 4K 24.7G 1%/tmp => this should be fairly enough? :D Now I'm finally perplexed, notably that you, Aurélien, are able to compile it successfully... Cheers, Marianne Scanning dependencies of target icinga make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[3]: Entering directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' [ 58%] Building CXX object lib/icinga/CMakeFiles/icinga.dir/icinga-itl.cpp.o [ 59%] Building CXX object lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o cc1plus: out of memory allocating 2728052 bytes after a total of 85884928 bytes make[3]: *** [lib/icinga/CMakeFiles/icinga.dir/build.make:320: lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o] Error 1 make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[2]: *** [CMakeFiles/Makefile2:1656: lib/icinga/CMakeFiles/icinga.dir/all] Error 2 make[2]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[1]: *** [Makefile:163: all] Error 2 make[1]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' gmake: *** [/scratch/oi-userland/make-rules/cmake.mk:167: /scratch/oi-userland/components/sysutils/icinga2/build/amd64/.built] Error 2 > > You output suggests that you are building with more than one. > I have just built version 2.8.2 successfully with -j1 on a machine with > 48GB RAM (14 avaiable) but I could see that the compilation of > icinga_unity.cpp > alone takes up to 1GB RAM. > > > > Thanks a lot, > > Marianne > > > > > > -- > > "There's nothing wrong with having a tree as a friend." > > - Bob Ross > > > > ___ > > oi-dev mailing list > > oi-dev@openindiana.org > > https://openindiana.org/mailman/listinfo/oi-dev > > > > > > -- > --- > Praise the Caffeine embeddings > ___ > oi-dev mailing list > oi-dev@openindiana.org > https://openindiana.org/mailman/listinfo/oi-dev -- "There's nothing wrong with having a tree as a friend." - Bob Ross https://www.unixe.de/ https://www.urban-exploring.eu/ ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
[oi-dev] Out of memory when trying to compile icinga2 with gcc6
Hi, I'd like to re-compile my icinga2 package with the new oi-userland gcc6 behaviour; secret masterplan was to finally prepare the pull request. With the gcc-4.9 version of oi-userland I got a working package. But using gcc-6 the package does not longer compile successfully; it stops with the following error message: [ 63%] Built target icinga-app cc1plus: out of memory allocating 2727788 bytes after a total of 85975040 bytes make[3]: *** [lib/icinga/CMakeFiles/icinga.dir/build.make:320:lib/icinga/CMakeFiles/icinga.dir/icinga_unity.cpp.o] Error 1 make[3]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[2]: *** [CMakeFiles/Makefile2:1656: lib/icinga/CMakeFiles/icinga.dir/all] Error 2 make[2]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' make[1]: *** [Makefile:163: all] Error 2 make[1]: Leaving directory '/scratch/oi-userland/components/sysutils/icinga2/build/amd64' gmake: *** [/scratch/oi-userland/make-rules/cmake.mk:167: /scratch/oi-userland/components/sysutils/icinga2/build/amd64/.built] Error 2 So what to do next? The host has 24GB RAM, 16 of them are available. No strange ulimit settings as far as I can see - in fact it is a freshly installed Hipster, no big changes made. Any help or idea would be great :) Thanks a lot, Marianne -- "There's nothing wrong with having a tree as a friend." - Bob Ross ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
Re: [oi-dev] Providing icinga2 package
Hi Aurelien, > You can base your work on the component I prepared for testing the > compilation of 2.7.2: that's the way I'm trying now, after lots of RTFM ;) First test build is running now. What's the reason you never published 2.7.2? > I wrote some additional notes to build a maintainer's guide (work in > progress), you can also have a look at it: Very helpful, thank you! Lots of information, especially for a newbie like me. I'm on freenode, too; when I'm getting stuck, I'll ping you all on #oi-dev :) Cheers, Marianne -- https://www.unixe.de/ https://www.urban-exploring.eu/ smime.p7s Description: S/MIME cryptographic signature ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev
[oi-dev] Providing icinga2 package
Hi there, I successfully compiled icinga2-2.8.0 on OpenIndiana Hipster 2017.10, we're running it on several machines without any problems. So the community asked me to publish it as a package for the official repo - I'm willing to do so, but I'll need some assistance from more experienced users (I tried RTFM like that: https://wiki.openindiana.org/oi/Building+with+oi-userland, but it seems outdated). So any help would be appreciated: I'd like to provide icinga2 as a package, what's best practice? Cheers, Marianne -- https://www.unixe.de/ https://www.urban-exploring.eu/ smime.p7s Description: S/MIME cryptographic signature ___ oi-dev mailing list oi-dev@openindiana.org https://openindiana.org/mailman/listinfo/oi-dev