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

usage of pclmul may need SSE4.1 #32

Closed
olafhering opened this issue May 2, 2022 · 6 comments
Closed

usage of pclmul may need SSE4.1 #32

olafhering opened this issue May 2, 2022 · 6 comments

Comments

@olafhering
Copy link

1267f4d fails to build on SLES12 x86_64:

[   36s] + dune build --verbose --for-release-of-packages=cryptokit -j6 @install
....
[   37s] Command [30] exited with code 1:
[   37s] $ (cd _build/default/src && /usr/bin/gcc-4.8 -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -pthread -Werror=implicit-function-declaration -Werror=return-type -Wno-deprecated-declarations -fPIC -pipe -D_FILE_OFFSET_BITS=64 -DCAML_NAME_SPACE -DHAVE_ZLIB -maes -mpclmul -g -I /usr/lib64/ocaml -I /usr/lib64/ocaml/zarith -o pclmul.o -c pclmul.c)
[   37s] In file included from pclmul.c:24:0:
[   37s] /usr/lib64/gcc/x86_64-suse-linux/4.8/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled"
[   37s]  # error "SSE4.1 instruction set not enabled"
[   37s]    ^

smmintrin.h looks different in gcc7, perhaps this is a bug in gcc 4.8.

@xavierleroy
Copy link
Owner

Actually, the #include <smmintrin.h> in pclmul.c does refer to SSE4.1, but it is no longer necessary. (It was in an earlier version of the code that used SSE4.1 instructions...) Expect a fix soon.

xavierleroy added a commit that referenced this issue May 2, 2022
As reported in #32, it can cause a compile-time error.
@xavierleroy
Copy link
Owner

Commit 3ab75d3 should fix this issue. Could you give it a try?

@olafhering
Copy link
Author

Yes, this compiles now. Thank you.

@xavierleroy
Copy link
Owner

OK, thanks for the confirmation.

Fixed by 3ab75d3 , closing.

@bguil
Copy link

bguil commented Jul 27, 2022

I still have an error # # error "SSE4.1 instruction set not enabled" with a fresh install of cryptokit 1.17.

The problem is fixed by 3ab75d3 but this commit is not in 1.17.
Can you publish the 1.18 version which is ready in the code to solve this?

@David4x
Copy link

David4x commented Dec 13, 2022

I also have this same issue but I am using opam and OCaml and that package manager is pulling from

https://github.com/xavierleroy/cryptokit/archive/release117.tar.gz

This tar file does not contain the fix that removes the #include <smmintrin.h> in pclmul.c file.

Can you please update the tar file with the latest versions of the code ASAP please?

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