Skip to content

Enabling --enable-address-sanitizer causes the build to hang during make on macOS (Darwin 25 / Apple Silicon) #22180

@arshidkv12

Description

@arshidkv12

Description

When building php-src with AddressSanitizer enabled, the build hangs during the final linking stage of php-cgi.

The linker shows duplicate library warnings, then the build appears to stall indefinitely.

Steps to reproduce

/buildconf --force

./configure \
  --enable-debug \
  --enable-address-sanitizer

make -j1

Actual behavior

Build hangs during linking step

Zend/zend_string.o Zend/zend_strtod.o Zend/zend_system_id.o ...
-o sapi/cgi/php-cgi

ld: warning: duplicate -rpath '/opt/homebrew/opt/libiconv/lib' ignored
ld: warning: ignoring duplicate libraries: '-lsqlite3', '-lxml2'

After these warnings, the build stops progressing (hang).

PHP Version

PHP 8.6.0-dev (cli) (built: May 29 2026 17:22:50) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
    with Zend OPcache v8.6.0-dev, Copyright ©, by Zend by Perforce

Operating System

macOS 26.4

Metadata

Metadata

Assignees

No one assigned

    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