LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-18-2021, 08:39 PM   #1
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
regression on -current with php


php doesn't build anymore on -current:
----------------------
Dans le fichier inclus depuis /tmp/php-7.4.23/main/php.h:441,
depuis /tmp/php-7.4.23/ext/gd/gd.c:30:
/tmp/php-7.4.23/ext/gd/gd.c: Dans la fonction «*zm_startup_gd*»:
/tmp/php-7.4.23/ext/gd/gd.c:1140:55: erreur: «*GD_FLIP_HORINZONTAL*» non déclaré (première utilisation dans cette fonction)
1140 | REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~~
/tmp/php-7.4.23/Zend/zend_constants.h:53:105: note: dans la définition de la macro «*REGISTER_LONG_CONSTANT*»
53 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/php-7.4.23/ext/gd/gd.c:1140:55: note: chaque identificateur non déclaré est rapporté une seule fois pour chaque fonction dans laquelle il apparaît
1140 | REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~~
/tmp/php-7.4.23/Zend/zend_constants.h:53:105: note: dans la définition de la macro «*REGISTER_LONG_CONSTANT*»
53 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/php-7.4.23/ext/gd/gd.c:1141:53: erreur: «*GD_FLIP_VERTICAL*» non déclaré (première utilisation dans cette fonction)
1141 | REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~
/tmp/php-7.4.23/Zend/zend_constants.h:53:105: note: dans la définition de la macro «*REGISTER_LONG_CONSTANT*»
53 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/php-7.4.23/ext/gd/gd.c:1142:49: erreur: «*GD_FLIP_BOTH*» non déclaré (première utilisation dans cette fonction)
1142 | REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
| ^~~~~~~~~~~~
/tmp/php-7.4.23/Zend/zend_constants.h:53:105: note: dans la définition de la macro «*REGISTER_LONG_CONSTANT*»
53 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/php-7.4.23/ext/gd/gd.c: Dans la fonction «*zif_imageflip*»:
/tmp/php-7.4.23/ext/gd/gd.c:4699:22: erreur: «*GD_FLIP_VERTICAL*» non déclaré (première utilisation dans cette fonction)
4699 | case GD_FLIP_VERTICAL:
| ^~~~~~~~~~~~~~~~
/tmp/php-7.4.23/ext/gd/gd.c:4703:22: erreur: «*GD_FLIP_HORINZONTAL*» non déclaré (première utilisation dans cette fonction)
4703 | case GD_FLIP_HORINZONTAL:
| ^~~~~~~~~~~~~~~~~~~
/tmp/php-7.4.23/ext/gd/gd.c:4707:22: erreur: «*GD_FLIP_BOTH*» non déclaré (première utilisation dans cette fonction)
4707 | case GD_FLIP_BOTH:
| ^~~~~~~~~~~~
make: *** [Makefile:1135 : ext/gd/gd.lo] Erreur 1
-----------------------------
gd seems to be the culprit.
 
Old 09-18-2021, 11:02 PM   #2
walecha
Member
 
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174

Rep: Reputation: 42
Confirmed here. Building using internal libgd works
Code:
--enable-gd --with-external-gd=no
or you can use this patch (backported from php git)
Code:
--- a/ext/gd/gd.c	2021-08-24 23:33:32.000000000 +0700
+++ b/ext/gd/gd.c	2021-09-19 12:06:28.850375327 +0700
@@ -91,6 +91,11 @@
 #define M_PI 3.14159265358979323846
 #endif
 
+/* don't used libgd constants, not used, so going to be removed */
+#define PHP_GD_FLIP_HORIZONTAL 1
+#define PHP_GD_FLIP_VERTICAL   2
+#define PHP_GD_FLIP_BOTH       3
+
 #ifdef HAVE_GD_FREETYPE
 static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int, int);
 #endif
@@ -1137,9 +1142,9 @@
     /* GD2 image format types */
 	REGISTER_LONG_CONSTANT("IMG_GD2_RAW", GD2_FMT_RAW, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT("IMG_GD2_COMPRESSED", GD2_FMT_COMPRESSED, CONST_CS | CONST_PERSISTENT);
-	REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
-	REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
-	REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", PHP_GD_FLIP_HORIZONTAL, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", PHP_GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", PHP_GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT("IMG_EFFECT_REPLACE", gdEffectReplace, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT("IMG_EFFECT_ALPHABLEND", gdEffectAlphaBlend, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT("IMG_EFFECT_NORMAL", gdEffectNormal, CONST_CS | CONST_PERSISTENT);
@@ -4696,20 +4701,20 @@
 	}
 
 	switch (mode) {
-		case GD_FLIP_VERTICAL:
+		case PHP_GD_FLIP_VERTICAL:
 			gdImageFlipVertical(im);
 			break;
 
-		case GD_FLIP_HORINZONTAL:
+		case PHP_GD_FLIP_HORIZONTAL:
 			gdImageFlipHorizontal(im);
 			break;
 
-		case GD_FLIP_BOTH:
+		case PHP_GD_FLIP_BOTH:
 			gdImageFlipBoth(im);
 			break;
 
 		default:
-			php_error_docref(NULL, E_WARNING, "Unknown flip mode");
+			php_error_docref(NULL, E_WARNING, "must be one of IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
 			RETURN_FALSE;
 	}

Last edited by walecha; 09-19-2021 at 12:13 AM. Reason: workaround and patch
 
Old 09-19-2021, 02:55 PM   #3
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
solved in -current.
 
Old 02-21-2022, 11:40 PM   #4
Nobby6
Member
 
Registered: Jul 2012
Location: Sunshine Coast, Australia
Distribution: Slackware 64
Posts: 237
Blog Entries: 1

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by nobodino View Post
solved in -current.
strange this never made it into latest php source 7.4.28, I guess they insist we use their version, which can't happen due to mis matches jpeg version *sigh* lib 62 vers 90.

Applying this patch and building --enable-gd=shared --with-external-gd
resolves the problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] regression on -current with new autoconf-2.70 nobodino Slackware 2 01-12-2021 11:34 AM
[SOLVED] Slackware-current: Bash-completion regression orbea Slackware 2 04-05-2016 03:44 PM
[SOLVED] i915 regression in -current NicePics13 Slackware 12 09-13-2015 05:36 PM
xorg regression in -current mina86 Slackware 5 03-06-2013 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration