Skip to contentSkip to conversation

package/php-gnupg: fix build with gcc 4.8

PATCH Applied Fabrice Fontaine 3 participants 3 messages Sep 24, 2021 – Oct 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/php-gnupg: fix build with gcc 4.8

Fix the following build failure with gcc 4.8 raised since bump of php-gnupg to version 1.5.0 in commit 20ecd9c94222ef20b7804084acefb472b8e5deaf and
https://github.com/bukka/phpc/commit/8b5b1e718fbb2ba57102d1e9d844938038df310c:

.libs/gnupg_keylistiterator.o: In function `_phpc_res_close':
gnupg_keylistiterator.c:(.text+0x2d4): multiple definition of `_phpc_res_close'

Fixes:
- http://autobuild.buildroot.org/results/d79/d79bc1b0f98d68eb8a7fe7d86af5ddcc75e42507/build-end.log

---
 ...0001-Remove-inlining-_phpc_res_close.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch
package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch new file +33 -0
new file mode 100644
index 0000000000..9b94cb7e4f
@@ -0,0 +1,33 @@
+From 887b0899d7e7423baec691255c2d8b56bb348ecd Mon Sep 17 00:00:00 2001
+From: Jakub Zelenka <[email protected]>
+Date: Sun, 14 Mar 2021 18:52:21 +0000
+Subject: [PATCH] Remove inlining _phpc_res_close
+
+[Retrieved from:
+https://github.com/bukka/phpc/commit/887b0899d7e7423baec691255c2d8b56bb348ecd]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ phpc.h | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/phpc/phpc.h b/phpc/phpc.h
+index dc5887e..9206105 100644
+--- a/phpc/phpc.h
++++ b/phpc/phpc.h
+@@ -945,16 +945,8 @@ typedef zend_resource * phpc_res_value_t;
+ 	zend_fetch_resource2(Z_RES_P(_pz_res), _res_type_name, _res_type_1, _res_type_2)
+ #define PHPC_RES_DELETE(_pz_res) \
+ 	zend_list_delete(Z_RES_P(_pz_res))
+-#if PHP_MAJOR_VERSION < 8
+ #define PHPC_RES_CLOSE(_pz_res) \
+ 	zend_list_close(Z_RES_P(_pz_res))
+-#else
+-inline int _phpc_res_close(zval *zres) {
+-	zend_list_close(Z_RES_P(zres));
+-	return SUCCESS;
+-}
+-#define PHPC_RES_CLOSE _phpc_res_close
+-#endif
+ 
+ /* resource to zval */
+ #define PHPC_RES_PZVAL(_res, _pzv) \
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 5 lines · Fabrice Fontaine

Fix the following build failure with gcc 4.8 raised since bump of php-gnupg to version 1.5.0 in commit 20ecd9c94222ef20b7804084acefb472b8e5deaf and
https://github.com/bukka/phpc/commit/8b5b1e718fbb2ba57102d1e9d844938038df310c:

Quoted 7 lines

.libs/gnupg_keylistiterator.o: In function `_phpc_res_close':
gnupg_keylistiterator.c:(.text+0x2d4): multiple definition of `_phpc_res_close'

Fixes:
- http://autobuild.buildroot.org/results/d79/d79bc1b0f98d68eb8a7fe7d86af5ddcc75e42507/build-end.log

Applied to master, thanks.

Regards,
Arnout

Quoted 35 lines
---
  ...0001-Remove-inlining-_phpc_res_close.patch | 33 +++++++++++++++++++
  1 file changed, 33 insertions(+)

create mode 100644 package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch

package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch new file +23 -0
new file mode 100644
index 0000000000..9b94cb7e4f
@@ -0,0 +1,33 @@
+From 887b0899d7e7423baec691255c2d8b56bb348ecd Mon Sep 17 00:00:00 2001
+From: Jakub Zelenka <[email protected]>
+Date: Sun, 14 Mar 2021 18:52:21 +0000
+Subject: [PATCH] Remove inlining _phpc_res_close
+
+[Retrieved from:
+https://github.com/bukka/phpc/commit/887b0899d7e7423baec691255c2d8b56bb348ecd]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ phpc.h | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/phpc/phpc.h b/phpc/phpc.h
+index dc5887e..9206105 100644
+--- a/phpc/phpc.h
++++ b/phpc/phpc.h
+@@ -945,16 +945,8 @@ typedef zend_resource * phpc_res_value_t;
+ 	zend_fetch_resource2(Z_RES_P(_pz_res), _res_type_name, _res_type_1, _res_type_2)
+ #define PHPC_RES_DELETE(_pz_res) \
+ 	zend_list_delete(Z_RES_P(_pz_res))
+-#if PHP_MAJOR_VERSION < 8
+ #define PHPC_RES_CLOSE(_pz_res) \
+ 	zend_list_close(Z_RES_P(_pz_res))

package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch line 33

Quoted 10 lines
package/php-gnupg/0001-Remove-inlining-_phpc_res_close.patch new file +10 -0
+-#else
+-inline int _phpc_res_close(zval *zres) {
+-	zend_list_close(Z_RES_P(zres));
+-	return SUCCESS;
+-}
+-#define PHPC_RES_CLOSE _phpc_res_close
+-#endif
+
+ /* resource to zval */
+ #define PHPC_RES_PZVAL(_res, _pzv) \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Fabrice Fontaine
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Fix the following build failure with gcc 4.8 raised since bump of php-gnupg to version 1.5.0 in commit 20ecd9c94222ef20b7804084acefb472b8e5deaf and
https://github.com/bukka/phpc/commit/8b5b1e718fbb2ba57102d1e9d844938038df310c:

Quoted 8 lines

.libs/gnupg_keylistiterator.o: In function `_phpc_res_close':
gnupg_keylistiterator.c:(.text+0x2d4): multiple definition of `_phpc_res_close'

Fixes:
-
http://autobuild.buildroot.org/results/d79/d79bc1b0f98d68eb8a7fe7d86af5ddcc75e42507/build-end.log

Committed to 2021.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot