Skip to content

Building with Oracle Developer Studio compiler fails  #15272

Description

@petk

Description

On Solaris 11.4 with Oracle Developer Studio compiler 12.6 the following code:

./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):

--- 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions