Error in making during php installation

Asked 2 months ago, Updated 2 months ago, 3 views

I installed php(5.3.29) and apache from the source.

After configuring php, there was an error in make, and I am troubled.

Is there an error because the compiler is new?
Please point out how to deal with the error/advice etc.

·gcc--version
gcc(GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)

·OS
CentOS 7

·The PHP configure option below

 PHP_AUTOCONF=autoconf './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--without-pspell' '--with-regex=system' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-kerberos=/usr/kerberos' '--with-mysql' '--with-snmp=shared,/usr' '--enable-ucd-snmp-hack' '--enable-bcmath' '--enable-shmop' '--enable-calendar' '--enable-mbregex' '--enable-zend-multibyte' '--with-libdir=lib64' '--with-apxs2' '--disable-force-cgi-redirect' '--enable-mbstring' '--enable-sockets' '--enable-sqlite-utf8' '--with-pdo-mysql' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--enable-zip' '--with-curl' '--with-xmlrpc' '--enable-soap' '--with-xsl'' --with-mcrypt=/usr/lib64' --enable-dynamic-loading'

·Error when making below

Infile included from/home/tomonorimatsuka/place/php-5.3.29/ext/zlib/zlib.c:50:0:
/home/tomonorimatsukawa/place/php-5.3.29/ext/zlib/php_zlib.h:30:2: Error: Unknown type name 'z_stream'
  z_stream stream;
  ^
/home/tomonorimatsukawa/place/php-5.3.29/ext/zlib/php_zlib.h:31:2: Error: Unknown type name 'uLong'
  uLong crc;
  ^
/home/tomonorimatsukawa/place/php-5.3.29/ext/zlib/zlib.c:249:1: Error: Unknown type name 'voidpf'
 static voidpf php_zlib_alloc (voidpfopque, uInt items, uInt size)
 ^
/home/tomonorimatsukawa/place/php-5.3.29/ext/zlib/zlib.c:249:30: Error: Unknown type name 'voidpf'
・
・
・・
Infile included from /home/tomonorimatsuka/place/php-5.3.29/main/php.h:38:0 ,
                 from/home/tomonorimatsuka/place/php-5.3.29/ext/zlib/zlib.c:28:
/home/tomonorimatsukawa/place/php-5.3.29/ext/zlib/zlib.c:948:28: Error: Request for member 'total_out' of structure or something not shared
   RETURN_STRINGL(s2,stream.total_out + GZIP_HEADER_LENGTH+ (coding==CODING_GZIP?GZIP_FOOTER_LENGTH:0), 0);

make:*** [ext/zlib/zlib.lo] Error 1

php centos apache gcc

2022-09-30 11:28

2 Answers

Both z_stream and uLong are the types in the zlib header files, but undefined means that no zlib related inclusion files have been found. Why is there no error finding someone to include?

If --with-zlib is specified, the zlib binary is not enough, and zlib-devel is not required. Please install zlib-devel in addition to rpm or install itself in the field +pode>

If --with-****** is specified by hand, the ****-develop package is also required.For example, --with-opensl requires opensl-develop.Find out what needs to be installed.

If zlib-develop is already installed, there should be zlib.h and zconf.h somewhere.It seems to be in /usr/include, so please check it out.You may need to add the --with-z=DIR option if you have installed it in a non-standard directory.

http://www.atmarkit.co.jp/ait/articles/1107/22/news142.html

offtopic
Is it a reproduction of the version used by the customer? It may not be meaningful if you do not have all the versions except phphttpd.I think it's going to be a lot of difficulties...


2022-09-30 11:28

I'm the questioner.
Reinstalling zlib-devel succeeded.
Thank you.


2022-09-30 11:28

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.