I'm on the Google Coral Dev Board which has a 500GB NVMe attached via the USB-C connector. https://coral.ai/products/dev-board/#tech-specs The Dev Board has 1 GB of RAM, I've provided 48 GBs of swap in the Mendel environment, and 49GBs of swap in the Gentoo chroot (probably not referenced). Top running in the Mendel enviornment shows: top - 07:48:01 up 2 days, 11:38, 3 users, load average: 0.08, 0.06, 0.01 Tasks: 146 total, 1 running, 145 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.1 us, 0.4 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.1 hi, 0.2 si, 0.0 st MiB Mem : 986.0 total, 385.8 free, 239.3 used, 360.9 buff/cache MiB Swap: 99328.0 total, 99207.5 free, 120.5 used. 660.1 avail Mem The Dev board runs Mendel which is a watered-down version of Debian v.10 ("Buster") (and Google could not use the trademark "Debian," so they use "Mendel"). Google's demo software that detects objects in videos utilizes an out-of-date version of gstreamer and sometimes does not work. I finally decided I would try to build gstreamer's current high watermark in a chroot environment on the Dev Board (which I have succeeded in doing) as a first step test towards re-imaging the Coral Dev Board with Gentoo replacing Mendel (which development of Mendel has been halted per Coral Team member). I have created a Gentoo chroot environment and see below for results of my emerge attempt. After the first failure, I tried altering my Gentoo chroot environment with: export _JAVA_OPTIONS="-Xmx2g" export I_WANT_GLOBAL_JAVA_OPTIONS=1 I was hoping that the heap needs would be met with swap, but I guess not? What can I do to overcome the memory limitation I'm hitting? Reproducible: Always Steps to Reproduce: 1. emerge dev-util/bazel Actual Results: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1079) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:135) at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.<init>(JarFileSystem.java:62) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:134) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:514) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:316) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:712) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:737) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:681) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:551) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:299) at jdk.compiler/com.sun.tools.javac.code.ClassFinder$$Lambda$44/0x00000001000cd840.complete(Unknown Source) at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642) at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1131) at jdk.compiler/com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:837) at jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:345) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529) at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:286) at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:301) at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:576) at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:560) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1066) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:937) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170) at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57) at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43) * ERROR: dev-util/bazel-5.0.0::gentoo failed (compile phase): * Failed compiling bazel * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 2969: Called die * The specific snippet of code: * VERBOSE=yes ./compile.sh || die "Failed compiling bazel"; * * If you need support, post the output of `emerge --info '=dev-util/bazel-5.0.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-util/bazel-5.0.0::gentoo'`. !!! When you file a bug report, please include the following information: GENTOO_VM=openjdk-bin-11 CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-11.0.14_p9" JAVACFLAGS="-source 11 -target 11" COMPILER="" and of course, the output of emerge --info =bazel-5.0.0 * The complete build log is located at '/var/tmp/portage/dev-util/bazel-5.0.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-util/bazel-5.0.0/temp/environment'. * Working directory: '/var/tmp/portage/dev-util/bazel-5.0.0/work' * S: '/var/tmp/portage/dev-util/bazel-5.0.0/work' Expected Results: successful installation. Requested files forthcoming: build.log eclass-debug.log emerge_info.txt emerge_pqv.txt environment.zip
Created attachment 779540 [details] Emerge info
Created attachment 779543 [details] Emerge pqv
Created attachment 779546 [details] Build log
Created attachment 779549 [details] Build Log Bazel
Created attachment 779552 [details] Emerge pqv Bazel
Created attachment 779555 [details] Emerge info Bazel
Created attachment 779558 [details] Environment Bazel
Created attachment 779561 [details] Eclass debug Bazel
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937bb2fe50b5f938cca85d4a3b2ba55dbf71e617 commit 937bb2fe50b5f938cca85d4a3b2ba55dbf71e617 Author: Jakov Smolić <jsmolic@gentoo.org> AuthorDate: 2024-02-24 12:50:14 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2024-02-24 12:50:14 +0000 dev-build/bazel: treeclean Bug: https://bugs.gentoo.org/878501 Closes: https://bugs.gentoo.org/906914 Closes: https://bugs.gentoo.org/917689 Closes: https://bugs.gentoo.org/918703 Closes: https://bugs.gentoo.org/634046 Closes: https://bugs.gentoo.org/652776 Closes: https://bugs.gentoo.org/687538 Closes: https://bugs.gentoo.org/747370 Closes: https://bugs.gentoo.org/766243 Closes: https://bugs.gentoo.org/790116 Closes: https://bugs.gentoo.org/820179 Closes: https://bugs.gentoo.org/820182 Closes: https://bugs.gentoo.org/832935 Closes: https://bugs.gentoo.org/837023 Closes: https://bugs.gentoo.org/846464 Closes: https://bugs.gentoo.org/858314 Closes: https://bugs.gentoo.org/867292 Closes: https://bugs.gentoo.org/872455 Closes: https://bugs.gentoo.org/884477 Closes: https://bugs.gentoo.org/895300 Closes: https://bugs.gentoo.org/909434 Closes: https://bugs.gentoo.org/917257 Closes: https://bugs.gentoo.org/919798 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> dev-build/bazel/Manifest | 7 -- dev-build/bazel/bazel-3.7.2-r1.ebuild | 117 --------------------- dev-build/bazel/bazel-4.2.2.ebuild | 100 ------------------ dev-build/bazel/bazel-5.0.0.ebuild | 96 ----------------- dev-build/bazel/bazel-5.1.1.ebuild | 96 ----------------- dev-build/bazel/bazel-5.3.0.ebuild | 102 ------------------ dev-build/bazel/bazel-6.2.0.ebuild | 102 ------------------ dev-build/bazel/bazel-6.4.0.ebuild | 102 ------------------ .../bazel-3.2.0-include-limits-for-gcc-11.patch | 25 ----- .../bazel-3.7.2-musl-temp-failure-retry.patch | 34 ------ .../files/bazel-4.2.2-absl_numeric_limits.patch | 41 -------- dev-build/bazel/metadata.xml | 20 ---- profiles/package.mask | 15 --- profiles/updates/1Q-2024 | 1 - 14 files changed, 858 deletions(-)