* bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
@ 2023-05-01 12:41 Giovanni Biscuolo
2023-05-01 13:10 ` Giovanni Biscuolo
0 siblings, 1 reply; 5+ messages in thread
From: Giovanni Biscuolo @ 2023-05-01 12:41 UTC (permalink / raw)
To: 63202
[-- Attachment #1: Type: text/plain, Size: 3604 bytes --]
Hello,
git-crypt 0.7.0 is failing to build with OpenSSL 3.0
--8<---------------cut here---------------start------------->8---
g++ -Wall -pedantic -Wno-long-long -O2 -std=c++11 -c -o crypto-openssl-10.o crypto-openssl-10.cpp
crypto-openssl-10.cpp: In constructor ‘Aes_ecb_encryptor::Aes_ecb_encryptor(const unsigned char*)’:
crypto-openssl-10.cpp:59:32: warning: ‘int AES_set_encrypt_key(const unsigned char*, int, AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
59 | if (AES_set_encrypt_key(raw_key, KEY_LEN * 8, &(impl->key)) != 0) {
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from crypto-openssl-10.cpp:38:
/gnu/store/69wd3pd1hd3j84xr965jj2fk2qmxn0hl-openssl-3.0.8/include/openssl/aes.h:51:5: note: declared here
51 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
| ^~~~~~~~~~~~~~~~~~~
crypto-openssl-10.cpp: In member function ‘void Aes_ecb_encryptor::encrypt(const unsigned char*, unsigned char*)’:
crypto-openssl-10.cpp:74:20: warning: ‘void AES_encrypt(const unsigned char*, unsigned char*, const AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declaratio
ns]
74 | AES_encrypt(plain, cipher, &(impl->key));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from crypto-openssl-10.cpp:38:
/gnu/store/69wd3pd1hd3j84xr965jj2fk2qmxn0hl-openssl-3.0.8/include/openssl/aes.h:57:6: note: declared here
57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
| ^~~~~~~~~~~
crypto-openssl-10.cpp: At global scope:
crypto-openssl-10.cpp:78:18: error: field ‘ctx’ has incomplete type ‘HMAC_CTX’ {aka ‘hmac_ctx_st’}
78 | HMAC_CTX ctx;
| ^~~
In file included from /gnu/store/69wd3pd1hd3j84xr965jj2fk2qmxn0hl-openssl-3.0.8/include/openssl/evp.h:26,
from /gnu/store/69wd3pd1hd3j84xr965jj2fk2qmxn0hl-openssl-3.0.8/include/openssl/hmac.h:21,
from crypto-openssl-10.cpp:40:
/gnu/store/69wd3pd1hd3j84xr965jj2fk2qmxn0hl-openssl-3.0.8/include/openssl/types.h:132:16: note: forward declaration of ‘HMAC_CTX’ {aka ‘struct hmac_ctx_st’}
132 | typedef struct hmac_ctx_st HMAC_CTX;
| ^~~~~~~~~~~
crypto-openssl-10.cpp: In destructor ‘Hmac_sha1_state::~Hmac_sha1_state()’:
crypto-openssl-10.cpp:92:9: error: ‘HMAC_cleanup’ was not declared in this scope; did you mean ‘EVP_cleanup’?
92 | HMAC_cleanup(&(impl->ctx));
| ^~~~~~~~~~~~
| EVP_cleanup
make: *** [<builtin>: crypto-openssl-10.o] Error 1
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("ENABLE_MAN=yes") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 9.4 seconds
command "make" "ENABLE_MAN=yes" failed with status 2
note: keeping build directory `/tmp/guix-build-git-crypt-0.7.0.drv-0'
builder for `/gnu/store/n16q81snhvc2ikws6pwsysdyxi3shbqp-git-crypt-0.7.0.drv' failed with exit code 1
build of /gnu/store/n16q81snhvc2ikws6pwsysdyxi3shbqp-git-crypt-0.7.0.drv failed
View build log at '/var/log/guix/drvs/n1/6q81snhvc2ikws6pwsysdyxi3shbqp-git-crypt-0.7.0.drv.gz'.
guix build: error: build of `/gnu/store/n16q81snhvc2ikws6pwsysdyxi3shbqp-git-crypt-0.7.0.drv' failed
--8<---------------cut here---------------end--------------->8---
I'm going to investigate if there's a solution.
Happy hacking! Gio'
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
2023-05-01 12:41 bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0 Giovanni Biscuolo
@ 2023-05-01 13:10 ` Giovanni Biscuolo
2023-05-01 16:57 ` bug#63202: [PATCH] gnu: git-crypt: Fix build Giovanni Biscuolo
0 siblings, 1 reply; 5+ messages in thread
From: Giovanni Biscuolo @ 2023-05-01 13:10 UTC (permalink / raw)
To: 63202
[-- Attachment #1: Type: text/plain, Size: 498 bytes --]
Giovanni Biscuolo <g@xelera.eu> writes:
> git-crypt 0.7.0 is failing to build with OpenSSL 3.0
[...]
> I'm going to investigate if there's a solution.
This is the upstream bug report:
https://github.com/AGWA/git-crypt/issues/232
(git-crypt fails to build with openssl 3.0.0)
The solution is to add this build flag:
CXXFLAGS='-DOPENSSL_API_COMPAT=0x30000000L'
I'll try and send a patch as soon as I succeed
HTH! Gio'
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#63202: [PATCH] gnu: git-crypt: Fix build
2023-05-01 13:10 ` Giovanni Biscuolo
@ 2023-05-01 16:57 ` Giovanni Biscuolo
2023-05-01 21:37 ` Giovanni Biscuolo
0 siblings, 1 reply; 5+ messages in thread
From: Giovanni Biscuolo @ 2023-05-01 16:57 UTC (permalink / raw)
To: 63202
[-- Attachment #1.1: Type: text/plain, Size: 8 bytes --]
Hello,
[-- Attachment #1.2: 0001-gnu-git-crypt-Fix-build.patch --]
[-- Type: text/x-diff, Size: 1343 bytes --]
From 09aab815c7b0afddc020fb47e6beca524ea4e886 Mon Sep 17 00:00:00 2001
Message-Id: <09aab815c7b0afddc020fb47e6beca524ea4e886.1682959973.git.g@xelera.eu>
From: Giovanni Biscuolo <g@xelera.eu>
Date: Mon, 1 May 2023 18:34:57 +0200
Subject: [PATCH] gnu: git-crypt: Fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Avoid this compilation warning:
warning: ‘int AES_set_encrypt_key(const unsigned char*, int, AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
Fixes bug#63202
* gnu/packages/version-control.scm: Add CXXFLAGS=-DOPENSSL_API_COMPAT=0x30000000L to build environment
---
gnu/packages/version-control.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c2ec490383..ba213bafa6 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -936,6 +936,7 @@ (define-public git-crypt
#t))
(replace 'build
(lambda _
+ (setenv "CXXFLAGS" "-DOPENSSL_API_COMPAT=0x30000000L")
(invoke "make" "ENABLE_MAN=yes")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
base-commit: 0c6a7e1045cbd06336ef3699734a803a2e4038e5
--
2.39.2
[-- Attachment #1.3: Type: text/plain, Size: 73 bytes --]
Happy hacking!
--
Giovanni Biscuolo
Xelera IT Infrastructures
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#63202: [PATCH] gnu: git-crypt: Fix build
2023-05-01 16:57 ` bug#63202: [PATCH] gnu: git-crypt: Fix build Giovanni Biscuolo
@ 2023-05-01 21:37 ` Giovanni Biscuolo
2023-05-08 10:29 ` bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0 Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Giovanni Biscuolo @ 2023-05-01 21:37 UTC (permalink / raw)
To: 63202
Hello,
this bug is also fixed by Sergey Trofimov in bug#63209
Thanks, Gio'
--
Giovanni Biscuolo
Xelera IT Infrastructures
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
2023-05-01 21:37 ` Giovanni Biscuolo
@ 2023-05-08 10:29 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-05-08 10:29 UTC (permalink / raw)
To: Giovanni Biscuolo; +Cc: 63202-done
Hi Giovanni,
Giovanni Biscuolo <g@xelera.eu> skribis:
> Hello,
>
> this bug is also fixed by Sergey Trofimov in bug#63209
Indeed, and pushed as 71a438dcba391022fbbc41a1703f3172bae9c63c.
Closing, thank you!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-08 10:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-01 12:41 bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0 Giovanni Biscuolo
2023-05-01 13:10 ` Giovanni Biscuolo
2023-05-01 16:57 ` bug#63202: [PATCH] gnu: git-crypt: Fix build Giovanni Biscuolo
2023-05-01 21:37 ` Giovanni Biscuolo
2023-05-08 10:29 ` bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0 Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).