fedora 20 32位安装phc
Note:之前fedora 20 64安装失败,停滞在phc的configure报错过程.
1.按照http://www.phpcompiler.org/doc/latest/install.html安装必要软件
g++ : sudo yum install gcc-c++
fedora自带make
Boost: sudo yum install boost*(推荐安装全部,否则在configure会出现各种与boost相关的问题)
PHP5:版本: 5.2.17
其余软件可以不装。
2.安装php-5.2.17.
在CFLAGS="-O3" ./configure --enable-bcmath --with-gmp --with-mysql --enable-embed前需要安装与gmp和mysql相关的软件,否则会报错
sudo yum install gmp-devel
sudo yum install mysql-devel -y
在make时出现会类似ext/dom/node.c:1953: error: dereferencing pointer to incomplete type之类的报错,可以通过导入patch包解决,具体命令为:
$ curl -o php-5.2.17.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
$ tar jxf php-5.2.17.tar.bz2
$ cd php-5.2.17
$ patch -p0 -b <../php-5.2.17.patch
patching file ext/dom/node.c
patching file
ext/dom/documenttype.c
patching file ext/simplexml/simplexml.c
3.安装phc
版本:0.2.0.1
安装过程会出现的问题:
./configure 时加上 --disable-gc。如果你安装了libgc相关的软件则不需要
在make时出现会类似src/parsing/Parse_buffer.cpp:65:32: error: 'AST_parse_buffer::AST_parse_buffer' names the constructor, not the type的报错
需要导入一个patch包。具体参考:https://code.google.com/p/phc/issues/detail?id=125
在编译过程中还有两个错误记不清了,需要修改下源码。一个是常量名,
一个是/src/lib/List.h:108:45: error: 'insert' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissiv
insert(end(), other->begin(), other->end());
将insert改为this->insert
Note:之前fedora 20 64安装失败,停滞在phc的configure报错过程.
1.按照http://www.phpcompiler.org/doc/latest/install.html安装必要软件
g++ : sudo yum install gcc-c++
fedora自带make
Boost: sudo yum install boost*(推荐安装全部,否则在configure会出现各种与boost相关的问题)
PHP5:版本: 5.2.17
其余软件可以不装。
2.安装php-5.2.17.
在CFLAGS="-O3" ./configure --enable-bcmath --with-gmp --with-mysql --enable-embed前需要安装与gmp和mysql相关的软件,否则会报错
sudo yum install gmp-devel
sudo yum install mysql-devel -y
在make时出现会类似ext/dom/node.c:1953: error: dereferencing pointer to incomplete type之类的报错,可以通过导入patch包解决,具体命令为:
$ curl -o php-5.2.17.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
$ tar jxf php-5.2.17.tar.bz2
$ cd php-5.2.17
$ patch -p0 -b <../php-5.2.17.patch
patching file ext/dom/node.c
patching file
ext/dom/documenttype.c
patching file ext/simplexml/simplexml.c
$
ext/gmp/gmp.c:1399:69: 错误:‘__GMP_BITS_PER_MP_LIMB’未声明(在此函数内第一次使用)
解决:__GMP_BITS_PER_MP_LIMB 替换为 GMP_LIMB_BITS
3.安装phc
版本:0.2.0.1
安装过程会出现的问题:
./configure 时加上 --disable-gc。如果你安装了libgc相关的软件则不需要
在make时出现会类似src/parsing/Parse_buffer.cpp:65:32: error: 'AST_parse_buffer::AST_parse_buffer' names the constructor, not the type的报错
需要导入一个patch包。具体参考:https://code.google.com/p/phc/issues/detail?id=125
在编译过程中还有两个错误记不清了,需要修改下源码。一个是常量名,
一个是/src/lib/List.h:108:45: error: 'insert' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissiv
insert(end(), other->begin(), other->end());
将insert改为this->insert