Bug 272294 - databases/mongodb44 uses -march=armv8.2-a and does not work on raspberry pi anymore
Summary: databases/mongodb44 uses -march=armv8.2-a and does not work on raspberry pi a...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: Ronald Klop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-30 13:58 UTC by Ronald Klop
Modified: 2023-06-30 22:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Klop freebsd_committer freebsd_triage 2023-06-30 13:58:20 UTC
MongoDB 4.4.18 didn't add -march=armv8.2-a to the build. Recent versions do.
MongoDB 5 and 6 have patches to SConstruct to lower the minimal march to be compatible with Raspberry PIs.

Tasks:
- Patch SConstruct similar to MongoDB 5 and 6.
- Find out if some patch was lost for MongoDB 4.4 (less important, but nice for history)


Some example output of 4.4.22 on Rpi4:

[root@rpi4 /var/tmp]# lldb -- mongod --dbpath /var/tmp/bla/                                                                                                                                          
(lldb) target create "mongod"
Current executable set to '/usr/local/bin/mongod' (aarch64).
(lldb) settings set -- target.run-args  "--dbpath" "/var/tmp/bla/"
(lldb) run
Process 22126 launched: '/usr/local/bin/mongod' (aarch64)
Process 22126 stopped
* thread #1, name = 'mongod', stop reason = signal SIGILL: illegal trap
    frame #0: 0x0000409dc873a664 mongod`mongo::MutableObserverRegistry<int>::MutableObserverRegistry() + 52
mongod`mongo::MutableObserverRegistry<int>::MutableObserverRegistry:
->  0x409dc873a664 <+52>: ldaddal x10, x8, [x9]
    0x409dc873a668 <+56>: strb   w10, [sp, #0x40]
    0x409dc873a66c <+60>: str    x8, [sp, #0x38]
    0x409dc873a670 <+64>: bl     0x409dca575110            ; symbol stub for: operator new(unsigned long)
(lldb)
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-06-30 22:16:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b0aa4da9bcd26ef05c304ee163bd38367b891f4e

commit b0aa4da9bcd26ef05c304ee163bd38367b891f4e
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2023-06-30 21:18:09 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2023-06-30 22:16:02 +0000

    databases/mongodb44: enable build for Raspberry Pi

    Upstream stopt supporting non-LSE ARM cpus (read RPI).
    See: https://jira.mongodb.org/browse/SERVER-71772
    For POLA I still enable this for the Q3 branch.

    PR:     272294

 .../patch-src_third__party_mozjs-60_gen-config.sh   |  6 +++---
 databases/mongodb44/files/patch-SConstruct          | 21 +++++++++++++++------
 databases/mongodb44/pkg-message (new)               |  8 ++++++++
 3 files changed, 26 insertions(+), 9 deletions(-)