Bug #70492 [Com]: compile errors Solaris10/Studio12.1 (with fixes)

From: Date: Tue, 09 Feb 2016 12:07:13 +0000
Subject: Bug #70492 [Com]: compile errors Solaris10/Studio12.1 (with fixes)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199127@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70492&edit=1 ID: 70492 Comment by: alex dot collins at anglia dot ac dot uk Reported by: hsk at imb-jena dot de Summary: compile errors Solaris10/Studio12.1 (with fixes) Status: Open Type: Bug Package: Compile Failure Operating System: Solaris10 PHP Version: 7.0.1 Block user comment: N Private report: N New Comment: Building PhP 7.0.3 on Solaris 11.3 X86 with Studio 12.3 Patch is required and works. No Further issues experienced. Previous Comments: ------------------------------------------------------------------------ [2015-12-18 11:34:34] hsk at imb-jena dot de supplied patch still needed for 7.0.1 to get 7.0.1 compiled on solaris 10 (patched up-to-current) using solaris-studio 12.4 ------------------------------------------------------------------------ [2015-12-17 19:48:24] stadtkind2 at gmx dot de PHP 7.0.1 compiles fine with your patch on Solaris 11.3 x86 + Solaris Studio 12.5 beta Thanks! ------------------------------------------------------------------------ [2015-10-12 12:52:32] felipe@php.net phpdbg's function is not a void one, actually it returns void*. ------------------------------------------------------------------------ [2015-10-06 12:28:08] hsk at imb-jena dot de above report is still valid with php-7.0.0RC4 ------------------------------------------------------------------------ [2015-09-14 14:23:40] hsk at imb-jena dot de Description: ------------ to get php-7.0.0RC2 compiled on solaris 10 using studio 12.1 compiler, i had to make the following changes (see attached pacth): 1) in ext/fileinfo/libmagic/apprentice.c file, offsetof is used, and compiler says "offsetof undefined". for solaris10/studio12.1, offsetof is defined in stddef.h, so adding "#include <stddef.h>" to ext/fileinfo/libmagic/apprentice.c solved the compile error. 2) Zend/zend_alloc.[ch] conditionally declare and use _emalloc_8, _emalloc_16, ... and _efree_8, _efree_16, ..., but in Zend/zendalloc.h, these are #if'ed by "#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P)" while in Zend/zendalloc.c by "#if !ZEND_DEBUG && !defined(_WIN32". the two #if's must be consistent, else compiling zend_alloc.c failed for me. in my patch, i have and-ed all three conditions, but maybe one of the two #if-variants is what is wanted. 3) in sapi/phpdbg/phpdbg.c, when compiling function phpdbg_free_wrapper, compiler says "void function cannot return value". in my patch, i just commented the "return", but that may not be the true solution... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70492&edit=1

« previous php.bugs (#199127) next »