[php-src] Issue #15272: Building with Oracle Solaris Studio compiler fails

From: Date: Wed, 07 Aug 2024 09:24:08 +0000
Subject: [php-src] Issue #15272: Building with Oracle Solaris Studio compiler fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247455@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15272 Author: petk ### Description On Solaris 11.4 with Oracle Solaris Studio compiler 12.6 the following code: ```sh ./buildconf ./configure gmake ``` Resulted in this output: ``` configure: error: Required inet_ntop not found ``` But I expected this output instead: ``` # Successful build ``` The issue here is not the inet_ntop but that this combination of compiler and linker doesn't support the --ffp-contract=off flag to build dynamic executable: ``` cc: Warning: Option -ffp-contract=off passed to ld, if ld is invoked, ignored otherwise ld: fatal: option '-ffp-contract=off' is incompatible with building a dynamic executable ``` But this can be (still) easily bypassed by removing the --ffp-contract=off flag from configure.ac (or if we refactor the specific flag check into a link test instead of only compile): ```diff --- a/configure.ac +++ b/configure.ac -dnl See https://github.com/php/php-src/issues/14140 -AX_CHECK_COMPILE_FLAG([-ffp-contract=off], [CFLAGS="$CFLAGS -ffp-contract=off"]) - ``` However, then the compile errors start to pop up on the gmake step: ``` /php-src/ext/opcache/jit/ir/dynasm/minilua.c", line 2492: warning: improper pointer/integer combination: op "=" "/php-src/ext/opcache/jit/ir/dynasm/minilua.c", line 2541: warning: improper pointer/integer combination: op "=" "/php-src/ext/opcache/jit/ir/ir.h", line 75: #error: "Unknown addr size" "php-src/Zend/zend_atomic.h", line 307: #warning: No atomics support detected. Please open an issue with platform details. "php-src/Zend/zend_multiply.h", line 338: warning: statement not reached /php-src/ext/opcache/zend_file_cache.c", line 911: warning: assignment type mismatch: pointer to function(pointer to struct _zend_class_entry {char type, pointer to struct _zend_string {..} /php-src/ext/opcache/ZendAccelerator.c", line 4241: warning: statement not reached ``` Building with GCC works ok, otherwise. Should such compiler be even supported by PHP or not? ### PHP Version PHP 8.2+ ### Operating System Oracle Solaris 11.4

« previous php.bugs (#247455) next »