Open donatj opened 2 weeks ago
Hi, @donatj. I know it's been 2 weeks since you opened this issue, so I'm guessing you either already found a solution or have moved on. I just happened to have added a GitHub Actions CI workflow that compiles and tests the PHP Gearman extension on the latest macOS, and it works, as you can see here:
https://github.com/esabol/pecl-networking-gearman/actions/runs/11269845628/job/31339294167
Looking at your log.txt, you (well, pecl
) ran
/private/tmp/pear/temp/gearman/configure --with-php-config=/opt/homebrew/opt/php@8.1/bin/php-config
I suspect you need to run
/private/tmp/pear/temp/gearman/configure --with-php-config=/opt/homebrew/opt/php@8.1/bin/php-config --with-gearman=$(brew --prefix gearman)
I think you're probably going to have to configure and compile it manually instead of using pecl
. I hope this helps!
@esabol Hah, so, actually no, I have not moved on. It's been a complete and total blocker for me trying to do some maintenance work on an old project.
Your suggested ./configure
incantation did in fact compile successfully for me, and after a little fiddling appears to be working. Thank you so much!
For the future, is this something that can be fixed on the … pecl side? I've no idea who I need to poke to make this not a problem 😆
@dontj asked:
For the future, is this something that can be fixed on the … pecl side? I've no idea who I need to poke to make this not a problem 😆
Well, I would try changing this line:
to
for i in $PHP_GEARMAN /usr/local /usr /opt/local /opt/homebrew/opt/gearman; do
Can you make that change to the gearman configure file locally and test that, @donatj ?
Ideally, it should run $(brew --prefix gearman)
instead of hardcoding /opt/homebrew/opt/gearman
, but I'm not sure if one can do that in a configure script.
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
```bash % /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/php@8.1 % brew install gearman % sudo pecl install gearman % brew install pecl % php --version % export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH" % export PATH="/opt/homebrew/opt/php@8.1/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/php@8.1/bin:$PATH" admin@Admins-Virtual-Machine ~ % export PATH="/opt/homebrew/opt/php@8.1/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]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 agearmand.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?