Hi,

A bit off topic, but as maintainer of mongodb70 I can tell you that I do my 
test building on a RPI4 with 8GB of memory. It has 16 GB of swap, but that 
isn't used that much during my build tests.

I do add LDFLAGS+= -Wl,--threads=1 to the build. In my experience the linker is 
using a lot of memory when multi threaded and at the end of the mongo build you 
end up with 2 or 3 binaries being linked in parallel if you are unlucky.
You can also play with MAKE_JOBS_NUMBER=3 to keep it from running to much in 
parallel.
Of course limiting parallelism makes the duration longer, unless it is swapping 
so much that sequential compiling without swapping is faster than parallel 
building with trashing the swap space. Find the sweet spot.

And yes, MongoDB is a monster to compile.

Regards,
Ronald.


Van: Paul Mather <[email protected]>
Datum: vrijdag, 7 november 2025 16:42
Aan: bob prohaska <[email protected]>
CC: Mark Millard <[email protected]>, Ronald Klop <[email protected]>, 
[email protected], [email protected]
Onderwerp: Re: Arm v7 RPi2 -current unresponsive to debugger escape during 
buildworld

On Nov 6, 2025, at 9:22pm, bob prohaska <[email protected]> wrote:

> On Thu, Nov 06, 2025 at 10:00:19AM -0800, Mark Millard wrote:
>> On Nov 6, 2025, at 08:38, bob prohaska <[email protected]> wrote:
>>
>>> On Thu, Nov 06, 2025 at 03:45:01PM +0100, Ronald Klop wrote:
>>>> Hi,
>>>>
>>>> To me it sounds like your machine is overwhelmed by swapping.
>>>>
>>>> Try -j1 buildworld.
> Maybe a -j1 buildworld could be at least somewhat informative.
> Lately none of my Pi2's has made it through buildworld
> without hanging silently. If -j1 buildworld completes,
> that would be a significant change. The test will take a
> week, but the problem has been going on for a year.


This isn't related directly to building on the RPi2, but just a general comment 
that on a system with 1 GB RAM like the RPi2, building with -j3 (or anything 
more than -j1) is probably wishful thinking at this point given it seems the 
RAM requirements of LLVM right now seem to be creeping ever upwards.

LLVM 19.1.7 seems slower and more memory-hungry than ever before.  Maybe it's 
LTO?  I don't know.  My current bugbear is the databases/mongodb70 port which 
will no longer build for me on the 16 GB RAM FreeBSD/amd64 14-STABLE system I 
use to build ports locally via Poudriere.  It will grind away for hours and 
ultimately fail due to the compiler being out of memory at some point.  I found 
a Bugzilla report by someone who attested it required 24 GB RAM to build, and 
it will only successfully build now for me if I add an extra 30 GB swap or so 
on that build system.  Even then, it takes an age to build: the last successful 
one being 12:39:27 (and that potentially benefitting from prior ccache builds). 
 That mongodb70 port takes about an order of magnitude longer to build than an 
entire buildword/buildkernel on the same system.

I guess building software yourself just takes more RAM these days, and recognise that the 
RPi2 does not have much RAM in the grand scheme of things by today's standards.  I hope a 
"-j1" build works for you.

Cheers,

Paul.



Reply via email to