Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Version 0.27 cannot be compiled if pclmuldq is specified #324

Closed

Description

@kazu-yamamoto

On Linux on Haswell, I got the following error:

% cabal config -f support_pclmuldq
% cabal build
[135 of 135] Compiling Crypto.Tutorial  ( Crypto/Tutorial.hs, dist/build/Crypto/Tutorial.o )

In file included from cbits/aes/x86ni.h:38:0: error:
    0,
                     from cbits/aes/gf.c:35:

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/wmmintrin.h:34:3: error:
     エラー: #error "AES/PCLMUL instructions not enabled"
     # error "AES/PCLMUL instructions not enabled"
       ^
   |
34 | # error "AES/PCLMUL instructions not enabled"
   |   ^

In file included from cbits/aes/x86ni.h:39:0: error:
    0,
                     from cbits/aes/gf.c:35:

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/tmmintrin.h:31:3: error:
     エラー: #error "SSSE3 instruction set not enabled"
     # error "SSSE3 instruction set not enabled"
       ^
   |
31 | # error "SSSE3 instruction set not enabled"
   |   ^
`gcc' failed in phase `C Compiler'. (Exit code: 1)
cab: callCommand: cabal v1-build (exit 1): failed

Activity

  1. kazu-yamamoto commented on Jun 24, 2020

    @kazu-yamamoto
    ContributorAuthor

    Here is cpuinfo:

    % cat /proc/cpuinfo | grep flags
    flags		: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm invpcid_single ssbd ibrs ibpb fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt spec_ctrl
    
  2. kazu-yamamoto commented on Jun 24, 2020

    @kazu-yamamoto
    ContributorAuthor

    If use_target_attributes is disabled, the build gets fine.

  3. ocheron commented on Jun 24, 2020

    @ocheron
    Contributor

    I'm not surprised, I saw this too.
    GCC 4.8 has a version of the header files requiring global target attributes. GCC 4.9 is fine.
    How is it serious, are there many distributions still with 4.8?
    That's precisely why flag use_target_attributes exists.

  4. kazu-yamamoto commented on Jun 25, 2020

    @kazu-yamamoto
    ContributorAuthor

    CentOS 7 provides GCC 4.8 while CentOS 8 uses 8.3. I will try this on CentOS 8. (The reason why I had a CentOS 8 instance is GSO (Generic Segmentation Offload) which is considered as a key to improve the performance of QUIC.)

  5. kazu-yamamoto commented on Jun 25, 2020

    @kazu-yamamoto
    ContributorAuthor

    OK. cabal install cryptonite -f support_pclmuldq works well on CentOS 8. Let's close this.

  6. ocheron commented on Jun 28, 2020

    @ocheron
    Contributor

    Thanks for the details about CentOS. I added a note in the README file.

  7. added a commit that references this issue on Aug 28, 2020
  8. added a commit that references this issue on Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions