php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81471 compiling against GD 2.3.3 fails
Submitted: 2021-09-23 19:46 UTC Modified: 2021-09-23 19:53 UTC
From: s dot molenaar at m2mobi dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 8.0.11 OS: macOS
Private report: No CVE-ID: None
 [2021-09-23 19:46 UTC] s dot molenaar at m2mobi dot com
Description:
------------
./configure
--prefix=/usr/local/Cellar/php/8.0.10
--localstatedir=/usr/local/var
--sysconfdir=/usr/local/etc/php/8.0
--with-config-file-path=/usr/local/etc/php/8.0
--with-config-file-scan-dir=/usr/local/etc/php/8.0/conf.d
--with-pear=/usr/local/Cellar/php/8.0.10/share/php/pear
--enable-bcmath
--enable-calendar
--enable-dba
--enable-exif
--enable-ftp
--enable-fpm
--enable-gd
--enable-intl
--enable-mbregex
--enable-mbstring
--enable-mysqlnd
--enable-pcntl
--enable-phpdbg
--enable-phpdbg-readline
--enable-phpdbg-webhelper
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--with-apxs2=/usr/local/opt/httpd/bin/apxs
--with-bz2=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr
--with-curl
--with-external-gd
--with-external-pcre
--with-ffi
--with-fpm-user=_www
--with-fpm-group=_www
--with-gettext=/usr/local/opt/gettext
--with-gmp=/usr/local/opt/gmp
--with-iconv=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr
--with-kerberos
--with-layout=GNU
--with-ldap=/usr/local/opt/openldap
--with-libxml
--with-libedit
--with-mhash=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr
--with-mysql-sock=/tmp/mysql.sock
--with-mysqli=mysqlnd
--with-ndbm=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr
--with-openssl
--with-password-argon2=/usr/local/opt/argon2
--with-pdo-dblib=/usr/local/opt/freetds
--with-pdo-mysql=mysqlnd
--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc
--with-pdo-pgsql=/usr/local/opt/libpq
--with-pdo-sqlite
--with-pgsql=/usr/local/opt/libpq
--with-pic
--with-pspell=/usr/local/opt/aspell
--with-sodium
--with-sqlite3
--with-tidy=/usr/local/opt/tidy-html5
--with-unixODBC
--with-xmlrpc
--with-xsl
--with-zip
--with-zlib
--enable-dtrace
--with-ldap-sasl
--with-os-sdkpath=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk

Test script:
---------------
Running make will fail

Expected result:
----------------
Successful compile

Actual result:
--------------
Last 15 lines from /Users/sean/Library/Logs/Homebrew/php/03.make:
/private/tmp/php-20210923-57446-lnptyu/php-8.0.10/ext/gd/gd.c:355:42: error: use of undeclared identifier 'GD_FLIP_BOTH'
        REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
                                                ^
/private/tmp/php-20210923-57446-lnptyu/php-8.0.10/ext/gd/gd.c:3529:8: error: use of undeclared identifier 'GD_FLIP_VERTICAL'
                case GD_FLIP_VERTICAL:
                     ^
/private/tmp/php-20210923-57446-lnptyu/php-8.0.10/ext/gd/gd.c:3533:8: error: use of undeclared identifier 'GD_FLIP_HORIZONTAL'
                case GD_FLIP_HORIZONTAL:
                     ^
/private/tmp/php-20210923-57446-lnptyu/php-8.0.10/ext/gd/gd.c:3537:8: error: use of undeclared identifier 'GD_FLIP_BOTH'
                case GD_FLIP_BOTH:
                     ^
6 errors generated.
make: *** [ext/gd/gd.lo] Error 1
make: *** Waiting for unfinished jobs....

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-23 19:47 UTC] s dot molenaar at m2mobi dot com
See also: https://github.com/Homebrew/homebrew-core/issues/85715
 [2021-09-23 19:53 UTC] nikic@php.net
This is a libgd bug (ABI break in patch release), which has been fixed in https://github.com/libgd/libgd/commit/f4bc1f5c26925548662946ed7cfa473c190a104a.

The usage of the constants on the PHP side has been removed in https://github.com/php/php-src/commit/b3646440b1808abf0874b6f89027ce53ec5da03f, but that does not help old versions.
 [2021-09-23 19:53 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 [2021-09-23 19:58 UTC] s dot molenaar at m2mobi dot com
Thanks for the links, I'll patch GD in Homebrew to fix this then.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 13:03:14 2021 UTC