使用gearmand-1.1.8进行安装,开始的 gearmand-1.1.12安装失败
安装php 扩展,先使用了gearman官网提供的 1.0.2版本进行perl安装,提示变量未知,下载0.6.0,和0.4.0编译时错误更多,到 http://pecl.php.net/package/gearman 下载最新的1.1.2版本,成功,生成了/usr/lib/php/extensions/no-debug-non-zts-20090626/ 里面.so,但是提示 不是合作的img,我的php版本是5.3.1,继续使用 0.8.2,在make提示找不到make: *** No targets specified and no makefile found. Stop.继续0.8.3,GEARMAN_MAX_RETURN 错误
用1.1.1 /usr/lib/php/extensions/no-debug-non-zts-20090626/,提示 img不对,使用1.0.0 提示编译错误
可能原因是 xampp 编译成了32位,但是后面我编译安装的 c++ libariery ,gearmand,gearman-php扩展都是64位的
bjam --toolset=msvc-9.0 architecture=x86 address-model=64 --with-system --with-thread --with-date_time --with-filesystem --with-serialization
重新编译C++库,需要 libevent 下载
http://sourceforge.net/projects/levent/postdownload?source=dlp ,
http://libevent.org/
安装php 扩展,先使用了gearman官网提供的 1.0.2版本进行perl安装,提示变量未知,下载0.6.0,和0.4.0编译时错误更多,到 http://pecl.php.net/package/gearman 下载最新的1.1.2版本,成功,生成了/usr/lib/php/extensions/no-debug-non-zts-20090626/ 里面.so,但是提示 不是合作的img,我的php版本是5.3.1,继续使用 0.8.2,在make提示找不到make: *** No targets specified and no makefile found. Stop.继续0.8.3,GEARMAN_MAX_RETURN 错误
用1.1.1 /usr/lib/php/extensions/no-debug-non-zts-20090626/,提示 img不对,使用1.0.0 提示编译错误
按照网上的分析是由于编译系统不匹配,之前的php编译是32位的,而最新编译的扩展是64位,于是打算 把扩展编译成32位:
./configure MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load"可能原因是 xampp 编译成了32位,但是后面我编译安装的 c++ libariery ,gearmand,gearman-php扩展都是64位的
bjam --toolset=msvc-9.0 architecture=x86 address-model=64 --with-system --with-thread --with-date_time --with-filesystem --with-serialization
重新编译C++库,需要 libevent 下载
http://sourceforge.net/projects/levent/postdownload?source=dlp ,
http://libevent.org/
重新 安装 xampp https://www.macupdate.com/app/mac/19593/xampp,重新编辑安装 c++ libariery ,gearmand,gearman-php,成功!
总结:编译位数要一致,