How to enable php-gmp on Mac OS X 10.6.6? (no macports)

感情迁移 提交于 2019-12-19 21:21:04

问题


I want to enable my php-gmp and I don't want to use macports because I use homebrew.

First I

brew install gmp

and I got gmp 5.0.1

Then I downloaded the PHP source 5.3.6, then I go to

source/ext/gmp

I did

phpize

and then

MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=/Developer/SDKs/MacOSX10.6.sdk/usr/bin/php-config; make -j6;sudo make install

And it gave me this message:

checking for GNU MP support... yes, shared checking for __gmp_randinit_lc_2exp_size in -lgmp... no checking for gmp_randinit_lc_2exp_size in -lgmp... no configure: error: GNU MP Library version 4.1.2 or greater required. make: * No targets specified and no makefile found. Stop.

Any idea how to enable php-gmp without macports on Mac OSX 10.6.6? Thx


回答1:


If you have the homebrew-php tap installed, you can now do:

$ brew install php55 --with-gmp



回答2:


Php-gmp is incompatible with GMP 5.0.1. This is a known bug, reported on bugs.php.net over a year ago. Check the comments on the bug to see if there's a workaround that works for you. If not, and if homebrew doesn't have a GMP 4.x package you can install instead, I think you're stuck building a copy of GMP 4.x manually. :-(



来源:https://stackoverflow.com/questions/5576518/how-to-enable-php-gmp-on-mac-os-x-10-6-6-no-macports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!