Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on Homebrew PHP 7.2 #66

Open
fgm opened this issue Mar 30, 2020 · 0 comments
Open

Cannot install on Homebrew PHP 7.2 #66

fgm opened this issue Mar 30, 2020 · 0 comments

Comments

@fgm
Copy link

fgm commented Mar 30, 2020

Trying to do

  • sudo pecl install memcache
  • on macOS 10.14.6 Mojave
  • PHP: PHP 7.2.23 (cli) (built: Oct 3 2019 19:49:50) ( NTS )

Expected

Extension installs

Observed

Failure because zlib cannot be located.

downloading memcache-4.0.5.2.tgz ...
Starting to download memcache-4.0.5.2.tgz (75,061 bytes)
.................done: 75,061 bytes
18 source files, building

Warning: preg_match(): Unknown modifier '7' in Builder.php on line 310

Warning: preg_match(): Unknown modifier '7' in /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Builder.php on line 310

Call Stack:
    0.0004     421224   1. {main}() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/peclcmd.php:0
    0.0021     496344   2. require_once('/usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/pearcmd.php') /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/peclcmd.php:31
    0.0370    2086784   3. PEAR_Command_Install->run() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/pearcmd.php:316
    0.0370    2086784   4. PEAR_Command_Install->doInstall() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Command/Common.php:270
    2.8958    5614936   5. PEAR_Installer->install() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Command/Install.php:713
    3.0049    5925200   6. PEAR_Installer->_compileSourceFiles() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Installer.php:1415
    3.0058    6007240   7. PEAR_Builder->build() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Installer.php:1519
    3.0062    6008424   8. preg_match() /usr/local/Cellar/[email protected]/7.2.23/share/[email protected]/pear/PEAR/Builder.php:310

running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
Enable memcache session handler support? [yes] :
building in /private/tmp/pear/temp/pear-build-rootaIqbJi/memcache-4.0.5.2
running: /private/tmp/pear/temp/memcache/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config --enable-memcache-session=yes
checking for grep that handles long lines and -e... /usr/bin/grep
// ...snip...
checking for PHP prefix... /usr/local/Cellar/[email protected]/7.2.23
checking for PHP includes... -I/usr/local/Cellar/[email protected]/7.2.23/include/php -I/usr/local/Cellar/[email protected]/7.2.23/include/php/main -I/usr/local/Cellar/[email protected]/7.2.23/include/php/TSRM -I/usr/local/Cellar/[email protected]/7.2.23/include/php/Zend -I/usr/local/Cellar/[email protected]/7.2.23/include/php/ext -I/usr/local/Cellar/[email protected]/7.2.23/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/[email protected]/7.2.23/pecl/20170718
checking for PHP installed headers prefix... /usr/local/Cellar/[email protected]/7.2.23/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
ERROR: `/private/tmp/pear/temp/memcache/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config --enable-memcache-session=yes' failed

Although it is actually present in the PHP configuration:

php -i | grep zlib 
Configure Command =>  './configure'  
  '--prefix=/usr/local/Cellar/[email protected]/7.2.23' 
  '--localstatedir=/usr/local/var' 
  '--sysconfdir=/usr/local/etc/php/7.2' 
   '--with-config-file-path=/usr/local/etc/php/7.2' 
   /* ...snip... */ 
   '--with-zlib=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr'

And the header exists:

ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/zlib*
-rw-r--r--  7 root  wheel  98288  3 nov 18:24 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/zlib.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant