LINUX.ORG.RU

Компиляция php-7.4.19 gd jpeg - syntax error near unexpected token `ZLIB,'

 , , ,


0

1

Для php-7.4.19 в gd, нужна поддержка jpeg, пробую собрать ручками, но получаю syntax error near unexpected token `ZLIB,’ Поскажите куда копать zlib-devel стоит

/opt/php74/bin/php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] =>
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 1
    [XBM Support] => 1
    [WebP Support] => 1
    [BMP Support] => 1
    [TGA Read Support] => 1
    [JIS-mapped Japanese Font Support] =>
)

[root@centos69 ~]# tar zxf php-7.4.19.tar.gz
[root@centos69 ~]# cd /root/php-7.4.19/ext/gd
[root@centos69 gd]# ls -alh
total 208K
drwxrwxr-x.  4 root root 4.0K May  4 14:06 .
drwxrwxr-x. 74 root root 4.0K May  4 14:06 ..
-rw-rw-r--.  1 root root 6.3K May  4 14:06 config.m4
-rw-rw-r--.  1 root root 3.5K May  4 14:06 config.w32
-rw-rw-r--.  1 root root  118 May  4 14:06 CREDITS
-rw-rw-r--.  1 root root 133K May  4 14:06 gd.c
-rw-rw-r--.  1 root root  522 May  4 14:06 gd_compat.c
-rw-rw-r--.  1 root root  144 May  4 14:06 gd_compat.h
-rw-rw-r--.  1 root root 6.0K May  4 14:06 gd_ctx.c
drwxrwxr-x.  2 root root 4.0K May  4 14:06 libgd
-rw-rw-r--.  1 root root 6.5K May  4 14:06 php_gd.h
drwxrwxr-x.  2 root root  20K May  4 14:06 tests
[root@centos69 gd]# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:3903: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:7042: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8117: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3019: _LT_SETUP is expanded from...
aclocal.m4:2948: LT_INIT is expanded from...
aclocal.m4:2983: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:7042: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8117: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3019: _LT_SETUP is expanded from...
aclocal.m4:2948: LT_INIT is expanded from...
aclocal.m4:2983: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:3: warning: prefer named diversions
configure.in:150: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:3903: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:7042: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8117: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3019: _LT_SETUP is expanded from...
aclocal.m4:2948: LT_INIT is expanded from...
aclocal.m4:2983: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:7042: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8117: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3019: _LT_SETUP is expanded from...
aclocal.m4:2948: LT_INIT is expanded from...
aclocal.m4:2983: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
[root@centos69 gd]# ls -alh
total 1.5M
drwxrwxr-x.  6 root root 4.0K May 28 17:45 .
drwxrwxr-x. 74 root root 4.0K May  4 14:06 ..
-rw-r--r--.  1 root root  74K May 28 17:45 acinclude.m4
-rw-r--r--.  1 root root 350K May 28 17:45 aclocal.m4
drwxr-xr-x.  2 root root 4.0K May 28 17:45 autom4te.cache
drwxr-xr-x.  2 root root 4.0K May 28 17:45 build
-rwxr-xr-x.  1 root root  44K May 28 17:45 config.guess
-rw-r--r--.  1 root root 2.3K May 28 17:45 config.h.in
-rw-rw-r--.  1 root root 6.3K May  4 14:06 config.m4
-rwxr-xr-x.  1 root root  33K May 28 17:45 config.sub
-rwxr-xr-x.  1 root root 433K May 28 17:45 configure
-rw-r--r--.  1 root root 4.6K May 28 17:45 configure.in
-rw-rw-r--.  1 root root 3.5K May  4 14:06 config.w32
-rw-rw-r--.  1 root root  118 May  4 14:06 CREDITS
-rw-rw-r--.  1 root root 133K May  4 14:06 gd.c
-rw-rw-r--.  1 root root  522 May  4 14:06 gd_compat.c
-rw-rw-r--.  1 root root  144 May  4 14:06 gd_compat.h
-rw-rw-r--.  1 root root 6.0K May  4 14:06 gd_ctx.c
-rw-r--r--.  1 root root    0 May 28 17:45 install-sh
drwxrwxr-x.  2 root root 4.0K May  4 14:06 libgd
-rw-r--r--.  1 root root 238K May 28 17:45 ltmain.sh
-rw-r--r--.  1 root root 5.4K May 28 17:45 Makefile.global
-rw-r--r--.  1 root root    0 May 28 17:45 missing
-rw-r--r--.  1 root root    0 May 28 17:45 mkinstalldirs
-rw-rw-r--.  1 root root 6.5K May  4 14:06 php_gd.h
-rw-r--r--.  1 root root  68K May 28 17:45 run-tests.php
drwxrwxr-x.  2 root root  20K May  4 14:06 tests
[root@centos69 gd]# ./configure --with-jpeg --with-freetype --with-xpm --with-webp --enable-gd --with-php-config=/opt/php74/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/php74
checking for PHP includes... -I/opt/php74/include/php -I/opt/php74/include/php/main -I/opt/php74/include/php/TSRM -I/opt/php74/include/php/Zend -I/opt/php74/include/php/ext -I/opt/php74/include/php/ext/date/lib
checking for PHP extension directory... /opt/php74/lib/php/modules
checking for PHP installed headers prefix... /opt/php74/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.6 (ok)
checking for gawk... gawk
checking for GD support... yes, shared
checking for external libgd... no
checking for libwebp... yes
checking for libjpeg... yes
checking for libXpm... yes
checking for FreeType 2... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
./configure: line 4274: syntax error near unexpected token `ZLIB,'
./configure: line 4274: `  PKG_CHECK_MODULES(ZLIB, zlib)'

Ответ на: комментарий от zemidius

Поновее. Не заметил, что это старая центось. Тогда ТС пусть обновится до альмалинукса (или центоси стрим, или другого), а потом надо пытаться компилировать.

fernandos ★★★
()
Последнее исправление: fernandos (всего исправлений: 1)
Ответ на: комментарий от fernandos

Обновиться возможности нет. pkg-config пробовал последний, ошибка аналогичная Может есть предположения, причины такого поведения?

Slawka
() автор топика
Ответ на: комментарий от Slawka

ИМХО, пакеты старые. А чего обновится не можете? 6 центось уже мертва. Даже у реми нет 7.4 для 6-й центоси.

fernandos ★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.