• Okay, how much ram does it take to build Rust?

    From Dan Mahoney \(Ports\)@freebsd@gushi.org to muc.lists.freebsd.ports on Thu Sep 11 00:42:37 2025
    From Newsgroup: muc.lists.freebsd.ports

    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--
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Gleb Popov@arrowd@freebsd.org to muc.lists.freebsd.ports on Thu Sep 11 10:47:14 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Thu, Sep 11, 2025 at 10:43rC>AM Dan Mahoney (Ports) <freebsd@gushi.org> wrote:

    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:
    Note that Poudriere uses RAM to store files by employing tmpfs. Take a
    look at the comment for the USE_TMPFS variable in
    /usr/local/etc/poudriere.conf
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Guido Falsi@mad@madpilot.net to muc.lists.freebsd.ports on Thu Sep 11 10:42:53 2025
    From Newsgroup: muc.lists.freebsd.ports



    On 9/11/25 09:42, Dan Mahoney (Ports) wrote:
    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:


    Hi,

    I'm building rust on my poudriere machine with 12 cores and 48 GiB RAM successfuilly, so that should be enough.

    I also have 32 GiB swap configured on that machine, but rust does not
    use much of that.

    I'm also using USE_TMPFS=all and allowing parallel jobs.

    So it should work on your machine IMHO. Something else may be at play here.

    First thing that comes to mind is, are you building WITH_DEBUG? I have
    noticed this grows requirements tenfold or more for this kind of ports.
    This could explain what you see. If you nbeed DEBUG binaries, consider disabling this option for compilers and other tools, and enabling it
    only for what you are actually trying to debug.

    Another thing I do with poudriere is having a longish list for MUTUALLY_EXCLUSIVE_BUILD_PACKAGES, but, I noticed just now, it does not inlcude rust, so I'm quite sure it happens to build fine on my machine
    even when in parallel with other ports. Anyway you could evaluate adding "rust-*" to that list.

    I also have:

    lang_rust_UNSET= DOCS

    since I noticed those take a long time to build and I don't need those.
    But I don't think this has anything to do with what you're seeing.

    Take a close look to any non default options you may be
    enabling/disabling anyway, they could give you clues.

    Hope this helps some.
    --
    Guido Falsi <mad@madpilot.net>



    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ronald Klop@ronald-lists@klop.ws to muc.lists.freebsd.ports on Thu Sep 11 11:33:46 2025
    From Newsgroup: muc.lists.freebsd.ports

    ------=_Part_3728_1099823461.1757583226247
    Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit

    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)" <freebsd@gushi.org>
    Datum: donderdag, 11 september 2025 09:42
    Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>
    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





    ------=_Part_3728_1099823461.1757583226247
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <html><head></head><body>Hi,<br>

    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.<br>

    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.<br>

    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.<br>

    Regards,<br>
    Ronald.<br>



    &nbsp;
    <p><strong>Van:</strong> "Dan Mahoney (Ports)" &lt;freebsd@gushi.org&gt;<br> <strong>Datum:</strong> donderdag, 11 september 2025 09:42<br> <strong>Aan:</strong> FreeBSD Mailing List &lt;freebsd-ports@freebsd.org&gt;<br>
    <strong>Onderwerp:</strong> Okay, how much ram does it take to build Rust?</p>

    <blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
    <div class="MessageRFC822Viewer" id="P">
    <div class="TextPlainViewer" id="P.P">Hey there folks,<br>

    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.<br>

    lang/rust is a big one. &nbsp;It pontificates for about two hours, then dies with:<br>

    [ 45% 1690/3710] Building RISCVGenExegesis.inc...<br>
    [ 45% 1691/3710] Building RISCVGenGlobalISel.inc...<br>
    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<br>
    cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build &amp;&amp; /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<br>
    LLVM ERROR: out of memory<br>
    Allocation failed<br>
    PLEASE submit a bug report to <a href="https://github.com/llvm/llvm-project/issues/">https://github.com/llvm/llvm-project/issues/</a> and include the crash backtrace.<br>
    Stack dump:<br>
    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<br>
    ninja: build stopped: subcommand failed.<br>

    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:<br>

    command did not execute successfully, got: exit status: 6<br>

    build script failed, must exit now<br>
    stack backtrace:<br>
    &nbsp;&nbsp;&nbsp;0: __rustc::rust_begin_unwind<br>
    &nbsp;&nbsp;&nbsp;1: core::panicking::panic_fmt<br>
    &nbsp;&nbsp;&nbsp;2: cmake::fail<br>

    Full logs here:<br>

    <a href="https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log">https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log</a><br>

    Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). &nbsp;Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound.<br>

    -Dan</div>

    <hr></div>
    </blockquote>

    &nbsp;</body></html>
    ------=_Part_3728_1099823461.1757583226247--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ronald Klop@ronald-lists@klop.ws to muc.lists.freebsd.ports on Thu Sep 11 11:43:04 2025
    From Newsgroup: muc.lists.freebsd.ports

    ------=_Part_4595_1994451573.1757583784859
    Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit


    Van: Ronald Klop <ronald-lists@klop.ws>
    Datum: donderdag, 11 september 2025 11:33
    Aan: "Dan Mahoney (Ports)" <freebsd@gushi.org>
    CC: FreeBSD Mailing List <freebsd-ports@freebsd.org>
    Onderwerp: Re: Okay, how much ram does it take to build Rust?

    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)" <freebsd@gushi.org>
    Datum: donderdag, 11 september 2025 09:42
    Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>
    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







    Oh, I just noticed that you did post a link to the build log. Sorry.

    Take a look at
    virtual mem size (kbytes, -v) 2097152

    My builds have this:
    [00:00:00] virtual mem size (kbytes, -v) unlimited
    Regards and happy hacking,
    Ronald.

    ------=_Part_4595_1994451573.1757583784859
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <html><head></head><body>&nbsp;
    <p><strong>Van:</strong> Ronald Klop &lt;ronald-lists@klop.ws&gt;<br> <strong>Datum:</strong> donderdag, 11 september 2025 11:33<br> <strong>Aan:</strong> "Dan Mahoney (Ports)" &lt;freebsd@gushi.org&gt;<br> <strong>CC:</strong> FreeBSD Mailing List &lt;freebsd-ports@freebsd.org&gt;<br> <strong>Onderwerp:</strong> Re: Okay, how much ram does it take to build Rust?</p>

    <blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
    <div class="MessageRFC822Viewer" id="P">
    <div class="MultipartAlternativeViewer">
    <div class="TextHTMLViewer" id="P.P.P">Hi,<br>

    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.<br>

    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.<br>

    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.<br>

    Regards,<br>
    Ronald.<br>



    &nbsp;
    <p><strong>Van:</strong> "Dan Mahoney (Ports)" &lt;freebsd@gushi.org&gt;<br> <strong>Datum:</strong> donderdag, 11 september 2025 09:42<br> <strong>Aan:</strong> FreeBSD Mailing List &lt;freebsd-ports@freebsd.org&gt;<br>
    <strong>Onderwerp:</strong> Okay, how much ram does it take to build Rust?</p>

    <blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
    <div class="MessageRFC822Viewer" id="P">
    <div class="TextPlainViewer" id="P.P">Hey there folks,<br>

    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.<br>

    lang/rust is a big one. &nbsp;It pontificates for about two hours, then dies with:<br>

    [ 45% 1690/3710] Building RISCVGenExegesis.inc...<br>
    [ 45% 1691/3710] Building RISCVGenGlobalISel.inc...<br>
    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<br>
    cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build &amp;&amp; /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<br>
    LLVM ERROR: out of memory<br>
    Allocation failed<br>
    PLEASE submit a bug report to <a href="https://github.com/llvm/llvm-project/issues/">https://github.com/llvm/llvm-project/issues/</a> and include the crash backtrace.<br>
    Stack dump:<br>
    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<br>
    ninja: build stopped: subcommand failed.<br>

    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:<br>

    command did not execute successfully, got: exit status: 6<br>

    build script failed, must exit now<br>
    stack backtrace:<br>
    &nbsp;&nbsp;&nbsp;0: __rustc::rust_begin_unwind<br>
    &nbsp;&nbsp;&nbsp;1: core::panicking::panic_fmt<br>
    &nbsp;&nbsp;&nbsp;2: cmake::fail<br>

    Full logs here:<br>

    <a href="https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log">https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log</a><br>

    Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). &nbsp;Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound.<br>

    -Dan</div>

    <hr></div>
    </blockquote>

    &nbsp;</div>
    </div>
    </div>
    </blockquote>


    Oh, I just noticed that you did post a link to the build log. Sorry.<br>

    Take a look at
    <pre>virtual mem size (kbytes, -v) 2097152

    My builds have this:
    </pre>

    <pre>[00:00:00] virtual mem size (kbytes, -v) unlimited
    </pre>

    Regards and happy hacking,<br>
    Ronald.<br>
    &nbsp;</body></html>
    ------=_Part_4595_1994451573.1757583784859--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Piotr Smyrak@ps.ports@smyrak.com to muc.lists.freebsd.ports on Thu Sep 11 11:49:39 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Thu, 11 Sep 2025 00:42:37 -0700
    "Dan Mahoney (Ports)" <freebsd@gushi.org> wrote:
    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:

    [...]

    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.
    FWIW, Until January rCo when I got the RAM extended rCo I have successfully been building Rust on a 16GB machine with 4 core i7 Kaby Lake CPU.
    /Piotr
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Dan Mahoney \(Ports\)@freebsd@gushi.org to muc.lists.freebsd.ports on Thu Sep 11 16:35:33 2025
    From Newsgroup: muc.lists.freebsd.ports

    Entirely different problem:
    Build now fails within a minute of starting: https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
    My entire poudriere-conf is:
    ZPOOL=zroot
    FREEBSD_HOST=https://download.FreeBSD.org
    RESOLV_CONF=/etc/resolv.conf
    BASEFS=/usr/local/poudriere
    USE_PORTLINT=no
    USE_TMPFS=yes
    DISTFILES_CACHE=/usr/ports/distfiles PKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key KEEP_OLD_PACKAGES=yes
    KEEP_OLD_PACKAGES_COUNT=5
    Ideas welcome
    On Sep 11, 2025, at 9:11rC>AM, Daniel Engberg <diizzy@freebsd.org> wrote:

    On 2025-09-11 09:42, Dan Mahoney (Ports) wrote:
    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

    Hi,
    During linking it can use up quite a bit of memory, especially if you have multiple jobs running. You will struggle with 12Gb of RAM, 8Gb swap and ZFS (ARC) using ports and 3 jobs (-j3) using slow CPU (older i3 etc). My Ryzen (7000 series) box needs about 40Gb of RAM (including tmpfs) alone to build Rust using Poudriere without ARC accounted for and that's running -j8. It can be a bit hard to estimate as time for linking processes to finish can wary greatly depending on hardware and if those accumulate you'll need even more memory because of the slow processing and multiple running in parallel. Best regards, Daniel
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From void@void@f-m.fm to muc.lists.freebsd.ports on Fri Sep 12 00:52:56 2025
    From Newsgroup: muc.lists.freebsd.ports

    Try parallel_jobs=1 & allow_make_jobs=1


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Mark Millard@marklmi@yahoo.com to muc.lists.freebsd.ports on Thu Sep 11 17:56:29 2025
    From Newsgroup: muc.lists.freebsd.ports

    Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
    Date: Thu, 11 Sep 2025 23:35:33 UTC :
    Entirely different problem:

    Build now fails within a minute of starting:

    https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
    The actual error report in that log file is:
    = note: ld: error: undefined symbol: readdir_r
    >>> referenced by std.7afbaec6631a8b5b-cgu.01
    >>> std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
    >>> did you mean: readdir_r@FBSD_1.5
    >>> defined in: /lib/libc.so.7
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    Your poudriere jail's world is a version of FreeBSD 16
    that had readdir_r removed, breaking builds of rust.
    FreeBSD has had that removal reverted. You need to update
    the poudriere jail's world content to be of a vintage that
    includes:
    rCo git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Sm|+rgrav
    My entire poudriere-conf is:
    Is the "-" a typo? The normal name is: poudriere.conf
    Are you getting the settings that you intend?
    ZPOOL=zroot
    FREEBSD_HOST=https://download.FreeBSD.org
    RESOLV_CONF=/etc/resolv.conf
    BASEFS=/usr/local/poudriere
    USE_PORTLINT=no
    USE_TMPFS=yes
    rust uses huge amounts of temporary file system space,
    like 27 GiBytes+ (possibly notably more: I've not
    measured in a while). Any USE_TMPFS setting that
    implies/includes wrkdir is going to be that way,
    for example.
    "USE_TMPFS=yes" means that much of the file system
    space usage is competing for the system's RAM+SWAP
    space instead of for disk space.
    Having something like, say, SWAP=3.6*RAM [so
    (RAM+SWAP)=4.6*RAM] is a possibility that will
    page the part of the time that RAM is insufficient.
    Otherwise you probably want more like: USE_TMPFS=data
    DISTFILES_CACHE=/usr/ports/distfiles PKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key KEEP_OLD_PACKAGES=yes
    I've never tested if KEEP_OLD_PACKAGES interacts with
    USE_TMPFS=yes (or oterh settings of it) to increase
    the competition for RAM+SWAP.
    KEEP_OLD_PACKAGES_COUNT=5
    Same here.
    Ideas welcome
    ===
    Mark Millard
    marklmi at yahoo.com
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Dan Mahoney \(Ports\)@freebsd@gushi.org to muc.lists.freebsd.ports on Thu Sep 11 19:49:30 2025
    From Newsgroup: muc.lists.freebsd.ports


    On Sep 11, 2025, at 5:56rC>PM, Mark Millard <marklmi@yahoo.com> wrote:

    Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
    Date: Thu, 11 Sep 2025 23:35:33 UTC :

    Entirely different problem:

    Build now fails within a minute of starting:

    https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log

    The actual error report in that log file is:

    = note: ld: error: undefined symbol: readdir_r
    referenced by std.7afbaec6631a8b5b-cgu.01
    std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
    did you mean: readdir_r@FBSD_1.5
    defined in: /lib/libc.so.7
    cc: error: linker command failed with exit code 1 (use -v to see invocation)

    Your poudriere jail's world is a version of FreeBSD 16
    that had readdir_r removed, breaking builds of rust.

    FreeBSD has had that removal reverted. You need to update
    the poudriere jail's world content to be of a vintage that
    includes:

    rCo git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Sm|+rgrav
    Aah, so at some point, I guess I had a 16 vm, which was failing due to a memory limit, then tried updating to try and fix that, but at the same time as fixing the ram issue, so I was no longer memory bound, but now in the broken state. Whoops, perfect timing.
    I've updated now, and we're once again building. (I have both a jail built from src and one that uses pkgbase, trying both).
    My entire poudriere-conf is:

    Is the "-" a typo? The normal name is: poudriere.conf
    It was a typo, yes.

    "USE_TMPFS=yes" means that much of the file system
    space usage is competing for the system's RAM+SWAP
    space instead of for disk space.

    Having something like, say, SWAP=3.6*RAM [so
    (RAM+SWAP)=4.6*RAM] is a possibility that will
    page the part of the time that RAM is insufficient.

    Otherwise you probably want more like: USE_TMPFS=data

    This is what I've done.
    Let's see if it works. Rust builds so fast, after all...
    -Dan--
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ronald Klop@ronald-lists@klop.ws to muc.lists.freebsd.ports on Fri Sep 12 07:23:36 2025
    From Newsgroup: muc.lists.freebsd.ports

    ------=_Part_273_1182932228.1757654616247
    Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit

    Writing to a file needs memory. So having a file as swap can get into a loop for claiming memory. ZFS and maybe geom encryption can amplify this effect even more than UFS.
    So, it is not so much about popularity. It is about known flaws. It works until it stops working.

    Regards,
    Ronald

    Van: Tatsuki Makino <tatsuki_makino@hotmail.com>
    Datum: 12 september 2025 06:20
    Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>
    Onderwerp: Re: Okay, how much ram does it take to build Rust?



    Hello.

    By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
    However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)

    Regards.






    ------=_Part_273_1182932228.1757654616247
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <html><head></head><body>Writing to a file needs memory. So having a file as swap can get into a loop for claiming memory. ZFS and maybe geom encryption can amplify this effect even more than UFS.<div>So, it is not so much about popularity. It is about known flaws. It works until it stops working. </div><div>&nbsp;</div><div>Regards,</div><div>Ronald</div><div><br><p><small><strong>Van:</strong> Tatsuki Makino &lt;tatsuki_makino@hotmail.com&gt;<br><strong>Datum:</strong> 12 september 2025 06:20<br><strong>Aan:</strong> FreeBSD Mailing List &lt;freebsd-ports@freebsd.org&gt;<br><strong>Onderwerp:</strong> Re: Okay, how much ram does it take to build Rust?<br></small></p><blockquote style="margin-left: 5px; border-left: 3px solid #ccc; margin-right: 0px; padding-left: 5px;"><div class="MessageRFC822Viewer do_not_remove" id="P"><!-- P -->
    <!-- processMimeMessage --><div class="TextPlainViewer do_not_remove" id="P.P"><!-- P.P -->Hello.<br>

    By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?<br>
    However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)<br>

    Regards.<br>


    </div><!-- TextPlainViewer -->

    </div><!-- MessageRFC822Viewer --> </blockquote><br><br><br></div></body></html> ------=_Part_273_1182932228.1757654616247--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From void@void@f-m.fm to muc.lists.freebsd.ports on Fri Sep 12 11:43:32 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Fri, Sep 12, 2025 at 01:20:08PM +0900, Tatsuki Makino wrote:
    Hello.

    By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
    However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)

    Useful to make extra swap space on-the-fly. I've used it on occasion
    to add swap space. But it's best added to the fastest media, like
    ssd. Adding it to a spinning rust ufs is slower. It's not really
    suitable to add to a zfs filesystem in my experience.
    --


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Tomoaki AOKI@junchoon@dec.sakura.ne.jp to muc.lists.freebsd.ports on Fri Sep 12 21:42:05 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Fri, 12 Sep 2025 11:43:32 +0100
    void <void@f-m.fm> wrote:

    On Fri, Sep 12, 2025 at 01:20:08PM +0900, Tatsuki Makino wrote:
    Hello.

    By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
    However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)

    Useful to make extra swap space on-the-fly. I've used it on occasion
    to add swap space. But it's best added to the fastest media, like
    ssd. Adding it to a spinning rust ufs is slower. It's not really
    suitable to add to a zfs filesystem in my experience.
    --

    To do so, large enough spare real memory to handle filesystem (and/or
    zvol) operations even on thrashing situations is mandatory.
    And if the filesystem which the swap file to be created is severely
    fragmented, more real memory compared with non-fragmented filesystems
    would be needed.
    --
    Tomoaki AOKI <junchoon@dec.sakura.ne.jp>


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Mark Millard@marklmi@yahoo.com to muc.lists.freebsd.ports on Fri Sep 12 07:25:18 2025
    From Newsgroup: muc.lists.freebsd.ports

    On Sep 11, 2025, at 19:49, Dan Mahoney (Ports) <freebsd@gushi.org> wrote:

    On Sep 11, 2025, at 5:56rC>PM, Mark Millard <marklmi@yahoo.com> wrote:

    Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
    Date: Thu, 11 Sep 2025 23:35:33 UTC :

    Entirely different problem:

    Build now fails within a minute of starting:

    https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log

    The actual error report in that log file is:

    = note: ld: error: undefined symbol: readdir_r
    referenced by std.7afbaec6631a8b5b-cgu.01
    std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
    did you mean: readdir_r@FBSD_1.5
    defined in: /lib/libc.so.7
    cc: error: linker command failed with exit code 1 (use -v to see invocation)

    Your poudriere jail's world is a version of FreeBSD 16
    that had readdir_r removed, breaking builds of rust.

    FreeBSD has had that removal reverted. You need to update
    the poudriere jail's world content to be of a vintage that
    includes:

    rCo git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Sm|+rgrav

    Aah, so at some point, I guess I had a 16 vm, which was failing due to a memory limit, then tried updating to try and fix that, but at the same time as fixing the ram issue, so I was no longer memory bound, but now in the broken state. Whoops, perfect timing.

    I've updated now, and we're once again building. (I have both a jail built from src and one that uses pkgbase, trying both).

    My entire poudriere-conf is:

    Is the "-" a typo? The normal name is: poudriere.conf

    It was a typo, yes.


    "USE_TMPFS=yes" means that much of the file system
    space usage is competing for the system's RAM+SWAP
    space instead of for disk space.

    Having something like, say, SWAP=3.6*RAM [so
    (RAM+SWAP)=4.6*RAM] is a possibility that will
    page the part of the time that RAM is insufficient.

    Otherwise you probably want more like: USE_TMPFS=data


    This is what I've done.

    Let's see if it works. Rust builds so fast, after all...
    I'll note that there is another option that I'd not
    mentioned: use of TMPFS_BLACKLIST and TMPFS_BLACKLIST_TMPDIR
    with USE_TMPFS=yes or USE_TMPFS=all or the like to
    specifically cause the rust package to not use tmpfs for
    file system storage for the most part. Depending on what you
    build, there are other port packages that have similar or
    larger file system usage requirements. More than rust might
    be listed. Port package names (not origins) are what to list
    in TMPFS_BLACKLIST .
    There are some port-packages that use fairly large file
    system space during builds even for USE_TMPFS=data and
    being listed in TMPFS_BLACKLIST : TMPFS_BLACKLIST does
    not apply to the USE_TMPFS=data file system usage.
    Using MUTUALLY_EXCLUSIVE_BUILD_PACKAGES with any that
    create problems can be appropriate if one is allowing
    multiple builders to run in parallel.
    I'll note that if you use USE_TMPFS=data you can likely
    allow significantly more parallel building activity,
    say via ALLOW_MAKE_JOBS=yes and possible
    MAKE_JOBS_NUMBER_LIMIT use (if needed).
    ===
    Mark Millard
    marklmi at yahoo.com
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2