Closed lePereT closed 1 month ago
Hi. Just noticed that nixio fails to build with openssl 3.0 due to deprecated functions.
sudo luarocks-5.1 make mkdir -p dist/usr/local/share/lua/5.1 cp -pR lua/* dist/usr/local/share/lua/5.1 2>/dev/null || true for i in $(find dist -name .svn); do rm -rf $i || true; done gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/address.o src/address.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/poll.o src/poll.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/io.o src/io.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/file.o src/file.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/splice.o src/splice.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/process.o src/process.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/syslog.o src/syslog.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/bit.o src/bit.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/binary.o src/binary.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/fs.o src/fs.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/user.o src/user.c gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/usr/include -fPIC -c -o src/tls-crypto.o src/tls-crypto.c src/tls-crypto.c: In function 'nixio_crypto_hash__init': src/tls-crypto.c:38:17: error: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 38 | MD5_Init((MD5_CTX*)hash->ctx); | ^~~~~~~~ In file included from src/nixio-tls.h:9, from src/tls-crypto.c:19: /usr/include/openssl/md5.h:49:27: note: declared here 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); | ^~~~~~~~ src/tls-crypto.c:39:17: error: 'MD5_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 39 | hash->init = (nixio_hash_initcb)MD5_Init; | ^~~~ /usr/include/openssl/md5.h:49:27: note: declared here 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); | ^~~~~~~~ src/tls-crypto.c:40:17: error: 'MD5_Update' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 40 | hash->update = (nixio_hash_updatecb)MD5_Update; | ^~~~ /usr/include/openssl/md5.h:50:27: note: declared here 50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len); | ^~~~~~~~~~ src/tls-crypto.c:41:17: error: 'MD5_Final' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 41 | hash->final = (nixio_hash_finalcb)MD5_Final; | ^~~~ /usr/include/openssl/md5.h:51:27: note: declared here 51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c); | ^~~~~~~~~ src/tls-crypto.c:50:17: error: 'SHA1_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 50 | SHA1_Init((SHA_CTX*)hash->ctx); | ^~~~~~~~~ In file included from /usr/include/openssl/x509.h:41, from /usr/include/openssl/ssl.h:31, from src/nixio-tls.h:8: /usr/include/openssl/sha.h:49:27: note: declared here 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); | ^~~~~~~~~ src/tls-crypto.c:51:17: error: 'SHA1_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 51 | hash->init = (nixio_hash_initcb)SHA1_Init; | ^~~~ /usr/include/openssl/sha.h:49:27: note: declared here 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); | ^~~~~~~~~ src/tls-crypto.c:52:17: error: 'SHA1_Update' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 52 | hash->update = (nixio_hash_updatecb)SHA1_Update; | ^~~~ /usr/include/openssl/sha.h:50:27: note: declared here 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); | ^~~~~~~~~~~ src/tls-crypto.c:53:17: error: 'SHA1_Final' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] 53 | hash->final = (nixio_hash_finalcb)SHA1_Final; | ^~~~ /usr/include/openssl/sha.h:51:27: note: declared here 51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); | ^~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:72: src/tls-crypto.o] Error 1 Error: Build error: Failed building.
Fix in release 0.4: luarocks install Neopallium/nixio
luarocks install Neopallium/nixio
Hi. Just noticed that nixio fails to build with openssl 3.0 due to deprecated functions.