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

error "SSE4.1 instruction set not enabled" #33

Closed
bguil opened this issue Nov 21, 2022 · 6 comments
Closed

error "SSE4.1 instruction set not enabled" #33

bguil opened this issue Nov 21, 2022 · 6 comments

Comments

@bguil
Copy link

bguil commented Nov 21, 2022

As mentioned in #32, the version 1.17 fails to compile on Mac M1.

The upcoming 1.18 version fixes the problem. Can you release it please?

@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?

@David4x
Copy link

David4x commented Dec 13, 2022

@xavierleroy if you are not able to correct the v1.17 tar file to remove #include <smmintrin.h> in pclmul.c file or releasing v1.18 is too complex, can you please assist me with a work around?

I am trying to build google-drive-ocamlfuse and it uses your package as a library. See output below

The problem is it pulls your v1.17 tar file each time and then tries to compile it but it fails because of "error "SSE4.1 instruction set not enabled" and I have not been able to edit the local copy of pclmul.c as it is overwritten each time.

Is there are way to introduce a delay or halt in the build between retreiving the file from your repo and the compile so that I can quickly make the edit? Sorry I am a beginner in opam, dune and OCaml and have not been able to see where I can introduce a pause/request to continue by the user....

Your earliest reply would be appreciated @xavierleroy

> opam install google-drive-ocamlfuse
> The following actions will be performed:
>   ∗ install cryptokit              1.17   [required by google-drive-ocamlfuse]
>   ∗ install gapi-ocaml             0.4.3  [required by google-drive-ocamlfuse]
>   ∗ install google-drive-ocamlfuse 0.7.30
> ===== ∗ 3 =====
> Do you want to continue? [Y/n] y
> 
> <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
> Processing  3/9: [cryptokit.1.17: http] [gapi-ocaml.0.4.3: http] [google-drive-ocamlfuse.0.7.30: http]
> ⬇ retrieved google-drive-ocamlfuse.0.7.30  (https://github.com/astrada/google-drive-ocamlfuse/archive/v0.7.30.tar.gz)
> ⬇ retrieved cryptokit.1.17  (https://github.com/xavierleroy/cryptokit/archive/release117.tar.gz)
> ⬇ retrieved gapi-ocaml.0.4.3  (https://github.com/astrada/gapi-ocaml/archive/v0.4.3.tar.gz)
> [ERROR] The compilation of cryptokit.1.17 failed at "dune build -p cryptokit -j 1 @install".
> 
> #=== ERROR while compiling cryptokit.1.17 =====================================#
> # context     2.1.3 | linux/x86_64 | ocaml-base-compiler.4.09.0 | git+https://github.com/ocaml/opam-repository.git
> # path        ~/.opam/4.09.0/.opam-switch/build/cryptokit.1.17
> # command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p cryptokit -j 1 @install
> # exit-code   1
> # env-file    ~/.opam/log/cryptokit-23605-09d063.env
> # output-file ~/.opam/log/cryptokit-23605-09d063.out
> ### output ###
> # [...]
> # (cd _build/default/src && config/flags.exe)
> # ZLib: ............................... enabled
> # Hardware support for AES and GCM: ... enabled
> # getentropy():........................ disabled
> # File "src/dune", line 36, characters 9-15:
> # 36 |          pclmul
> #               ^^^^^^
> # (cd _build/default/src && /usr/bin/gcc -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML09.0/lib/ocaml -I /home/admin/.opam/4.09.0/lib/zarith -o pclmul.o -c pclmul.c)
> # In file included from pclmul.c:24:0:
> # /usr/lib/gcc/x86_64-linux-gnu/4.8/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled"
> #  # error "SSE4.1 instruction set not enabled"
> #    ^
> 
> 
> 
> <><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
> ┌─ The following actions failed
> │ λ build cryptokit 1.17
> └─
> ╶─ No changes have been performed

@bguil
Copy link
Author

bguil commented Dec 14, 2022

My workaround is to use the command: opam pin add cryptokit git+file:///home/guillaum/tmp/cryptokit#master which tells opam to use the latest unreleased version of the cryptokit code.

@bguil
Copy link
Author

bguil commented Dec 14, 2022

@David4x: sorry, the right command is opam pin add cryptokit git+https://github.com/xavierleroy/cryptokit#master (the previous one uses a local files on my computer).

@bguil bguil closed this as completed Dec 14, 2022
@bguil bguil reopened this Dec 14, 2022
@David4x
Copy link

David4x commented Dec 14, 2022

@David4x: sorry, the right command is opam pin add cryptokit git+https://github.com/xavierleroy/cryptokit#master (the previous one uses a local files on my computer).

Fantastic thanks @bguil that worked perfectly.

@xavierleroy
Copy link
Owner

Cryptokit 1.18 was released two weeks ago, with the fix for this issue, and the package has just landed in OPAM, so this report can be closed.

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

3 participants