Dear PHP folks :
I am trying to build php 5.4.11 with the GD extension and running into an error where both
GCC 4.7.2 and Oracle Studio 12.3 claim that :
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 51: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 58: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 67: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 68: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 69: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c", line 153: error: improper member use: data
or in the case of GCC 4.7.2 we see :
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c: In function '_php_image_stream_putc':
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf':
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree':
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data'
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c: In function '_php_image_output_ctx':
/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data'
At line 48 in ext/gd/gd_ctx.c we see function _php_image_stream_putc :
static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) {
char ch = (char) c;
php_stream * stream = (php_stream *)ctx->data;
TSRMLS_FETCH();
php_stream_write(stream, &ch, 1);
}
Which seems to use the GD IO context struct gdIOCtx thus :
Looking in ./ext/gd/libgd/gd_io.h I see at line 10 :
typedef struct gdIOCtx {
int (getC)(struct gdIOCtx);
int (getBuf)(struct gdIOCtx, void*, int);
void (*putC)(struct gdIOCtx*, int);
int (*putBuf)(struct gdIOCtx*, const void*, int);
int (*seek)(struct gdIOCtx*, const int);
long (*tell)(struct gdIOCtx*);
void (*gd_free)(struct gdIOCtx*);
void *data;
} gdIOCtx;
So I am baffled as there it is, a nice void pointer.
I make the one line change :
node002 $ diff ext/gd/gd_ctx.c_backup ext/gd/gd_ctx.c
21a22
#include "gd_io.h"
then run configure :
node002 $ ./configure --with-apxs2=/usr/local/bin/apxs --with-mysql=/opt/mysql/mysql \
--with-libxml-dir=/usr/local --sysconfdir=/usr/local/etc
--includedir=/usr/local/include --libdir=/usr/local/lib
--libexecdir=/usr/local/libexec --localstatedir=/usr/local/var/php
--mandir=/usr/local/share/man --infodir=/usr/local/share
--cache-file=../php-5.4.11_SunOS5.10_sparcv9.001.cache --disable-debug
--with-pic --with-bz2 --with-gettext --with-gmp --with-iconv --with-openssl
--with-zlib --enable-ftp --enable-sockets --without-kerberos
--enable-calendar --enable-xml --disable-json --with-curl=/usr/local
--enable-posix --with-pdo-mysql --enable-mbstring --with-mysqli
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-zlib-dir=/usr/local --with-xpm-dir=/usr/openwin/lib/sparcv9
--with-gd=/usr/local --with-freetype-dir=/usr/local
configure: creating cache ../php-5.4.11_SunOS5.10_sparcv9.001.cache
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
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... no
checking whether /opt/solarisstudio12.3/bin/cc accepts -g... yes
checking for /opt/solarisstudio12.3/bin/cc option to accept ISO C89... none needed
checking how to run the C preprocessor... /opt/solarisstudio12.3/bin/cc -E
checking for icc... no
checking for suncc... yes
checking whether /opt/solarisstudio12.3/bin/cc and cc understand -c and -o together... yes
checking how to run the C preprocessor... /opt/solarisstudio12.3/bin/cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -R... yes
checking for gawk... gawk
checking for bison... bison -y
checking for bison version... invalid
configure: WARNING: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 (found: 2.6.5).
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking whether to enable computed goto gcc extension with re2c... no
checking whether to force non-PIC code in shared modules... no
checking whether /dev/urandom exists... yes
checking for pthreads_cflags...
checking for pthreads_lib...
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... yes
checking for Apache 1.x (hooks) module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support... no
checking whether to enable Apache charset compatibility option... no
checking for Caudium support... no
checking for CLI build... yes
checking for Continuity support... no
checking for embedded SAPI library support... no
checking for FPM build... no
checking for Zeus ISAPI support... no
checking for LiteSpeed support... no
checking for Milter support... no
checking for NSAPI support... no
checking for PHTTPD support... no
checking for Pi3Web support... no
checking whether Roxen module is build using ZTS... no
checking for Roxen/Pike support...
checking for thttpd... no
checking for TUX... no
checking for webjames... no
checking for CGI build... yes
checking for socklen_t in sys/socket.h... yes
checking for sun_len in sys/un.h... no
checking whether cross-process locking is required by accept()... yes
checking for chosen SAPI module... apache2handler
checking for executable SAPI binaries... cli cgi
Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... yes
checking whether writing to stdout works... This is the test message -- yes
checking for socket... no
checking for __socket... no
checking for socket in -lsocket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... no
checking for __gethostbyaddr... no
checking for gethostbyaddr in -lnsl... yes
checking for yp_get_default_domain... yes
checking for dlopen... yes
checking for sin in -lm... yes
checking for inet_aton... yes
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for dirent.h... yes
checking for ApplicationServices/ApplicationServices.h... no
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for assert.h... yes
checking for crypt.h... yes
checking for dns.h... no
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... yes
checking for langinfo.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for monetary.h... yes
checking for netdb.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/ioctl.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/varargs.h... yes
checking for sys/wait.h... yes
checking for sys/loadavg.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for assert.h... (cached) yes
checking for fopencookie... no
checking for broken getcwd... yes
checking for broken libc stdio... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... no
checking whether tzname is declared... yes
checking for tzname... yes
checking for missing declarations of reentrant functions... done
checking for fclose declaration... ok
checking for tm_gmtoff in struct tm... no
checking for struct flock... yes
checking for socklen_t... yes
checking size of size_t... 8
checking size of long long... 8
checking size of long long int... 8
checking size of long... 8
checking size of int... 4
checking size of intmax_t... 8
checking size of ssize_t... 8
checking size of ptrdiff_t... 8
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct stat.st_rdev... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for struct sockaddr_storage... yes
checking for field sa_len in struct sockaddr... no
checking for IPv6 support... yes
checking for vprintf... yes
checking for _doprnt... yes
checking for alphasort... yes
checking for asctime_r... yes
checking for chroot... yes
checking for ctime_r... yes
checking for cuserid... yes
checking for crypt... yes
checking for flock... no
checking for ftok... yes
checking for funopen... no
checking for gai_strerror... yes
checking for gcvt... yes
checking for getloadavg... yes
checking for getlogin... yes
checking for getprotobyname... yes
checking for getprotobynumber... yes
checking for getservbyname... yes
checking for getservbyport... yes
checking for gethostname... (cached) yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for getpwnam_r... yes
checking for getgrnam_r... yes
checking for getpwuid_r... yes
checking for grantpt... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for isascii... yes
checking for link... yes
checking for localtime_r... yes
checking for lockf... yes
checking for lchown... yes
checking for lrand48... yes
checking for memcpy... yes
checking for memmove... yes
checking for mkstemp... yes
checking for mmap... yes
checking for nl_langinfo... yes
checking for perror... yes
checking for poll... yes
checking for ptsname... yes
checking for putenv... yes
checking for realpath... yes
checking for random... yes
checking for rand_r... yes
checking for scandir... yes
checking for setitimer... yes
checking for setlocale... yes
checking for localeconv... yes
checking for setenv... yes
checking for setpgid... yes
checking for setsockopt... yes
checking for setvbuf... yes
checking for shutdown... yes
checking for sin... yes
checking for snprintf... yes
checking for srand48... yes
checking for srandom... yes
checking for statfs... yes
checking for statvfs... yes
checking for std_syslog... no
checking for strcasecmp... yes
checking for strcoll... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strnlen... no
checking for strptime... yes
checking for strstr... yes
checking for strtok_r... yes
checking for symlink... yes
checking for tempnam... yes
checking for tzset... yes
checking for unlockpt... yes
checking for unsetenv... yes
checking for usleep... yes
checking for utime... yes
checking for vsnprintf... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for nanosleep... no
checking for nanosleep in -lrt... yes
checking for getaddrinfo... yes
checking for __sync_fetch_and_add... no
checking for strlcat... yes
checking for strlcpy... yes
checking for getopt... yes
checking for utime.h... (cached) yes
checking whether utime accepts a null argument... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for declared timezone... yes
checking for type of reentrant time-related functions... POSIX
checking for readdir_r... yes
checking for type of readdir_r... POSIX
checking for in_addr_t... yes
checking for crypt_r... no
General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking layout of installed files... PHP
checking path to configuration file... DEFAULT
checking where to scan for configuration files...
checking whether to enable PHP's own SIGCHLD
handler... no
checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking whether to enable DTrace support... no
checking how big to make fd sets... using system default
Configuring extensions
checking size of long... (cached) 8
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking which regex library to use... php
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr/local
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
checking for PCRE library to use... bundled
checking whether to enable the SQLite3 extension... yes
checking bundled sqlite3 library... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... /usr/local
checking for zlib version >= 1.2.0.4... 1.2.7
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... no
checking for BZip2 support... yes
checking for BZip2 in default path... found in /usr/local
checking for BZ2_bzerror in -lbz2... yes
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL 7.10.5 or greater... libcurl 7.28.1
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... /opt/solarisstudio12.3/bin/cc -E
checking for openssl support in libcurl... no
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... yes
checking for curl_version_info in -lcurl... yes
checking for curl_easy_strerror in -lcurl... yes
checking for curl_multi_strerror in -lcurl... yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for TCADB support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for ENCHANT support... no
checking whether to enable EXIF (metadata from images) support... no
checking for fileinfo support... yes
checking for utimes... yes
checking for strndup... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... yes
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libvpx... no
checking for the location of libjpeg... /usr/local
checking for the location of libpng... /usr/local
checking for the location of libXpm... /usr/openwin/lib/sparcv9
checking for FreeType 2... /usr/local
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for FT_New_Face in -lfreetype... yes
checking for gdImageString16 in -lgd... yes
checking for gdImagePaletteCopy in -lgd... yes
checking for gdImageCreateFromPng in -lgd... yes
checking for gdImageCreateFromGif in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageCreateFromJpeg in -lgd... yes
checking for gdImageCreateFromXpm in -lgd... yes
checking for gdImageCreateFromGd2 in -lgd... yes
checking for gdImageCreateTrueColor in -lgd... yes
checking for gdImageSetTile in -lgd... yes
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... yes
checking for gdImageStringTTF in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageStringFTEx in -lgd... yes
checking for gdImageColorClosestHWB in -lgd... yes
checking for gdImageColorResolve in -lgd... yes
checking for gdImageGifCtx in -lgd... yes
checking for gdCacheCreate in -lgd... yes
checking for gdFontCacheShutdown in -lgd... yes
checking for gdFreeFontCache in -lgd... yes
checking for gdFontCacheMutexSetup in -lgd... no
checking for gdNewDynamicCtxEx in -lgd... yes
checking for gdImageCreate in -lgd... yes
checking for GNU gettext support... yes
checking for bindtextdomain in -lintl... yes
checking for ngettext in -lintl... yes
checking for dngettext in -lintl... yes
checking for dcngettext in -lintl... yes
checking for bind_textdomain_codeset in -lintl... yes
checking for GNU MP support... yes
checking for __gmp_randinit_lc_2exp_size in -lgmp... yes
checking for mhash support... no
checking whether to enable hash support... yes
checking whether byte ordering is bigendian... (cached) yes
checking size of short... 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... no
checking if using GNU libiconv... 270yes
checking if iconv supports errno... yes
checking if your cpp allows macro usage in include lines... yes
checking for IMAP support... no
checking for IMAP Kerberos support... no
checking for IMAP SSL support... no
checking for InterBase support... no
checking whether to enable internationalization support... no
checking whether to enable JavaScript Object Serialization support... no
checking for LDAP support... no
checking for LDAP Cyrus SASL support... no
checking whether to enable multibyte string support... yes
checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for external oniguruma... no
checking for variable length prototypes and stdarg.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/time.h... (cached) yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for stdarg.h... (cached) yes
checking size of int... (cached) 4
checking size of short... (cached) 2
checking size of long... (cached) 8
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for mysql_close in -lmysqlclient_r... yes
checking for MySQL UNIX socket location... no
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for Oracle Database OCI8 support... no
checking whether to enable pcntl support... no
checking whether to enable PDO support... yes
checking for PDO_DBLIB support via FreeTDS... no
checking for Firebird support for PDO... no
checking for MySQL support for PDO... yes
checking for PDO includes... checking for PDO includes... /usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext
checking Oracle OCI support for PDO... no
checking for ODBC v3 support for PDO... no
checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... (cached) /usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext
checking for usleep... (cached) yes
checking for nanosleep... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for fdatasync in -lrt... yes
checking for PostgreSQL support... no
checking for phar archive support... yes
checking for phar openssl support... yes
checking whether to enable POSIX-like functions... yes
checking sys/mkdev.h usability... yes
checking sys/mkdev.h presence... yes
checking for sys/mkdev.h... yes
checking for seteuid... yes
checking for setegid... yes
checking for setsid... yes
checking for getsid... yes
checking for setpgid... (cached) yes
checking for getpgid... yes
checking for ctermid... yes
checking for mkfifo... yes
checking for mknod... yes
checking for getrlimit... yes
checking for getlogin... (cached) yes
checking for getgroups... yes
checking for makedev... no
checking for initgroups... yes
checking for getpwuid_r... (cached) yes
checking for getgrgid_r... yes
checking for working ttyname_r() implementation... no, posix_ttyname()
will be thread-unsafe
checking for utsname.domainname... no
checking for PSPELL support... no
checking for libedit readline replacement... no
checking for readline support... no
checking for recode support... no
checking whether to enable PHP sessions... yes
checking for mm support... no
checking whether pwrite works... yes
checking whether pread works... yes
checking whether to enable shmop support... no
checking whether to enable SimpleXML support... yes
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for SNMP support... no
checking OpenSSL dir for SNMP... no
checking whether to enable SOAP support... no
checking whether to enable sockets support... yes
checking for struct cmsghdr... yes
checking for hstrerror... no
checking for socketpair... (cached) yes
checking for if_nametoindex... yes
checking for if_indextoname... yes
checking for netdb.h... (cached) yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for field ss_family in struct sockaddr_storage... yes
checking whether zend_object_value is packed... no
checking whether flush should be called explicitly after a buffered io... yes
checking for standard DES crypt... yes
checking for extended DES crypt... no
checking for MD5 crypt... yes
checking for Blowfish crypt... yes
checking for SHA512 crypt... no
checking for SHA256 crypt... no
checking whether the compiler supports alignof... yes
checking whether the compiler supports aligned attribute... yes
checking for getcwd... yes
checking for getwd... yes
checking for asinh... yes
checking for acosh... yes
checking for atanh... yes
checking for log1p... yes
checking for hypot... yes
checking for glob... yes
checking for strfmon... yes
checking for nice... yes
checking for fpclass... yes
checking for isinf... no
checking for isnan... yes
checking for mempcpy... no
checking for strpncpy... no
checking for working POSIX fnmatch... yes
checking for fork... yes
checking if your OS can spawn processes with inherited handles... yes
checking for res_nsearch... no
checking for __res_nsearch... no
checking for res_nsearch in -lresolv... yes
checking for dns_search... no
checking for __dns_search... no
checking for dns_search in -lresolv... no
checking for __dns_search in -lresolv... no
checking for dns_search in -lbind... no
checking for __dns_search in -lbind... no
checking for dns_search in -lsocket... no
checking for __dns_search in -lsocket... no
checking for dn_expand... yes
checking for dn_skipname... yes
checking for res_search... yes
checking whether atof() accepts NAN... yes
checking whether atof() accepts INF... no
checking whether HUGE_VAL == INF... yes
checking whether HUGE_VAL + -HUGEVAL == NAN... yes
checking whether strptime()
declaration fails... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for mblen... yes
checking for mbrlen... yes
checking for mbsinit... yes
checking for mbstate_t... no
checking atomic.h usability... yes
checking atomic.h presence... yes
checking for atomic.h... yes
checking for Sybase-CT support... no
checking whether to enable System V IPC support... no
checking whether to enable System V semaphore support... no
checking whether to enable System V shared memory support... no
checking for TIDY support... no
checking whether to enable tokenizer support... yes
checking whether to enable WDDX support... no
checking libexpat dir for WDDX... no
checking whether to enable XML support... yes
checking libexpat install dir... no
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable XMLReader support... yes
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for XMLRPC-EPI support... no
checking libexpat dir for XMLRPC-EPI... no
checking iconv dir for XMLRPC-EPI... no
checking whether to enable XMLWriter support... yes
checking for xml2-config path... (cached) /usr/local/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for XSL support... no
checking for zip archive read/writesupport... no
checking pcre install prefix... no
checking whether to enable mysqlnd... no
checking whether to disable compressed protocol support in mysqlnd... yes
checking whether int8 exists... no
checking whether uint8 exists... no
checking whether int16 exists... no
checking whether uint16 exists... no
checking whether int32 exists... no
checking whether uint32 exists... no
checking whether uchar exists... no
checking whether ulong exists... yes
checking whether int8_t exists... yes
checking whether uint8_t exists... yes
checking whether int16_t exists... yes
checking whether uint16_t exists... yes
checking whether int32_t exists... yes
checking whether uint32_t exists... yes
checking whether int64_t exists... yes
checking whether uint64_t exists... yes
Configuring PEAR
checking whether to install PEAR... yes
Configuring Zend
checking for bison version... (cached) invalid
configure: WARNING: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 (found: none).
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for limits.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for signal.h... (cached) yes
checking for unix.h... (cached) no
checking for stdlib.h... (cached) yes
checking for dlfcn.h... (cached) yes
checking for size_t... (cached) yes
checking return type of signal handlers... void
checking for uint... yes
checking for ulong... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for vprintf... (cached) yes
checking for _doprnt... (cached) yes
checking for working memcmp... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for memcpy... (cached) yes
checking for strdup... (cached) yes
checking for getpid... yes
checking for kill... yes
checking for strtod... yes
checking for strtol... yes
checking for finite... yes
checking for fpclass... (cached) yes
checking for sigsetjmp... yes
checking whether sprintf is broken... no
checking for finite... (cached) yes
checking for isfinite... no
checking for isinf... (cached) no
checking for isnan... (cached) yes
checking whether fp_except is defined... no
checking for usable _FPU_SETCW... no
checking for usable fpsetprec... no
checking for usable _controlfp... no
checking for usable _controlfp_s... no
checking whether FPU control word can be manipulated by inline assembler... no
checking whether double cast to long preserves least significant bits... no
checking for dlfcn.h... (cached) yes
checking whether dlsym() requires a leading underscore in symbol names... no
checking virtual machine dispatch method... CALL
checking whether to enable thread-safety... yes
checking whether to enable inline optimization for GCC... yes
checking whether to enable Zend debugging... no
checking for inline... inline
checking target system is Darwin... no
checking for MM alignment and log values... done
checking for memory allocation using mmap(MAP_ANON)... yes
checking for memory allocation using mmap("/dev/zero")... yes
checking for mremap... no
checking for sigaction... yes
checking whether to enable zend signal handling... no
Configuring TSRM
checking for stdarg.h... (cached) yes
checking for sigprocmask... yes
checking for pthreads_cflags... (cached)
checking for pthreads_lib... (cached)
checking for POSIX threads... yes
Configuring libtool
checking for non-GNU ld... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking how to recognize dependent libraries... pass_all
checking how to run the C++ preprocessor... /opt/solarisstudio12.3/bin/CC -E
checking the maximum length of command line arguments... 786240
checking command to parse /usr/ccs/bin/nm -p output from /opt/solarisstudio12.3/bin/cc object... ok
checking for objdir... .libs
checking for ar... /usr/ccs/bin/ar
checking for ranlib... ranlib
checking for strip... strip
checking for /opt/solarisstudio12.3/bin/cc option to produce PIC... -KPIC
checking if /opt/solarisstudio12.3/bin/cc PIC flag -KPIC works... yes
checking if /opt/solarisstudio12.3/bin/cc static flag -Bstatic works... yes
checking if /opt/solarisstudio12.3/bin/cc supports -c -o file.o... yes
checking whether the /opt/solarisstudio12.3/bin/cc linker (/usr/ccs/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
checking whether the /opt/solarisstudio12.3/bin/CC linker (/usr/ccs/bin/ld -64) supports shared libraries... yes
checking for /opt/solarisstudio12.3/bin/CC option to produce PIC... -KPIC
checking if /opt/solarisstudio12.3/bin/CC PIC flag -KPIC works... yes
checking if /opt/solarisstudio12.3/bin/CC static flag -Bstatic works... yes
checking if /opt/solarisstudio12.3/bin/CC supports -c -o file.o... yes
checking whether the /opt/solarisstudio12.3/bin/CC linker (/usr/ccs/bin/ld -64) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
Generating files
configure: updating cache ../php-5.4.11_SunOS5.10_sparcv9.001.cache
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating main/php_config.h
config.status: executing default commands
node002 $
Fire off gmake and see a pile of warnings ... such as :
/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c -o ext/date/php_date.lo
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/Zend/zend_operators.h", line 597: warning: integer overflow detected: op "<<"
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/Zend/zend_operators.h", line 680: warning: integer overflow detected: op "<<"
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 81: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 97: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 109: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 113: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 134: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 160: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 203: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 219: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 285: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 296: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 320: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 329: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 337: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 340: warning: initializer will be sign-extended: -1
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/php_date.c", line 352: warning: initializer will be sign-extended: -1
.
.
.
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/dom/dom_iterators.c", line 239: warning: argument #2 is incompatible with prototype:
prototype: pointer to char : "/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/dom/php_dom.h", line 113
argument : pointer to unsigned char
etc etc .... however I can look the other way on those for now.
The real issues, the so called errors, are in the gd extension :
/bin/bash /usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/libtool --silent --preserve-dup-deps --mode=compile /opt/solarisstudio12.3/bin/cc -I/usr/local/include -Iext/gd/ -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/ -DPHP_ATOM_INC -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/include -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/main -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002 -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/date/lib -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/sfw/include -I/usr/local/include/freetype2 -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/mbstring/oniguruma -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/mbstring/libmbfl -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/mbstring/libmbfl/mbfl -I/opt/mysql/mysql/include -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ex
t/sqlite3/libsqlite -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/TSRM -I/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/Zend -I/usr/local/include -I/usr/sfw/include -I/opt/mysql/mysql/include -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/local/include -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -xmemalign=8s -DZTS -c /usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd.c -o ext/gd/gd.lo
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/Zend/zend_operators.h", line 597: warning: integer overflow detected: op "<<"
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/Zend/zend_operators.h", line 680: warning: integer overflow detected: op "<<"
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 52: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 59: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 68: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 69: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 70: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd_ctx.c", line 154: error: improper member use: data
cc: acomp failed for /usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.002/ext/gd/gd.c
gmake: *** [ext/gd/gd.lo] Error 1
This is just a mystery to me because this looks fine :
49 static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) {
50 char ch = (char) c;
51 php_stream * stream = (php_stream *)ctx->data;
52 TSRMLS_FETCH();
53 php_stream_write(stream, &ch, 1);
54 }
The struct gdIOCtx has the void ptr data.
Has anyone built in the GD extension lately ? Am I seeing a valid error here ?
Dennis Clarke
dclarke@blastwave.org
Dear PHP folks :
I am trying to build php 5.4.11 with the GD extension and running
into an error where both
GCC 4.7.2 and Oracle Studio 12.3 claim that :
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 51: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 58: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 67: error: improper member use: data
There is a problem when an external library is used. Using the bundled lib
fixes this problem ("--with-gd")
Cheers,
Pierre
----- Original Message -----
From: Pierre Joye pierre.php@gmail.com
Date: Sunday, February 10, 2013 1:55 pm
Subject: Re: [PHP-DEV] ext/gd/gd_ctx.c: In function '_php_image_stream_putc': error: 'struct gdIOCtx' has no member named 'data'
To: Dennis Clarke dclarke@blastwave.org
Cc: Stanislav Malyshev stas@php.net, Christopher Jones christopher.jones@oracle.com, PHP internals internals@lists.php.net, ssb@php.net, Rasmus Lerdorf rasmus@php.net
Dear PHP folks :
I am trying to build php 5.4.11 with the GD extension and running
into an error where both
GCC 4.7.2 and Oracle Studio 12.3 claim that :
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 51: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 58: error: improper member use: data
"/usr/local/build/php-5.4.11_SunOS5.10_sparcv9+GD.001/ext/gd/gd_ctx.c",
line 67: error: improper member use: dataThere is a problem when an external library is used. Using the bundled
lib
fixes this problem ("--with-gd")
Thank you for the nearly instant neck breaking speedy response !
OKay, so this means that my build of GD 2.0.33 ( http://www.boutell.com/gd/manual2.0.33.html ) was perhaps a waste of time and I will have a go with your suggestion right away.
node002 $ rm ../php-5.4.11_SunOS5.10_sparcv9.001.cache
node002 $ ./configure --with-apxs2=/usr/local/bin/apxs --with-mysql=/opt/mysql/mysql \
--with-libxml-dir=/usr/local --sysconfdir=/usr/local/etc
--includedir=/usr/local/include --libdir=/usr/local/lib
--libexecdir=/usr/local/libexec --localstatedir=/usr/local/var/php
--mandir=/usr/local/share/man --infodir=/usr/local/share
--cache-file=../php-5.4.11_SunOS5.10_sparcv9.001.cache --disable-debug
--with-pic --with-bz2 --with-gettext --with-gmp --with-iconv --with-openssl
--with-zlib --enable-ftp --enable-sockets --without-kerberos
--enable-calendar --enable-xml --disable-json --with-curl=/usr/local
--enable-posix --with-pdo-mysql --enable-mbstring --with-mysqli
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-zlib-dir=/usr/local --with-xpm-dir=/usr/openwin/lib/sparcv9
--with-gd --with-freetype-dir=/usr/local
.
.
.
well golly gee .. it didn't blow up in the first 5 minutes. Still compiling ... :-)
Thank you very much.
Does this mean there is a fork of GD inside the php source tarballs and that the
stuff I see at Tom Boutell's site is just something else ?
Dennis
ps: as an aside, I'd love to solve those warnings about
./Zend/zend_operators.h, line 597: warning: integer overflow detected: op "<<"
however it looks like a funky define does the deed and it seems to roll an integer left
by 8 * sizeof(long) - 1. Not sure what the intent of that is. Could be just to isolate
a single upper bit ?
There is a problem when an external library is used. Using the bundled
lib fixes this problem ("--with-gd")
That worked beautifully :
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.11
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version unknown
PNG Support enabled
libPNG Version 1.5.14
WBMP Support enabled
XPM Support enabled
libXpm Version 30411
XBM Support enabled
Not sure why libJPEG is an unknown version but other than that .. looks great.
Thank you so much.
Dennis
Dennis Clarke in php.internals (Sun, 10 Feb 2013 14:50:25 -0500):
libJPEG Version unknown
Not sure why libJPEG is an unknown version but other than that .. looks great.
Because you are using version 9.0 and ext/gd/libgd/gd_jpeg.c does not
know anything about that version. There should be a generic check for
the libJPEG version. Something like
char jpegstr[12];
const char * gdJpegGetVersionString()
{
switch(JPEG_LIB_VERSION) {
case 62:
return "6b";
break;
case 70:
return "7";
break;
case 80:
return "8";
break;
default:
snprintf(jpegstr, sizeof(jpegstr), "%d", JPEG_LIB_VERSION);
return jpegstr;
}
}
But I know there are better solutions (looking at ext/gd/gd.c).
Jan
Does this mean there is a fork of GD inside the php source tarballs and that the
stuff I see at Tom Boutell's site is just something else ?
I would like to know the answer to that myself. The gd project is
currently maintained by the PHP community. I'm not sure if what's in
the PHP tarballs is different from what's on bitbucket and to what
degree.
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com
hi Tom,
Does this mean there is a fork of GD inside the php source tarballs and that the
stuff I see at Tom Boutell's site is just something else ?I would like to know the answer to that myself. The gd project is
currently maintained by the PHP community. I'm not sure if what's in
the PHP tarballs is different from what's on bitbucket and to what
degree.
Actually the bitbucket branch has more features (image formats support
and a couple of handy features like autocroping and the likes). 5.5
will bring both in sync and will use bundled versions when php is
built against an older version.
But this bug is a binary incompatibility with the external lib, my
mistake while adding a long awaited feature. To restore the binary
compatibility will require some re-factoring, 5.5 final should have it
and the other branches will follow shortly after.
Cheers,
Pierre
@pierrejoye