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

I can't install rdkafka via pecl under the php7.1 on Mac M1 #365

Closed
ninjachen opened this issue Jun 15, 2021 · 6 comments
Closed

I can't install rdkafka via pecl under the php7.1 on Mac M1 #365

ninjachen opened this issue Jun 15, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request support

Comments

@ninjachen
Copy link

ninjachen commented Jun 15, 2021

Describe the bug
I can't install rdkafka via pecl under the php7.1 on Mac M1. Error is: checking build system type... Invalid configuration `arm64-apple-darwin20.5.0': machine 'arm64-apple' not recognized

PHP versions
7.1

To Reproduce

  1. Install arm64 version homebrew
  2. Install the homebrew-php provided by you tap shivammathur/homebrew-php and install php@7.1 arm64
  3. Install rdkafka by pecl then meet a error

Expected behavior
The rdkafka will be installed by pecl success.

Screenshots/Logs

checking build system type... Invalid configuration `arm64-apple-darwin20.5.0': machine `arm64-apple' not recognized
configure: error: /bin/sh /private/tmp/pear/temp/rdkafka/config.sub arm64-apple-darwin20.5.0 failed
ERROR: `/private/tmp/pear/temp/rdkafka/configure --with-php-config=/opt/homebrew/opt/php@7.1/bin/php-config' failed

Actually, I can't install any libs by pecl.

Additional context
I try to use brew install memcached@7.1 --build-from-source another extension from shivammathur/homebrew-extensions, and it works.

And could you fix this pecl issue ?
Or could you please add rdkafka@7.1 into your extensions and give some more details to help my to build and install php c extension manually?

@ninjachen ninjachen added the bug Something isn't working label Jun 15, 2021
@shivammathur
Copy link
Owner

I will add rdkafka to shivammathur/extensions tap.

@ninjachen
Copy link
Author

Thank you shivammathur!!
Could you give some more information to help me to understand this issue?

@ninjachen
Copy link
Author

ninjachen commented Jun 15, 2021

$cc -v
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@shivammathur
Copy link
Owner

shivammathur commented Jun 15, 2021

@ninjachen The issue is that your autoconf auxiliary file config.sub is old and does not recognize macos arm. Make sure you have the latest autoconf and Xcode cli tools, and then try again.

  • Update Xcode CLI tools
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
  • Install rdkafka extension.
brew update 
brew reinstall autoconf
brew install librdkafka
pecl download rdkafka-5.0.0
tar xf  rdkafka-5.0.0.tgz
cd rdkafka-5.0.0
phpize
./configure --with-rdkafka="$(brew --prefix librdkafka)" --with-php-config="$(which php-config)"
make
make install

@shivammathur
Copy link
Owner

@ninjachen Added rdkafka in shivammathur/extensions tap.

@shivammathur shivammathur added enhancement New feature or request support and removed bug Something isn't working labels Jan 20, 2022
@Mexidense
Copy link

You can use:
brew install shivammathur/extensions/rdkafka@PHP_VERSION

eg: brew install shivammathur/extensions/rdkafka@8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request support
Projects
None yet
Development

No branches or pull requests

3 participants