wahern / luaossl

Most comprehensive OpenSSL module in the Lua universe.
http://25thandclement.com/~william/projects/luaossl.html
Other
140 stars 49 forks source link

Failed compiling object src/openssl.o on Rocky Linux 8.7 x86_64 #215

Closed 4mig4 closed 8 months ago

4mig4 commented 8 months ago

luaossl compilation fails on a Rocky Linux 8.7 x86_64

Linux testbed.local 4.18.0-425.10.1.el8_7.x86_64 #1 SMP Thu Jan 12 16:32:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

gcc -O2 -fPIC -I/test/.luaver/lua/5.4.6/include -c src/openssl.c -o src/openssl.o -D_REENTRANT -D_THREAD_SAFE -DCOMPAT53_PREFIX=luaossl -D_GNU_SOURCE -I/usr/include -I/usr/include
src/openssl.c:2304:3: error: conflicting types for ‘EVP_KDF_CTX’
 } EVP_KDF_CTX;
   ^~~~~~~~~~~
In file included from /usr/include/openssl/err.h:20,
                 from src/openssl.c:68:
/usr/include/openssl/ossl_typ.h:100:31: note: previous declaration of ‘EVP_KDF_CTX’ was here
 typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
                               ^~~~~~~~~~~
src/openssl.c:2306:13: error: conflicting types for ‘EVP_KDF_CTX_free’
 static void EVP_KDF_CTX_free(EVP_KDF_CTX *kctx) {
             ^~~~~~~~~~~~~~~~
In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:29:6: note: previous declaration of ‘EVP_KDF_CTX_free’ was here
 void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx);
      ^~~~~~~~~~~~~~~~
src/openssl.c:2427: warning: "EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND" redefined
 #define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND

In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:65: note: this is the location of the previous definition
 # define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND  0

src/openssl.c:2433: warning: "EVP_KDF_HKDF_MODE_EXTRACT_ONLY" redefined
 #define EVP_KDF_HKDF_MODE_EXTRACT_ONLY EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY

In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:66: note: this is the location of the previous definition
 # define EVP_KDF_HKDF_MODE_EXTRACT_ONLY        1

src/openssl.c:2437: warning: "EVP_KDF_HKDF_MODE_EXPAND_ONLY" redefined
 #define EVP_KDF_HKDF_MODE_EXPAND_ONLY EVP_PKEY_HKDEF_MODE_EXPAND_ONLY

In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:67: note: this is the location of the previous definition
 # define EVP_KDF_HKDF_MODE_EXPAND_ONLY         2

src/openssl.c:2440:12: error: conflicting types for ‘EVP_KDF_vctrl’
 static int EVP_KDF_vctrl(EVP_KDF_CTX *kctx, int cmd, va_list args) {
            ^~~~~~~~~~~~~
In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:33:5: note: previous declaration of ‘EVP_KDF_vctrl’ was here
 int EVP_KDF_vctrl(EVP_KDF_CTX *ctx, int cmd, va_list args);
     ^~~~~~~~~~~~~
src/openssl.c:2605:12: error: conflicting types for ‘EVP_KDF_ctrl’
 static int EVP_KDF_ctrl(EVP_KDF_CTX *kctx, int cmd, ...) {
            ^~~~~~~~~~~~
In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:32:5: note: previous declaration of ‘EVP_KDF_ctrl’ was here
 int EVP_KDF_ctrl(EVP_KDF_CTX *ctx, int cmd, ...);
     ^~~~~~~~~~~~
src/openssl.c:2634:12: error: conflicting types for ‘EVP_KDF_derive’
 static int EVP_KDF_derive(EVP_KDF_CTX *kctx, unsigned char *out, size_t outlen, void *params) {
            ^~~~~~~~~~~~~~
In file included from src/openssl.c:619:
/usr/include/openssl/kdf.h:36:5: note: previous declaration of ‘EVP_KDF_derive’ was here
 int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen);
     ^~~~~~~~~~~~~~
src/openssl.c: In function ‘kdf_derive’:
src/openssl.c:2427:46: error: ‘EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND’ undeclared (first use in this function)
 #define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:12291:5: note: in expansion of macro ‘EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND’
     EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:2427:46: note: each undeclared identifier is reported only once for each function it appears in
 #define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:12291:5: note: in expansion of macro ‘EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND’
     EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:2433:40: error: ‘EVP_KDF_HKDF_MODE_EXTRACT_ONLY’ undeclared (first use in this function)
 #define EVP_KDF_HKDF_MODE_EXTRACT_ONLY EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:12294:5: note: in expansion of macro ‘EVP_KDF_HKDF_MODE_EXTRACT_ONLY’
     EVP_KDF_HKDF_MODE_EXTRACT_ONLY,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:2437:39: error: ‘EVP_KDF_HKDF_MODE_EXPAND_ONLY’ undeclared (first use in this function)
 #define EVP_KDF_HKDF_MODE_EXPAND_ONLY EVP_PKEY_HKDEF_MODE_EXPAND_ONLY
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/openssl.c:12297:5: note: in expansion of macro ‘EVP_KDF_HKDF_MODE_EXPAND_ONLY’
     EVP_KDF_HKDF_MODE_EXPAND_ONLY,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: Build error: Failed compiling object src/openssl.o
daurnimator commented 8 months ago

I think this is a duplicate of https://github.com/wahern/luaossl/issues/175