Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 809692

Summary: >=dev-db/mongodb-5.0.0 requires AVX
Product: Gentoo Linux Reporter: Conrad Kostecki <conikost>
Component: Current packagesAssignee: Ultrabug <ultrabug>
Status: RESOLVED FIXED    
Severity: normal CC: hydrapolic, sam
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fc9f41c5d7489794e250404fc25f92e644cca4b
See Also: https://github.com/gentoo/gentoo/pull/22079
https://bugs.gentoo.org/show_bug.cgi?id=890294
Whiteboard:
Package list:
Runtime testing required: ---

Description Conrad Kostecki gentoo-dev 2021-08-22 22:40:42 UTC
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]
Comment 1 Tomáš Mózes 2021-08-23 14:45:52 UTC
Thanks for reporting Conrad, I wasn't aware of this.
Comment 2 Larry the Git Cow gentoo-dev 2021-08-23 15:41:06 UTC
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(-)
Comment 3 Piotr Kubaj 2021-08-23 16:59:10 UTC
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