Build advice for arm64/aarch64?

Hi.

I’m trying to build MongoDB on an ODRIOD N2 with Armbian+Yunohost so I can install Wekan. (Usually I’m on Arch, but Yunohost is .deb orientated).

I’m trying to follow these instructions, but python3 buildscripts/scons.py --ssl CC=gcc-8 CXX=g++-8 CCFLAGS="-march=armv8-a+crc -mtune=cortex-a53" --install-mode=hygienic --install-action=hardlink --separate-debug archive-core{,-debug} (note; switched to a53 not a72) slows the system down to just above a freeze within 5 minutes of work.

Are there any options I could set to see if that would help the build continue without locking the N2 up?

Hi @Milkii_Brewster -

If you are actually building on the ODROID N2 you are going to find that it completely saturates the device and still takes forever. Then, it will almost certainly fail on some link step with an OOM. MongoDB is a fairly sizable C++ project, so a server class machine is basically required to get reasonable compile times and to get through the link step without OOMs. I really recommend taking the cross compile approach that is outlined in the same post you linked to. Just do the build on the analogous Debian version to whatever Armbian you are running. Unless there are some weird ABI differences between Debian and Armbian it should just work.

If you really must build on this device, you could try with --link-model=dynamic to reduce the memory needs at link time. And you could use the -j N flag to reduce the number of parallel jobs to some number less than the number of cores on the ODROID N2 so you aren’t totally maxing it out. Be prepared to wait quite some time.

Hope that helps.

1 Like

Unfortunately my laptop died last month and I’m waiting/saving for a mobile Ryzen 6000 Thinkpad, and I’m used to running with -git AUR packages for testing so I should be able to hack the wait :wink:

Worst comes to the worst, I should have a contact who I could arrange to do a build for me.

To help manage the expectations of myself and others who will find this later; given the increasing number of devices using that architecture, what might the decision-making process be around a timeline for the provision of aarch64 MongoDB .debs?

Thanks for the advice!

@Milkii_Brewster - At this time, I’m not aware of plans to produce official Debian ARM releases. I would encourage you to file a JIRA ticket in the SERVER project requesting such builds if it is something you would find helpful.

The MongoDB JIRA is here: https://jira.mongodb.org/

Actually, @Milkii_Brewster there appears to be at least one Debian ARM ticket already filed: https://jira.mongodb.org/browse/SERVER-54692.

That specifically requests Buster, but it might be good for you to follow up with details about the version you would like to see supported.

1 Like