php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81004 Make error gnupg.c line 1121
Submitted: 2021-04-30 16:04 UTC Modified: 2021-12-30 22:16 UTC
From: tkhrabsky at gmail dot com Assigned: bukka (profile)
Status: Closed Package: *General Issues
PHP Version: 7.3.28 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tkhrabsky at gmail dot com
New email:
PHP Version: OS:

 

 [2021-04-30 16:04 UTC] tkhrabsky at gmail dot com
Description:
------------
The pecl command to install GnuPG (gnupg-1.5.0) fails in the make statement,

Two errors state: 'struct _gpgme_subkey' has no member named 'curve'
in file: gnupg.c
  523:54
  1121:20

Test script:
---------------
config.status: executing libtool commands
running: make
/bin/sh /root/pear/temp/pear-build-rootVj2WjB/gnupg-1.5.0/libtool --mode=compile cc  -I. -I/root/pear/temp/gnupg -DPHP_ATOM_INC -I/root/pear/temp/pear-build-rootVj2WjB/gnupg-1.5.0/include -I/root/pear/temp/pear-build-rootVj2WjB/gnupg-1.5.0/main -I/root/pear/temp/gnupg -I/usr/include/php/7.3/php -I/usr/include/php/7.3/php/main -I/usr/include/php/7.3/php/TSRM -I/usr/include/php/7.3/php/Zend -I/usr/include/php/7.3/php/ext -I/usr/include/php/7.3/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/pear/temp/gnupg/gnupg.c -o gnupg.lo
libtool: compile:  cc -I. -I/root/pear/temp/gnupg -DPHP_ATOM_INC -I/root/pear/temp/pear-build-rootVj2WjB/gnupg-1.5.0/include -I/root/pear/temp/pear-build-rootVj2WjB/gnupg-1.5.0/main -I/root/pear/temp/gnupg -I/usr/include/php/7.3/php -I/usr/include/php/7.3/php/main -I/usr/include/php/7.3/php/TSRM -I/usr/include/php/7.3/php/Zend -I/usr/include/php/7.3/php/ext -I/usr/include/php/7.3/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/pear/temp/gnupg/gnupg.c  -fPIC -DPIC -o .libs/gnupg.o
/root/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_keyinfo':
/root/pear/temp/gnupg/gnupg.c:1121:20: error: 'struct _gpgme_subkey' has no member named 'curve'
    if (gpgme_subkey->curve) {
                    ^
In file included from /usr/include/php/7.3/php/main/php.h:37:0,
                 from /root/pear/temp/gnupg/gnupg.c:21:
/root/pear/temp/gnupg/gnupg.c:523:54: error: 'struct _gpgme_subkey' has no member named 'curve'
   PHPC_VAL_CAST_TO_PZVAL(_g_arr), #_g_name, _g_struct->_g_key)
                                                      ^
/usr/include/php/7.3/php/Zend/zend_API.h:404:96: note: in definition of macro 'add_assoc_string'
 #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
                                                                                                ^
/root/pear/temp/gnupg/gnupg.c:525:2: note: in expansion of macro 'PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX'
  PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX(_g_arr, _g_name, _g_struct, _g_name)
  ^
/root/pear/temp/gnupg/gnupg.c:1122:5: note: in expansion of macro 'PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR'
     PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR(subkey, curve, gpgme_subkey);
     ^
make: *** [gnupg.lo] Error 1
ERROR: `make' failed


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-30 16:09 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-04-30 16:09 UTC] cmb@php.net
Which version of libgpgme do you use?
 [2021-05-03 20:41 UTC] tkhrabsky at gmail dot com
-Status: Feedback +Status: Assigned
 [2021-05-03 20:41 UTC] tkhrabsky at gmail dot com
For context, this is on an AWS elastic beanstalk environment.
I do not see libgpgme, but there is gpgme 1.4.3
 [2021-05-04 10:39 UTC] cmb@php.net
-Assigned To: cmb +Assigned To: bukka
 [2021-05-04 10:39 UTC] cmb@php.net
Thanks!  struct _gpgme_subkey.curve is only available as of gpgme
1.5.0[1], but the extension is supposed to support gpgme ≥ 1.3.0.

Jakub, could you please have a look?

[1] <https://github.com/gpg/gpgme/commit/88f15336ec0eadde68ff2618349efb9006b8e801>
 [2021-05-08 20:49 UTC] bukka@php.net
This looks like a bug. I'm quite busy atm so it will take me few weeks to fix it. Try maybe the previous version as it should work with PHP 7.3 if you still use gpg v1. You can install it like

pecl install gnupg-1.4.0
 [2021-12-30 22:16 UTC] bukka@php.net
-Status: Assigned +Status: Closed -Package: gnupg +Package: *General Issues
 [2021-12-30 22:16 UTC] bukka@php.net
Fixed in https://github.com/php-gnupg/php-gnupg/commit/ea0ccc2c9b81cae3c5fc5608bf676b60d5afffd0 and will be available in version 1.5.1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 05:01:32 2024 UTC