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?

1 Like

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

Hello @Milkii_Brewster,

We do have some options today that may be of service to you, but unfortunately I do not possess an ODROID N2 to test compatibility. However, if you’d like I don’t have any problems going out to get one to see if my proposed alternatives below can work with it.

If you are interested, we do have MongoDB Realm which can handle local persistent storage, and cloud sync operations with Atlas.

If you are interested in a pure online only kind of recording methods, we do have the MongoDB Data API. But this API is in preview stages presently, and is not GA.

Our Data API is extremely lightweight (for obvious reasons). You would only need to implement an HTTP service within your ODROID N2 along with a means of connecting to the internet.

I would also love to hear more about your ODROID N2 project and learn more about its use case that you have in mind, and other kinds of projects that you’ve seen with them.

I am a huge Raspberry Pi and Arduino fan myself. I’ve worked on teams and have developed all sorts of things from industrial control systems, slot machines, offensive security gadgets, fishtank monitors and a NAS with a 10TB HDD.

I look forward from hearing from you.

Regards,

Brock