If you emerge >=dev-db/mongodb-5.0.0 on a CPU, which does not support AVX instructions, compilation will work, but mongodb won't run due invalid op code. The ebuild shown check somehow for those instructions or at least inform the user about this. As my CPU does not offer this, I get those messages: [ 455.495967] traps: mongod[11430] trap invalid opcode ip:603898afbdd1 sp:7ffc0e61b720 error:0 in mongod[603896397000+37c3000]
Thanks for reporting Conrad, I wasn't aware of this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf8e03756852ba2705bf5259b590edaca8d271ad commit bf8e03756852ba2705bf5259b590edaca8d271ad Author: Tomáš Mózes <hydrapolic@gmail.com> AuthorDate: 2021-08-23 14:42:44 +0000 Commit: Alexys Jacob <ultrabug@gentoo.org> CommitDate: 2021-08-23 15:40:29 +0000 dev-db/mongodb: require AVX for mongodb-5.0 Closes: https://bugs.gentoo.org/809692 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22079 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org> dev-db/mongodb/mongodb-5.0.2.ebuild | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
They did a similar thing with ARM64, now requiring at least ARMv8.2, instead of ARMv8.0. But it's easy to revert it, here's a patch FreeBSD uses for ARM: https://cgit.freebsd.org/ports/tree/databases/mongodb50/files/patch-SConstruct#n25 You could probably replace sandybridge with generic in https://github.com/mongodb/mongo/blob/master/SConstruct#L2543