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

build: unbreak x86 builds #681

Merged
merged 1 commit into from
Oct 19, 2020
Merged

build: unbreak x86 builds #681

merged 1 commit into from
Oct 19, 2020

Conversation

jengelh
Copy link
Contributor

@jengelh jengelh commented Oct 17, 2020

SSE is not guaranteed to be present on x86 hosts, so i386..i686
compilers default to -mno-sse. That however makes the build fail
because vmaf unconditionally uses emmintrin functions which are
not available under no-sse. ppc64le builds however are just fine, so...

Change the macro guarding emmintrin to not match on x86-like
architectures, but to match on the enablement of SSE2. The macro
"SSE2" is the gcc name and is true whenever -msse2 is enabled
(explicitly or implicitly); clang should behave the same. I have not
tested this under other compilers such as Microsoft, though.

Fixes: #374

SSE is not guaranteed to be present on x86 hosts, so i386..i686
compilers default to -mno-sse. That however makes the build fail
because vmaf unconditionally uses emmintrin functions which are
not available under no-sse. ppc64le builds however are just fine, so...

Change the macro guarding emmintrin to not match on x86-like
architectures, but to match on the enablement of SSE2. The macro
"__SSE2__" is the gcc name and is true whenever -msse2 is enabled
(explicitly or implicitly); clang should behave the same. I have not
tested this under other compilers such as Microsoft, though.

Fixes: #374
@li-zhi li-zhi requested a review from kylophone October 18, 2020 17:01
@kylophone kylophone merged commit 2cd138c into Netflix:master Oct 19, 2020
@kylophone
Copy link
Collaborator

Merged. Ideally we could add a i386 CI runner to avoid breaking this in the future, but I'm not sure that is supported by our CI without self-hosting.

@1480c1
Copy link
Contributor

1480c1 commented Oct 19, 2020

I believe it's possible to do so by using the i686-linux-gnu-g++ and i686-w64-mingw32-g++ compiler, the second one is available in the windows image. By the way, for the mismatch between 32-bit and 64-bit libvmaf outputs, I fixed it locally by adding -msse2 -mfpmath=sse -mstackrealign to the cflags as that's what fedora does for their 32-bit packages

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

Successfully merging this pull request may close these issues.

Fails to build on x86 without SSE
3 participants