View Issue Details

IDProjectCategoryView StatusLast Update
0002120XdebugInstallationpublic2022-11-01 14:54
Reporterghoffart Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformMacBook M1 / arm64OSmacOSOS Version12.6 build 21G11
Summary0002120: Installation on macOS via PECL fails with file/dir errors
Description

Have php 8.1 via Homebrew. When installing xdebug via pecl install xdebug or arch -arm64 sudo pecl install xdebug, tried both with same result, it fails at the very end of the install process:

bs/trace_html.o src/tracing/.libs/trace_textual.o src/tracing/.libs/tracing.o  -lm -lz
dsymutil .libs/xdebug.so || :
creating xdebug.la
(cd .libs && rm -f xdebug.la && ln -s ../xdebug.la xdebug.la)
/bin/sh /private/tmp/pear/temp/pear-build-root6LYxIV/xdebug-3.1.5/libtool --mode=install cp ./xdebug.la /private/tmp/pear/temp/pear-build-root6LYxIV/xdebug-3.1.5/modules
cp ./.libs/xdebug.so /private/tmp/pear/temp/pear-build-root6LYxIV/xdebug-3.1.5/modules/xdebug.so
cp ./.libs/xdebug.lai /private/tmp/pear/temp/pear-build-root6LYxIV/xdebug-3.1.5/modules/xdebug.la
----------------------------------------------------------------------
Libraries have been installed in:
   /private/tmp/pear/temp/pear-build-root6LYxIV/xdebug-3.1.5/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5" install
Makefile:243: warning: overriding commands for target `test'
Makefile:136: warning: ignoring old commands for target `test'
Installing shared extensions:     /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php/8.1.10_1/pecl/20210902/

  +----------------------------------------------------------------------+
  |                                                                      |
  |   INSTALLATION INSTRUCTIONS                                          |
  |   =========================                                          |
  |                                                                      |
  |   See https://xdebug.org/install.php#configure-php for instructions  |
  |   on how to enable Xdebug for PHP.                                   |
  |                                                                      |
  |   Documentation is available online as well:                         |
  |   - A list of all settings:  https://xdebug.org/docs-settings.php    |
  |   - A list of all functions: https://xdebug.org/docs-functions.php   |
  |   - Profiling instructions:  https://xdebug.org/docs-profiling2.php  |
  |   - Remote debugging:        https://xdebug.org/docs-debugger.php    |
  |                                                                      |
  |                                                                      |
  |   NOTE: Please disregard the message                                 |
  |       You should add "extension=xdebug.so" to php.ini                |
  |   that is emitted by the PECL installer. This does not work for      |
  |   Xdebug.                                                            |
  |                                                                      |
  +----------------------------------------------------------------------+

running: find "/private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5" | xargs ls -dils
45933170   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5
45933819   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt
45933820   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew
45933821   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar
45933822   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php
45933823   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php/8.1.10_1
45933824   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php/8.1.10_1/pecl
45933825   0 drwxr-xr-x  3 root  wheel      96 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php/8.1.10_1/pecl/20210902
45933826 776 -rwxr-xr-x  1 root  wheel  394198 26 Sep 15:26 /private/tmp/pear/temp/pear-build-root6LYxIV/install-xdebug-3.1.5/opt/homebrew/Cellar/php/8.1.10_1/pecl/20210902/xdebug.so

Build process completed successfully
Installing '/opt/homebrew/Cellar/php/8.1.10_1/pecl/20210902/xdebug.so'

Warning: mkdir(): File exists in System.php on line 294
PHP Warning:  mkdir(): File exists in /opt/homebrew/Cellar/php/8.1.10_1/share/php/pear/System.php on line 294

Warning: mkdir(): File exists in /opt/homebrew/Cellar/php/8.1.10_1/share/php/pear/System.php on line 294
ERROR: failed to mkdir /opt/homebrew/Cellar/php/8.1.10_1/pecl/20210902
Steps To Reproduce

pecl install xdebug

Additional Information
% /opt/homebrew/bin/php  -version
PHP 8.1.10 (cli) (built: Sep  3 2022 12:09:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.10, Copyright (c), by Zend Technologies

% file /opt/homebrew/bin/php
/opt/homebrew/bin/php: Mach-O 64-bit executable arm64
TagsNo tags attached.
Operating SystemmacOS 12.6
PHP Version8.1.0-8.1.4

Activities

derick

2022-10-02 15:40

administrator   ~0006383

I have seen this before, and it turned out that /opt/homebrew/Cellar/php/8.1.10_1/pecl is not a directory, or a symlink to a non existing directory. This is a problem with homebrew, and there are hints in https://stackoverflow.com/questions/68944020/why-does-the-installation-of-xdebug-on-my-mac-not-work/73818341#73818341 that tell you how to solve it:

derick

2022-10-05 15:13

administrator   ~0006391

Did the hints in the StackOverflow link help?

ghoffart

2022-10-06 06:53

reporter   ~0006393

mkdir /opt/homebrew/lib/php/pecl did indeed help, thank you.

ghoffart

2022-10-06 14:07

reporter   ~0006394

See also this bug/issue for Homebrew: https://github.com/Homebrew/brew/issues/13930

derick

2022-11-01 14:54

administrator   ~0006417

Excellent. I'm closing this then.

Issue History

Date Modified Username Field Change
2022-09-26 13:43 ghoffart New Issue
2022-10-02 15:37 derick Description Updated
2022-10-02 15:37 derick Additional Information Updated
2022-10-02 15:40 derick Assigned To => derick
2022-10-02 15:40 derick Status new => feedback
2022-10-02 15:40 derick Note Added: 0006383
2022-10-05 15:13 derick Note Added: 0006391
2022-10-06 06:53 ghoffart Note Added: 0006393
2022-10-06 06:53 ghoffart Status feedback => assigned
2022-10-06 14:07 ghoffart Note Added: 0006394
2022-11-01 14:54 derick Status assigned => resolved
2022-11-01 14:54 derick Resolution open => no change required
2022-11-01 14:54 derick Note Added: 0006417