Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb 7.0.12 contains avx2 instructions #16

Open
ondrej-zary opened this issue Jul 9, 2024 · 5 comments
Open

mongodb 7.0.12 contains avx2 instructions #16

ondrej-zary opened this issue Jul 9, 2024 · 5 comments

Comments

@ondrej-zary
Copy link

mongodb upgraded mozjs to ESR115.7 in 7.0.12 and its brain-dead SConscript contains this:
env.Append(CCFLAGS=['-mavx2'])

Removing it does not work - looks like SIMD_avx2.cpp must be compiled with this flag. I don't know how to fix that so I hacked it around.
mozjs-noavx.patch

@zhuxb711
Copy link

@ondrej-zary Would you share a full repo that could build a docker image that base on mongodb 7.X without AVX requirement?

@ondrej-zary
Copy link
Author

No, I don't have any. I just build the binary and replace it in the official deb package. Then use it for unifi network (wireless controller).

pich02 pushed a commit to pich02/mongodb-without-avx that referenced this issue Sep 12, 2024
@stevekerrison
Copy link

stevekerrison commented Oct 29, 2024

After 8 hours of building on my weak N5095 system, because I didn't think it would be that bad, I also discovered this 😂.

I folded the above patch into one applied in the Dockerfile, but at the same time am experimenting with -march=native, because dropping AVX support shouldn't mean only supporting the generic x86-64 ISA.

Will report back in... a few more hours I guess.

@stevekerrison
Copy link

stevekerrison commented Oct 31, 2024

After 8 hours of building on my weak N5095 system, because I didn't think it would be that bad, I also discovered this 😂.

I folded the above patch into one applied in the Dockerfile, but at the same time am experimenting with -march=native, because dropping AVX support shouldn't mean only supporting the generic x86-64 ISA.

Will report back in... a few more hours I guess.

So in the end I went in the complete opposite direction and decided to just run Mongo via static QEMU under the assumption that performance really isn't a concern for my use case anyway.

If that holds true for anyone else, then I've made my simple wrapper container available: https://github.com/stevekerrison/mongo-qemu-avx

@gyrex
Copy link

gyrex commented Dec 14, 2024

mongodb upgraded mozjs to ESR115.7 in 7.0.12 and its brain-dead SConscript contains this: env.Append(CCFLAGS=['-mavx2'])

Removing it does not work - looks like SIMD_avx2.cpp must be compiled with this flag. I don't know how to fix that so I hacked it around. mozjs-noavx.patch

Apologies if this is a stupid question but how do I roll this patch into the Dockerfile build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants