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

fails to build with Fedora 40 (gcc-14) #88

Open
juhp opened this issue Mar 21, 2024 · 6 comments
Open

fails to build with Fedora 40 (gcc-14) #88

juhp opened this issue Mar 21, 2024 · 6 comments

Comments

@juhp
Copy link

juhp commented Mar 21, 2024

Downstream bug is here: https://bugzilla.redhat.com/show_bug.cgi?id=2261128

It fails on all Fedora archs: https://koji.fedoraproject.org/koji/taskinfo?taskID=115236336

The x86_64 log looks like: (cached copy build.log)

[ 2 of 33] Compiling OpenSSL.DH.Internal
/tmp/ghc369_0/ghc_36.c: In function ‘ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree’:
/tmp/ghc369_0/ghc_36.c:9:1: error:
     warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
        9 | void ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree(DH* a1) {DH_free(a1);}
          | ^~~~
  |
9 | void ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree(DH* a1) {DH_free(a1);}
  | ^
In file included from /tmp/ghc369_0/ghc_36.c:7:0: error: 
/usr/include/openssl/dh.h:207:28: error:
     note: declared here
      207 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
          |                            ^~~~~~~
    |
207 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
    |                            ^
/tmp/ghc369_0/ghc_43.c: In function ‘ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree’:
/tmp/ghc369_0/ghc_43.c:9:1: error:
     warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
        9 | void ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree(DH* a1) {DH_free(a1);}
          | ^~~~
  |
9 | void ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziDHziInternalZCDHzufree(DH* a1) {DH_free(a1);}
  | ^
In file included from /tmp/ghc369_0/ghc_43.c:7:0: error: 
/usr/include/openssl/dh.h:207:28: error:
     note: declared here
      207 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
          |                            ^~~~~~~
    |
207 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
    |                            ^
[ 3 of 33] Compiling OpenSSL.ERR
[ 4 of 33] Compiling OpenSSL.EVP.Base64
/tmp/ghc369_0/ghc_64.c: In function ‘ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock’:
/tmp/ghc369_0/ghc_64.c:8:169: error:
     warning: pointer targets in passing argument 1 of ‘EVP_DecodeBlock’ differ in signedness [-Wpointer-sign]
        8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
          |                                                                                                                                                                         ^~
          |                                                                                                                                                                         |
          |                                                                                                                                                                         char *
  |
8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
  |                                                                                                                                                                         ^
In file included from /tmp/ghc369_0/ghc_64.c:7:0: error: 
/usr/include/openssl/evp.h:882:36: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                     ~~~~~~~~~~~~~~~^
    |
882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                    ^
/tmp/ghc369_0/ghc_64.c:8:173: error:
     warning: pointer targets in passing argument 2 of ‘EVP_DecodeBlock’ differ in signedness [-Wpointer-sign]
        8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
          |                                                                                                                                                                             ^~
          |                                                                                                                                                                             |
          |                                                                                                                                                                             char *
  |
8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
  |                                                                                                                                                                             ^
/usr/include/openssl/evp.h:882:60: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                                       ~~~~~~~~~~~~~~~~~~~~~^
    |
882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                                            ^
/tmp/ghc369_0/ghc_64.c: In function ‘ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock’:
/tmp/ghc369_0/ghc_64.c:10:169: error:
     warning: pointer targets in passing argument 1 of ‘EVP_EncodeBlock’ differ in signedness [-Wpointer-sign]
       10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
          |                                                                                                                                                                         ^~
          |                                                                                                                                                                         |
          |                                                                                                                                                                         char *
   |
10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
   |                                                                                                                                                                         ^
/usr/include/openssl/evp.h:875:36: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                     ~~~~~~~~~~~~~~~^
    |
875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                    ^
/tmp/ghc369_0/ghc_64.c:10:173: error:
     warning: pointer targets in passing argument 2 of ‘EVP_EncodeBlock’ differ in signedness [-Wpointer-sign]
       10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
          |                                                                                                                                                                             ^~
          |                                                                                                                                                                             |
          |                                                                                                                                                                             char *
   |
10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
   |                                                                                                                                                                             ^
/usr/include/openssl/evp.h:875:60: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                                       ~~~~~~~~~~~~~~~~~~~~~^
    |
875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                                            ^
/tmp/ghc369_0/ghc_71.c: In function ‘ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock’:
/tmp/ghc369_0/ghc_71.c:8:169: error:
     warning: pointer targets in passing argument 1 of ‘EVP_DecodeBlock’ differ in signedness [-Wpointer-sign]
        8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
          |                                                                                                                                                                         ^~
          |                                                                                                                                                                         |
          |                                                                                                                                                                         char *
  |
8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
  |                                                                                                                                                                         ^
In file included from /tmp/ghc369_0/ghc_71.c:7:0: error: 
/usr/include/openssl/evp.h:882:36: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                     ~~~~~~~~~~~~~~~^
    |
882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                    ^
/tmp/ghc369_0/ghc_71.c:8:173: error:
     warning: pointer targets in passing argument 2 of ‘EVP_DecodeBlock’ differ in signedness [-Wpointer-sign]
        8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
          |                                                                                                                                                                             ^~
          |                                                                                                                                                                             |
          |                                                                                                                                                                             char *
  |
8 | HsInt32 ghczuwrapperZC0ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuDecodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_DecodeBlock(a1, a2, a3);}
  |                                                                                                                                                                             ^
/usr/include/openssl/evp.h:882:60: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                                       ~~~~~~~~~~~~~~~~~~~~~^
    |
882 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                                            ^
/tmp/ghc369_0/ghc_71.c: In function ‘ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock’:
/tmp/ghc369_0/ghc_71.c:10:169: error:
     warning: pointer targets in passing argument 1 of ‘EVP_EncodeBlock’ differ in signedness [-Wpointer-sign]
       10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
          |                                                                                                                                                                         ^~
          |                                                                                                                                                                         |
          |                                                                                                                                                                         char *
   |
10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
   |                                                                                                                                                                         ^
/usr/include/openssl/evp.h:875:36: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                     ~~~~~~~~~~~~~~~^
    |
875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                    ^
/tmp/ghc369_0/ghc_71.c:10:173: error:
     warning: pointer targets in passing argument 2 of ‘EVP_EncodeBlock’ differ in signedness [-Wpointer-sign]
       10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
          |                                                                                                                                                                             ^~
          |                                                                                                                                                                             |
          |                                                                                                                                                                             char *
   |
10 | HsInt32 ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziBase64ZCEVPzuEncodeBlock(char* a1, char* a2, HsInt32 a3) {return EVP_EncodeBlock(a1, a2, a3);}
   |                                                                                                                                                                             ^
/usr/include/openssl/evp.h:875:60: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
          |                                       ~~~~~~~~~~~~~~~~~~~~~^
    |
875 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
    |                                                            ^
[ 5 of 33] Compiling OpenSSL.Objects
[ 6 of 33] Compiling OpenSSL.SSL.Option
[ 7 of 33] Compiling OpenSSL.Stack
[ 8 of 33] Compiling OpenSSL.Utils
[ 9 of 33] Compiling OpenSSL.Random
/tmp/ghc369_0/ghc_114.c: In function ‘ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes’:
/tmp/ghc369_0/ghc_114.c:10:1: error:
     warning: ‘RAND_pseudo_bytes’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
       10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
          | ^~~~
   |
10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
   | ^
In file included from /tmp/ghc369_0/ghc_114.c:7:0: error: 
/usr/include/openssl/rand.h:79:29: error:
     note: declared here
       79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
          |                             ^~~~~~~~~~~~~~~~~
   |
79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
   |                             ^
/tmp/ghc369_0/ghc_114.c:10:149: error:
     warning: pointer targets in passing argument 1 of ‘RAND_pseudo_bytes’ differ in signedness [-Wpointer-sign]
       10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
          |                                                                                                                                                     ^~
          |                                                                                                                                                     |
          |                                                                                                                                                     char *
   |
10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
   |                                                                                                                                                     ^
/usr/include/openssl/rand.h:79:62: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
          |                                               ~~~~~~~~~~~~~~~^~~
   |
79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
   |                                                              ^
/tmp/ghc369_0/ghc_114.c: In function ‘ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes’:
/tmp/ghc369_0/ghc_114.c:12:144: error:
     warning: pointer targets in passing argument 1 of ‘RAND_bytes’ differ in signedness [-Wpointer-sign]
       12 | HsInt32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes(char* a1, HsInt32 a2) {return RAND_bytes(a1, a2);}
          |                                                                                                                                                ^~
          |                                                                                                                                                |
          |                                                                                                                                                char *
   |
12 | HsInt32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes(char* a1, HsInt32 a2) {return RAND_bytes(a1, a2);}
   |                                                                                                                                                ^
/usr/include/openssl/rand.h:61:31: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       61 | int RAND_bytes(unsigned char *buf, int num);
          |                ~~~~~~~~~~~~~~~^~~
   |
61 | int RAND_bytes(unsigned char *buf, int num);
   |                               ^
/tmp/ghc369_0/ghc_121.c: In function ‘ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes’:
/tmp/ghc369_0/ghc_121.c:10:1: error:
     warning: ‘RAND_pseudo_bytes’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
       10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
          | ^~~~
   |
10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
   | ^
In file included from /tmp/ghc369_0/ghc_121.c:7:0: error: 
/usr/include/openssl/rand.h:79:29: error:
     note: declared here
       79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
          |                             ^~~~~~~~~~~~~~~~~
   |
79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
   |                             ^
/tmp/ghc369_0/ghc_121.c:10:149: error:
     warning: pointer targets in passing argument 1 of ‘RAND_pseudo_bytes’ differ in signedness [-Wpointer-sign]
       10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
          |                                                                                                                                                     ^~
          |                                                                                                                                                     |
          |                                                                                                                                                     char *
   |
10 | void ghczuwrapperZC1ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzupseudozubytes(char* a1, HsInt32 a2) {RAND_pseudo_bytes(a1, a2);}
   |                                                                                                                                                     ^
/usr/include/openssl/rand.h:79:62: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
          |                                               ~~~~~~~~~~~~~~~^~~
   |
79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
   |                                                              ^
/tmp/ghc369_0/ghc_121.c: In function ‘ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes’:
/tmp/ghc369_0/ghc_121.c:12:144: error:
     warning: pointer targets in passing argument 1 of ‘RAND_bytes’ differ in signedness [-Wpointer-sign]
       12 | HsInt32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes(char* a1, HsInt32 a2) {return RAND_bytes(a1, a2);}
          |                                                                                                                                                ^~
          |                                                                                                                                                |
          |                                                                                                                                                char *
   |
12 | HsInt32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziRandomZCRANDzubytes(char* a1, HsInt32 a2) {return RAND_bytes(a1, a2);}
   |                                                                                                                                                ^
/usr/include/openssl/rand.h:61:31: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       61 | int RAND_bytes(unsigned char *buf, int num);
          |                ~~~~~~~~~~~~~~~^~~
   |
61 | int RAND_bytes(unsigned char *buf, int num);
   |                               ^
[10 of 33] Compiling OpenSSL.EVP.Internal
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal’:
/tmp/ghc369_0/ghc_128.c:15:1: error:
     warning: ‘HMAC_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          | ^~~~~~~~
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   | ^
In file included from /tmp/ghc369_0/ghc_128.c:13:0: error: 
/usr/include/openssl/hmac.h:47:27: error:
     note: declared here
       47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
          |                           ^~~~~~~~~~
   |
47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
   |                           ^
/tmp/ghc369_0/ghc_128.c:15:167: error:
     warning: pointer targets in passing argument 2 of ‘HMAC_Final’ differ in signedness [-Wpointer-sign]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          |                                                                                                                                                                       ^~
          |                                                                                                                                                                       |
          |                                                                                                                                                                       char *
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   |                                                                                                                                                                       ^
/usr/include/openssl/hmac.h:47:68: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
          |                                                     ~~~~~~~~~~~~~~~^~
   |
47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
   |                                                                    ^
/tmp/ghc369_0/ghc_128.c:15:171: error:
     warning: pointer targets in passing argument 3 of ‘HMAC_Final’ differ in signedness [-Wpointer-sign]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          |                                                                                                                                                                           ^~
          |                                                                                                                                                                           |
          |                                                                                                                                                                           int *
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   |                                                                                                                                                                           ^
/usr/include/openssl/hmac.h:48:52: error:
     note: expected ‘unsigned int *’ but argument is of type ‘int *’
       48 |                                      unsigned int *len);
          |                                      ~~~~~~~~~~~~~~^~~
   |
48 |                                      unsigned int *len);
   |                                                    ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate’:
/tmp/ghc369_0/ghc_128.c:18:1: error:
     warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
       18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
          | ^~~~~~~
   |
18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
   | ^
/usr/include/openssl/hmac.h:45:27: error:
     note: declared here
       45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
          |                           ^~~~~~~~~~~
   |
45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
   |                           ^
/tmp/ghc369_0/ghc_128.c:18:171: error:
     warning: pointer targets in passing argument 2 of ‘HMAC_Update’ differ in signedness [-Wpointer-sign]
       18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
          |                                                                                                                                                                           ^~
          |                                                                                                                                                                           |
          |                                                                                                                                                                           char *
   |
18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
   |                                                                                                                                                                           ^
/usr/include/openssl/hmac.h:45:75: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
       45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
          |                                                      ~~~~~~~~~~~~~~~~~~~~~^~~~
   |
45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
   |                                                                           ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit’:
/tmp/ghc369_0/ghc_128.c:22:1: error:
     warning: ‘HMAC_Init’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
       22 | HsInt32 ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit(HMAC_CTX* a1, void* a2, HsInt32 a3, EVP_MD* a4) {return HMAC_Init(a1, a2, a3, a4);}
          | ^~~~~~~
   |
22 | HsInt32 ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit(HMAC_CTX* a1, void* a2, HsInt32 a3, EVP_MD* a4) {return HMAC_Init(a1, a2, a3, a4);}
   | ^
/usr/include/openssl/hmac.h:38:36: error:
     note: declared here
       38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx,
          |                                    ^~~~~~~~~
   |
38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx,
   |                                    ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal’:
/tmp/ghc369_0/ghc_128.c:28:187: error:
     warning: pointer targets in passing argument 2 of ‘EVP_DigestFinal’ differ in signedness [-Wpointer-sign]
       28 | HsInt32 ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal(EVP_MD_CTX* a1, char* a2, unsigned int* a3) {return EVP_DigestFinal(a1, a2, a3);}
          |                                                                                                                                                                                           ^~
          |                                                                                                                                                                                           |
          |                                                                                                                                                                                           char *
   |
28 | HsInt32 ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal(EVP_MD_CTX* a1, char* a2, unsigned int* a3) {return EVP_DigestFinal(a1, a2, a3);}
   |                                                                                                                                                                                           ^
In file included from /tmp/ghc369_0/ghc_128.c:7:0: error: 
/usr/include/openssl/evp.h:730:60: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      730 | __owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
          |                                             ~~~~~~~~~~~~~~~^~
    |
730 | __owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
    |                                                            ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal’:
/tmp/ghc369_0/ghc_128.c:43:183: error:
     warning: pointer targets in passing argument 2 of ‘EVP_CipherFinal’ differ in signedness [-Wpointer-sign]
       43 | HsInt32 ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal(EVP_CIPHER_CTX* a1, char* a2, int* a3) {return EVP_CipherFinal(a1, a2, a3);}
          |                                                                                                                                                                                       ^~
          |                                                                                                                                                                                       |
          |                                                                                                                                                                                       char *
   |
43 | HsInt32 ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal(EVP_CIPHER_CTX* a1, char* a2, int* a3) {return EVP_CipherFinal(a1, a2, a3);}
   |                                                                                                                                                                                       ^
/usr/include/openssl/evp.h:806:64: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      806 | __owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
          |                                                 ~~~~~~~~~~~~~~~^~~~
    |
806 | __owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
    |                                                                ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate’:
/tmp/ghc369_0/ghc_128.c:46:207: error:
     warning: pointer targets in passing argument 2 of ‘EVP_CipherUpdate’ differ in signedness [-Wpointer-sign]
       46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                               ^~
          |                                                                                                                                                                                                               |
          |                                                                                                                                                                                                               char *
   |
46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                               ^
/usr/include/openssl/evp.h:804:65: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      804 | __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
          |                                                  ~~~~~~~~~~~~~~~^~~
    |
804 | __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
    |                                                                 ^
/tmp/ghc369_0/ghc_128.c:46:215: error:
     warning: pointer targets in passing argument 4 of ‘EVP_CipherUpdate’ differ in signedness [-Wpointer-sign]
       46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                       ^~
          |                                                                                                                                                                                                                       |
          |                                                                                                                                                                                                                       char *
   |
46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                       ^
/usr/include/openssl/evp.h:805:61: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      805 |                             int *outl, const unsigned char *in, int inl);
          |                                        ~~~~~~~~~~~~~~~~~~~~~^~
    |
805 |                             int *outl, const unsigned char *in, int inl);
    |                                                             ^
/tmp/ghc369_0/ghc_128.c: In function ‘ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit’:
/tmp/ghc369_0/ghc_128.c:49:214: error:
     warning: pointer targets in passing argument 3 of ‘EVP_CipherInit’ differ in signedness [-Wpointer-sign]
       49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                      ^~
          |                                                                                                                                                                                                                      |
          |                                                                                                                                                                                                                      char *
   |
49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                      ^
/usr/include/openssl/evp.h:795:48: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      795 |                           const unsigned char *key, const unsigned char *iv,
          |                           ~~~~~~~~~~~~~~~~~~~~~^~~
    |
795 |                           const unsigned char *key, const unsigned char *iv,
    |                                                ^
/tmp/ghc369_0/ghc_128.c:49:218: error:
     warning: pointer targets in passing argument 4 of ‘EVP_CipherInit’ differ in signedness [-Wpointer-sign]
       49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                          ^~
          |                                                                                                                                                                                                                          |
          |                                                                                                                                                                                                                          char *
   |
49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                          ^
/usr/include/openssl/evp.h:795:74: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      795 |                           const unsigned char *key, const unsigned char *iv,
          |                                                     ~~~~~~~~~~~~~~~~~~~~~^~
    |
795 |                           const unsigned char *key, const unsigned char *iv,
    |                                                                          ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal’:
/tmp/ghc369_0/ghc_135.c:15:1: error:
     warning: ‘HMAC_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          | ^~~~~~~~
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   | ^
In file included from /tmp/ghc369_0/ghc_135.c:13:0: error: 
/usr/include/openssl/hmac.h:47:27: error:
     note: declared here
       47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
          |                           ^~~~~~~~~~
   |
47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
   |                           ^
/tmp/ghc369_0/ghc_135.c:15:167: error:
     warning: pointer targets in passing argument 2 of ‘HMAC_Final’ differ in signedness [-Wpointer-sign]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          |                                                                                                                                                                       ^~
          |                                                                                                                                                                       |
          |                                                                                                                                                                       char *
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   |                                                                                                                                                                       ^
/usr/include/openssl/hmac.h:47:68: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
       47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
          |                                                     ~~~~~~~~~~~~~~~^~
   |
47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
   |                                                                    ^
/tmp/ghc369_0/ghc_135.c:15:171: error:
     warning: pointer targets in passing argument 3 of ‘HMAC_Final’ differ in signedness [-Wpointer-sign]
       15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
          |                                                                                                                                                                           ^~
          |                                                                                                                                                                           |
          |                                                                                                                                                                           int *
   |
15 | HsWord32 ghczuwrapperZC2ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuFinal(HMAC_CTX* a1, char* a2, int* a3) {return HMAC_Final(a1, a2, a3);}
   |                                                                                                                                                                           ^
/usr/include/openssl/hmac.h:48:52: error:
     note: expected ‘unsigned int *’ but argument is of type ‘int *’
       48 |                                      unsigned int *len);
          |                                      ~~~~~~~~~~~~~~^~~
   |
48 |                                      unsigned int *len);
   |                                                    ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate’:
/tmp/ghc369_0/ghc_135.c:18:1: error:
     warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
       18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
          | ^~~~~~~
   |
18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
   | ^
/usr/include/openssl/hmac.h:45:27: error:
     note: declared here
       45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
          |                           ^~~~~~~~~~~
   |
45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
   |                           ^
/tmp/ghc369_0/ghc_135.c:18:171: error:
     warning: pointer targets in passing argument 2 of ‘HMAC_Update’ differ in signedness [-Wpointer-sign]
       18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
          |                                                                                                                                                                           ^~
          |                                                                                                                                                                           |
          |                                                                                                                                                                           char *
   |
18 | HsInt32 ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuUpdate(HMAC_CTX* a1, char* a2, HsInt32 a3) {return HMAC_Update(a1, a2, a3);}
   |                                                                                                                                                                           ^
/usr/include/openssl/hmac.h:45:75: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
       45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
          |                                                      ~~~~~~~~~~~~~~~~~~~~~^~~~
   |
45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
   |                                                                           ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit’:
/tmp/ghc369_0/ghc_135.c:22:1: error:
     warning: ‘HMAC_Init’ is deprecated: Since OpenSSL 1.1.0 [-Wdeprecated-declarations]
       22 | HsInt32 ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit(HMAC_CTX* a1, void* a2, HsInt32 a3, EVP_MD* a4) {return HMAC_Init(a1, a2, a3, a4);}
          | ^~~~~~~
   |
22 | HsInt32 ghczuwrapperZC4ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCHMACzuInit(HMAC_CTX* a1, void* a2, HsInt32 a3, EVP_MD* a4) {return HMAC_Init(a1, a2, a3, a4);}
   | ^
/usr/include/openssl/hmac.h:38:36: error:
     note: declared here
       38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx,
          |                                    ^~~~~~~~~
   |
38 | OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx,
   |                                    ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal’:
/tmp/ghc369_0/ghc_135.c:28:187: error:
     warning: pointer targets in passing argument 2 of ‘EVP_DigestFinal’ differ in signedness [-Wpointer-sign]
       28 | HsInt32 ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal(EVP_MD_CTX* a1, char* a2, unsigned int* a3) {return EVP_DigestFinal(a1, a2, a3);}
          |                                                                                                                                                                                           ^~
          |                                                                                                                                                                                           |
          |                                                                                                                                                                                           char *
   |
28 | HsInt32 ghczuwrapperZC6ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuDigestFinal(EVP_MD_CTX* a1, char* a2, unsigned int* a3) {return EVP_DigestFinal(a1, a2, a3);}
   |                                                                                                                                                                                           ^
In file included from /tmp/ghc369_0/ghc_135.c:7:0: error: 
/usr/include/openssl/evp.h:730:60: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      730 | __owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
          |                                             ~~~~~~~~~~~~~~~^~
    |
730 | __owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
    |                                                            ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal’:
/tmp/ghc369_0/ghc_135.c:43:183: error:
     warning: pointer targets in passing argument 2 of ‘EVP_CipherFinal’ differ in signedness [-Wpointer-sign]
       43 | HsInt32 ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal(EVP_CIPHER_CTX* a1, char* a2, int* a3) {return EVP_CipherFinal(a1, a2, a3);}
          |                                                                                                                                                                                       ^~
          |                                                                                                                                                                                       |
          |                                                                                                                                                                                       char *
   |
43 | HsInt32 ghczuwrapperZC11ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherFinal(EVP_CIPHER_CTX* a1, char* a2, int* a3) {return EVP_CipherFinal(a1, a2, a3);}
   |                                                                                                                                                                                       ^
/usr/include/openssl/evp.h:806:64: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      806 | __owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
          |                                                 ~~~~~~~~~~~~~~~^~~~
    |
806 | __owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
    |                                                                ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate’:
/tmp/ghc369_0/ghc_135.c:46:207: error:
     warning: pointer targets in passing argument 2 of ‘EVP_CipherUpdate’ differ in signedness [-Wpointer-sign]
       46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                               ^~
          |                                                                                                                                                                                                               |
          |                                                                                                                                                                                                               char *
   |
46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                               ^
/usr/include/openssl/evp.h:804:65: error:
     note: expected ‘unsigned char *’ but argument is of type ‘char *’
      804 | __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
          |                                                  ~~~~~~~~~~~~~~~^~~
    |
804 | __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
    |                                                                 ^
/tmp/ghc369_0/ghc_135.c:46:215: error:
     warning: pointer targets in passing argument 4 of ‘EVP_CipherUpdate’ differ in signedness [-Wpointer-sign]
       46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                       ^~
          |                                                                                                                                                                                                                       |
          |                                                                                                                                                                                                                       char *
   |
46 | HsInt32 ghczuwrapperZC12ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherUpdate(EVP_CIPHER_CTX* a1, char* a2, int* a3, char* a4, HsInt32 a5) {return EVP_CipherUpdate(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                       ^
/usr/include/openssl/evp.h:805:61: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      805 |                             int *outl, const unsigned char *in, int inl);
          |                                        ~~~~~~~~~~~~~~~~~~~~~^~
    |
805 |                             int *outl, const unsigned char *in, int inl);
    |                                                             ^
/tmp/ghc369_0/ghc_135.c: In function ‘ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit’:
/tmp/ghc369_0/ghc_135.c:49:214: error:
     warning: pointer targets in passing argument 3 of ‘EVP_CipherInit’ differ in signedness [-Wpointer-sign]
       49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                      ^~
          |                                                                                                                                                                                                                      |
          |                                                                                                                                                                                                                      char *
   |
49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                      ^
/usr/include/openssl/evp.h:795:48: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      795 |                           const unsigned char *key, const unsigned char *iv,
          |                           ~~~~~~~~~~~~~~~~~~~~~^~~
    |
795 |                           const unsigned char *key, const unsigned char *iv,
    |                                                ^
/tmp/ghc369_0/ghc_135.c:49:218: error:
     warning: pointer targets in passing argument 4 of ‘EVP_CipherInit’ differ in signedness [-Wpointer-sign]
       49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                                          ^~
          |                                                                                                                                                                                                                          |
          |                                                                                                                                                                                                                          char *
   |
49 | HsInt32 ghczuwrapperZC13ZCHsOpenSSLzm0zi11zi7zi6zmBaTULfJPv8J141eSExDUQNZCOpenSSLziEVPziInternalZCEVPzuCipherInit(EVP_CIPHER_CTX* a1, EVP_CIPHER* a2, char* a3, char* a4, HsInt32 a5) {return EVP_CipherInit(a1, a2, a3, a4, a5);}
   |                                                                                                                                                                                                                          ^
/usr/include/openssl/evp.h:795:74: error:
     note: expected ‘const unsigned char *’ but argument is of type ‘char *’
      795 |                           const unsigned char *key, const unsigned char *iv,
          |                                                     ~~~~~~~~~~~~~~~~~~~~~^~
    |
795 |                           const unsigned char *key, const unsigned char *iv,
    |                                                                          ^
:
:
@jwaldmann
Copy link

jwaldmann commented Apr 21, 2024

(I am also seeing this error on Debian 12.5)

I can build like this (and tests pass)

$ cabal test  --ghc-options="-optc=-Wno-deprecated-declarations" --ghc-options="-optc=-Wno-incompatible-pointer-types"

This will still print lots of

/tmp/ghc119412_0/ghc_190.c:35:104: error:
     warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

but apparently it decides for "warning" (not "error")

@juhp
Copy link
Author

juhp commented May 6, 2024

Thanks @jwaldmann : at least for Fedora 40, just -Wno-incompatible-pointer-types
seems sufficient for the build to succeed.

@istathar
Copy link

Does this mean we're going to have to add

ghc-options:
  HsOpenSSL: -optc=-Wno-incompatible-pointer-types

to every project that transitively depends on HsOpenSSL?

@jwaldmann
Copy link

jwaldmann commented May 15, 2024

I have no knowledge of internals, but I was looking at the error message and types:

In file included from /tmp/ghc1577599_0/ghc_26.c:21:0: error: 

cbits/HsOpenSSL.h:108:39: error:
     note: expected ‘const BIGNUM **’ {aka ‘const struct bignum_st **’} but argument is of type ‘BIGNUM **’ {aka ‘struct bignum_st **’}
      108 |                        const BIGNUM **r, const BIGNUM **s);
          |                        ~~~~~~~~~~~~~~~^
    |
108 |                        const BIGNUM **r, const BIGNUM **s);
    |                                       ^

/tmp/ghc1577599_0/ghc_26.c:32:195: error:
     error: passing argument 5 of ‘HsOpenSSL_dsa_sign’ from incompatible pointer type [-Wincompatible-pointer-types]
       32 | HsInt32 ghczuwrapperZC9ZCHsOpenSSLzm0zi11zi7zi6zminplaceZCOpenSSLziDSAZCHsOpenSSLzudsazusign(void* a1, char* a2, HsInt32 a3, BIGNUM** a4, BIGNUM** a5) {return HsOpenSSL_dsa_sign(a1, a2, a3, a4, a5);}
          |                                                                                                                                                                                                   ^~
          |                                                                                                                                                                                                   

the temporary C file contains

HsInt32 ghczuwrapperZC9ZCHsOpenSSLzm0zi11zi7zi6zminplaceZCOpenSSLziDSAZCHsOpenSSLzudsazusign(void* a1, char* a2, HsInt32 a3, BIGNUM** a4, BIGNUM** a5) {return HsOpenSSL_dsa_sign(a1, a2, a3, a4, a5);}

while in cbits/HsOpenSSL.h, we have

int HsOpenSSL_dsa_sign(DSA *dsa, const unsigned char *ddata, int len,
                       const BIGNUM **r, const BIGNUM **s);

It seems the const have gone missing in the transformation.

This transform is done by hsc2hs? Probably from OpenSSL/DSA.hsc which contains

foreign import capi unsafe "HsOpenSSL.h HsOpenSSL_dsa_sign"
        _dsa_sign :: Ptr DSA -> CString -> CInt -> Ptr (Ptr BIGNUM) -> Ptr (Ptr BIGNUM) -> IO CInt

There is no const?

Apparently, this could be solved with ConstPtr, see https://gitlab.haskell.org/ghc/ghc/-/issues/22043

@Kleidukos
Copy link
Member

Yeah, CApiFFI needs https://hackage.haskell.org/package/base-4.19.1.0/docs/Foreign-C-ConstPtr.html but you may stumble upon https://gitlab.haskell.org/ghc/ghc/-/issues/24814, although the chances for this problem to happen are not very high.

@jwaldmann
Copy link

Something like this might work


$ diff -r HsOpenSSL-0.11.7.6/OpenSSL/DSA.hsc my-HsOpenSSL-0.11.7.6/OpenSSL/DSA.hsc
37a38
> import Foreign.C.ConstPtr
135c136
<         _dsa_sign :: Ptr DSA -> CString -> CInt -> Ptr (Ptr BIGNUM) -> Ptr (Ptr BIGNUM) -> IO CInt
---
>         _dsa_sign :: Ptr DSA -> CString -> CInt -> Ptr (ConstPtr BIGNUM) -> Ptr (ConstPtr BIGNUM) -> IO CInt
138c139
<         _dsa_verify :: Ptr DSA -> CString -> CInt -> Ptr BIGNUM -> Ptr BIGNUM -> IO CInt
---
>         _dsa_verify :: Ptr DSA -> CString -> CInt -> ConstPtr BIGNUM -> ConstPtr BIGNUM -> IO CInt
353,356c354,357
<           r <- peek rptr >>= peekBN . wrapBN
<           peek rptr >>= _bn_free
<           s <- peek sptr >>= peekBN . wrapBN
<           peek sptr >>= _bn_free
---
>           r <- peek rptr >>= peekBN . wrapBN . unConstPtr
>           peek rptr >>= _bn_free . unConstPtr
>           s <- peek sptr >>= peekBN . wrapBN . unConstPtr
>           peek sptr >>= _bn_free . unConstPtr
367c368
<                (_dsa_verify dsaptr ptr (fromIntegral len) (unwrapBN bnR) (unwrapBN bnS))))))
---
>                (_dsa_verify dsaptr ptr (fromIntegral len) (ConstPtr $ unwrapBN bnR) (ConstPtr $ unwrapBN bnS))))))

but I don't have the resources to continue this (now)

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