Bug #70991 [Fbk]: zend_file_cache.c:710: error: array type has incomplete element type

From: Date: Sun, 29 Nov 2015 03:16:26 +0000
Subject: Bug #70991 [Fbk]: zend_file_cache.c:710: error: array type has incomplete element type
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197481@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70991&edit=1 ID: 70991 Updated by: laruence@php.net Reported by: swa at section66 dot com Summary: zend_file_cache.c:710: error: array type has incomplete element type Status: Feedback Type: Bug Package: Compile Failure Operating System: OpenBSD PHP Version: 7.0.0RC8 -Assigned To: +Assigned To: laruence Block user comment: N Private report: N New Comment: can you verify this fix? diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index fbe18f8..497aa4c 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -26,6 +26,8 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) ]) + AC_CHECK_HEADERS([unistd.h sys/uio.h]) + AC_MSG_CHECKING(for sysvipc shared memory support) AC_TRY_RUN([ #include <sys/types.h> diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 7c615e9..993358b 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -706,7 +706,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) int fd; char *filename; zend_file_cache_metainfo info; -#ifndef ZEND_WIN32 +#ifdef HAVE_SYS_UIO_H struct iovec vec[3]; #endif void *mem, *buf; @@ -761,7 +761,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) info.checksum = zend_adler32(ADLER32_INIT, buf, script->size); info.checksum = zend_adler32(info.checksum, (signed char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.str_size); -#ifndef ZEND_WIN32 +#ifdef HAVE_SYS_UIO_H vec[0].iov_base = &info; vec[0].iov_len = sizeof(info); vec[1].iov_base = buf; note before you make, you should do ./buildconf --force to regenerate ./configure Previous Comments: ------------------------------------------------------------------------ [2015-11-29 03:16:23] laruence@php.net can you verify this fix? diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index fbe18f8..497aa4c 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -26,6 +26,8 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) ]) + AC_CHECK_HEADERS([unistd.h sys/uio.h]) + AC_MSG_CHECKING(for sysvipc shared memory support) AC_TRY_RUN([ #include <sys/types.h> diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 7c615e9..993358b 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -706,7 +706,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) int fd; char *filename; zend_file_cache_metainfo info; -#ifndef ZEND_WIN32 +#ifdef HAVE_SYS_UIO_H struct iovec vec[3]; #endif void *mem, *buf; @@ -761,7 +761,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) info.checksum = zend_adler32(ADLER32_INIT, buf, script->size); info.checksum = zend_adler32(info.checksum, (signed char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.str_size); -#ifndef ZEND_WIN32 +#ifdef HAVE_SYS_UIO_H vec[0].iov_base = &info; vec[0].iov_len = sizeof(info); vec[1].iov_base = buf; note before you make, you should do ./buildconf --force to regenerate ./configure ------------------------------------------------------------------------ [2015-11-28 21:25:02] swa at section66 dot com Description: ------------ CFLAGS='-O2' './configure' '--prefix=/<PATH>/php-7.0.0RC8' '--with-apxs2=<PATH>/bin/apxs' '--with-zlib' '--with-gd' '--enable-exif' '--with-jpeg-dir=/usr/local/lib' '--enable-gd-native-ttf' '--with-zlib-dir=/usr/lib/' '--with-png-dir=/usr/local/' '--enable-ftp' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-config-file-path=/etc/php.ini' '--enable-mbstring' (or even a plain ./configure without ANY options) After a while (depending on what options were selected): /<PATH>/php-7.0.0RC8/ext/opcache/zend_file_cache.c:710: error: array type has incomplete element type *** Error code 1 Line 710: #ifndef ZEND_WIN32 struct iovec vec[3]; #endif iovec on OpenBSD is defined in sys/uio.h, I guess the ./configure missed that. [Not familiar with it enough myself to propose a fix, sorry] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70991&edit=1

« previous php.bugs (#197481) next »