GNU bug report logs - #63202
git-gcrypt 0.7.0 build fails with OpenSSL 3.0

Previous Next

Package: guix;

Reported by: Giovanni Biscuolo <g <at> xelera.eu>

Date: Mon, 1 May 2023 12:42:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63202 in the body.
You can then email your comments to 63202 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#63202; Package guix. (Mon, 01 May 2023 12:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giovanni Biscuolo <g <at> xelera.eu>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 01 May 2023 12:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: bug-guix <at> gnu.org
Subject: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
Date: Mon, 01 May 2023 14:41:15 +0200
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63202; Package guix. (Mon, 01 May 2023 13:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 63202 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: 63202 <at> debbugs.gnu.org
Subject: bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
Date: Mon, 01 May 2023 15:10:39 +0200
[Message part 1 (text/plain, inline)]
Giovanni Biscuolo <g <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63202; Package guix. (Mon, 01 May 2023 16:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 63202 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: 63202 <at> debbugs.gnu.org
Subject: [PATCH] gnu: git-crypt: Fix build
Date: Mon, 01 May 2023 18:57:08 +0200
[Message part 1 (text/plain, inline)]
Hello,

[0001-gnu-git-crypt-Fix-build.patch (text/x-diff, inline)]
From 09aab815c7b0afddc020fb47e6beca524ea4e886 Mon Sep 17 00:00:00 2001
Message-Id: <09aab815c7b0afddc020fb47e6beca524ea4e886.1682959973.git.g <at> xelera.eu>
From: Giovanni Biscuolo <g <at> 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

[Message part 3 (text/plain, inline)]
Happy hacking!

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63202; Package guix. (Mon, 01 May 2023 21:38:01 GMT) Full text and rfc822 format available.

Message #14 received at 63202 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: 63202 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: git-crypt: Fix build
Date: Mon, 01 May 2023 23:37:10 +0200
Hello,

this bug is also fixed by Sergey Trofimov in bug#63209

Thanks, Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 08 May 2023 10:30:02 GMT) Full text and rfc822 format available.

Notification sent to Giovanni Biscuolo <g <at> xelera.eu>:
bug acknowledged by developer. (Mon, 08 May 2023 10:30:02 GMT) Full text and rfc822 format available.

Message #19 received at 63202-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Giovanni Biscuolo <g <at> xelera.eu>
Cc: 63202-done <at> debbugs.gnu.org
Subject: Re: bug#63202: git-gcrypt 0.7.0 build fails with OpenSSL 3.0
Date: Mon, 08 May 2023 12:29:19 +0200
Hi Giovanni,

Giovanni Biscuolo <g <at> xelera.eu> skribis:

> Hello,
>
> this bug is also fixed by Sergey Trofimov in bug#63209

Indeed, and pushed as 71a438dcba391022fbbc41a1703f3172bae9c63c.

Closing, thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 Jun 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 325 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.