Re: Okay, how much ram does it take to build Rust?
Ronald Klop <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ports |
|---|---|
| Message-ID | <1873773373.3729.1757583226252@localhost> |
Hi, My poudriere builds rust on a Raspberry PI with 8 GB RAM which is doing all kinds of other stuff like running Jenkins in the meantime. So I doubt your RAM is the issue. I once helped somebody with out-of-memory problems and that person had set MAX_MEMORY in poudriere.conf to a really low value for testing purposes and than forgot about it. What would help is if you post a link to the full build log as at the start of the log it prints all kinds of information about your memory settings. Regards, Ronald. Van: "Dan Mahoney (Ports)" <[email protected]> Datum: donderdag, 11 september 2025 09:42 Aan: FreeBSD Mailing List <[email protected]> Onderwerp: Okay, how much ram does it take to build Rust? > > Hey there folks, > > I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages. > > lang/rust is a big one. It pontificates for about two hours, then dies with: > > [ 45% 1690/3710] Building RISCVGenExegesis.inc... > [ 45% 1691/3710] Building RISCVGenGlobalISel.inc... > FAILED: [code=262] lib/Target/RISCV/RISCVGenGlobalISel.inc /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc > cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build && /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d > LLVM ERROR: out of memory > Allocation failed > PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. > Stack dump: > 0. Program arguments: /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d > ninja: build stopped: subcommand failed. > > thread 'main' panicked at /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/vendor/cmake-0.1.54/src/lib.rs:1119:5: > > command did not execute successfully, got: exit status: 6 > > build script failed, must exit now > stack backtrace: > 0: __rustc::rust_begin_unwind > 1: core::panicking::panic_fmt > 2: cmake::fail > > Full logs here: > > https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log > > Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound. > > -Dan > > >