pecl-networking-gearman icon indicating copy to clipboard operation
pecl-networking-gearman copied to clipboard

Fails to pecl install or build manually on M1 Mac running macOS Ventura

Open donatj opened this issue 5 months ago • 4 comments

I don't know for certain if this is a problem to post here or as part of the homebrew for Gearman itself, my knowledge of C isn't good enough to tell me what the actual problem is, I'm just handy enough to be dangerous - but I have been fighting with getting the Gearman extension working on my M1 Mac for weeks.

It seems that no matter what I try it boils down to configure: error: Please install libgearman

I thought maybe it's something with my local machine, so I spun up a clean macOS on a UTM VM and tried it - log.txt here's the log of that. Same issue.

That log, above, on a clean install of macOS boils down to

(Click to Expand) Log Summary
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
% brew update
% (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/admin/.zprofile
% eval "$(/opt/homebrew/bin/brew shellenv)"
% brew update                                                                       
% brew install shivammathur/php/[email protected]
% brew install gearman
% sudo pecl install gearman
% brew install pecl        
% php --version
% export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
% export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"
% pecl                                              
% sudo pecl install gearman
Password:
sudo: pecl: command not found
admin@Admins-Virtual-Machine ~ % brew install pecl        
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################################################################### 100.0%
Warning: No available formula with the name "pecl". Did you mean pcl, ecl, peco, perl or pocl?
==> Searching for similarly named formulae and casks...
==> Formulae
stripe-cli           pcl                  ecl                  peco                 perl                 pocl

To install stripe-cli, run:
  brew install stripe-cli

==> Casks
pencil

To install pencil, run:
  brew install --cask pencil
admin@Admins-Virtual-Machine ~ % php --version
zsh: command not found: php
admin@Admins-Virtual-Machine ~ % export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
admin@Admins-Virtual-Machine ~ % export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"
admin@Admins-Virtual-Machine ~ % pecl                                              
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
channel-delete         Remove a Channel From the List
channel-discover       Initialize a Channel from its server
channel-info           Retrieve Information on a Channel
channel-login          Connects and authenticates to remote channel server
channel-logout         Logs out from the remote channel server
channel-update         Update an Existing Channel
clear-cache            Clear Web Services Cache
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings
convert                Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff                Run a "cvs diff" for all files in a package
cvstag                 Set CVS Release Tag
download               Download Package
download-all           Downloads each available package from the default channel
info                   Display information about a package
install                Install Package
list                   List Installed Packages In The Default Channel
list-all               List All Packages
list-channels          List Available Channels
list-files             List Files In Installed Package
list-upgrades          List Available Upgrades
login                  Connects and authenticates to remote server [Deprecated in favor of channel-login]
logout                 Logs out from the remote server [Deprecated in favor of channel-logout]
makerpm                Builds an RPM spec file from a PEAR package
package                Build Package
package-dependencies   Show package dependencies
package-validate       Validate Package Consistency
pickle                 Build PECL Package
remote-info            Information About Remote Packages
remote-list            List Remote Packages
run-scripts            Run Post-Install Scripts bundled with a package
run-tests              Run Regression Tests
search                 Search remote package database
shell-test             Shell Script Test
sign                   Sign a package distribution file
svntag                 Set SVN Release Tag
uninstall              Un-install Package
update-channels        Update the Channel List
upgrade                Upgrade Package
upgrade-all            Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]
Usage: pecl [options] command [command-options] <parameters>
Type "pecl help options" to list all options.
Type "pecl help shortcuts" to list all command shortcuts.
Type "pecl help version" or "pecl version" to list version information.
Type "pecl help <command>" to get the help for the specified command.
admin@Admins-Virtual-Machine ~ % sudo pecl install gearman
Password:
downloading gearman-2.1.2.tgz ...
Starting to download gearman-2.1.2.tgz (46,832 bytes)
.............done: 46,832 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902
building in /private/tmp/pear/temp/pear-build-rootN6W8yE/gearman-2.1.2
running: /private/tmp/pear/temp/gearman/configure --with-php-config=/opt/homebrew/opt/[email protected]/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for egrep -e... (cached) /usr/bin/grep -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... aarch64-apple-darwin22.6.0
checking host system type... aarch64-apple-darwin22.6.0
checking target system type... aarch64-apple-darwin22.6.0
checking for PHP prefix... /opt/homebrew/Cellar/[email protected]/8.1.29
checking for PHP includes... -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/main -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/TSRM -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/Zend -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/ext -I/opt/homebrew/Cellar/[email protected]/8.1.29/include/php/ext/date/lib
checking for PHP extension directory... /opt/homebrew/Cellar/[email protected]/8.1.29/pecl/20210902
checking for PHP installed headers prefix... /opt/homebrew/Cellar/[email protected]/8.1.29/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable gearman support... yes, shared
not found
configure: error: Please install libgearman
ERROR: `/private/tmp/pear/temp/gearman/configure --with-php-config=/opt/homebrew/opt/[email protected]/bin/php-config' failed

I've done a bunch of "debugging" with ChatGPT, as helpful as that might be - gearman.pc seems to be missing?

I tried just manually creating a

/opt/homebrew/opt/gearman/lib/pkgconfig/gearman.pc (the /opt/homebrew/opt/gearman/lib/pkgconfig directory already exists but only has a gearmand.pc)

My understanding is that libgearman should be installed with brew install gearman?

I don't know what the problem is - but it's broken on a clean install of macOS so I suspect I'm not (fully) the issue here?

donatj avatar Sep 23 '24 22:09 donatj