我正在使用多个PHP版本(7和5.6)设置我的新笔记本,当完全编译PHP-7.0后,我在PHP-5.6编译过程中出现了tokenizer错误.
sudo mkdir /opt/source
cd /opt/source
sudo git clone https://github.com/php/php-src.git
cd php-src
sudo git checkout PHP-5.6.17
sudo ./configure
--prefix=/opt/php-5.6
--with-pdo-pgsql
--with-zlib-dir
--with-freetype-dir
--enable-mbstring
--with-libxml-dir=/usr
--enable-soap
--enable-calendar
--with-curl
--with-mcrypt
--with-zlib
--with-gd
--with-pgsql
--disable-rpath
--enable-inline-optimization
--with-bz2
--with-zlib
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-pcntl
--enable-mbregex
--enable-exif
--enable-bcmath
--with-mhash
--enable-zip
--with-pcre-regex
--with-mysql
--with-pdo-mysql
--with-mysqli
--with-png-dir=/usr
--enable-gd-native-ttf
--with-openssl
--with-fpm-user=nginx
--with-fpm-group=nginx
--with-libdir=/lib/x86_64-linux-gnu
--enable-ftp
--with-imap
--with-imap-ssl
--with-kerberos
--with-gettext
--with-gd
--with-jpeg-dir=/usr/lib/
--enable-fpm
/bin/bash /opt/source/php-src/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/standard/ -I/opt/source/php-src/ext/standard/ -DPHP_ATOM_INC -I/opt/source/php-src/include -I/opt/source/php-src/main -I/opt/source/php-src -I/opt/source/php-src/ext/date/lib -I/opt/source/php-src/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/c-client -I/opt/source/php-src/ext/mbstring/oniguruma -I/opt/source/php-src/ext/mbstring/libmbfl -I/opt/source/php-src/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/opt/source/php-src/ext/sqlite3/libsqlite -I/opt/source/php-src/ext/zip/lib -I/opt/source/php-src/TSRM -I/opt/source/php-src/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /opt/source/php-src/ext/standard/info.c -o ext/standard/info.lo /bin/bash /opt/source/php-src/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/tokenizer/ -I/opt/source/php-src/ext/tokenizer/ -DPHP_ATOM_INC -I/opt/source/php-src/include -I/opt/source/php-src/main -I/opt/source/php-src -I/opt/source/php-src/ext/date/lib -I/opt/source/php-src/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/c-client -I/opt/source/php-src/ext/mbstring/oniguruma -I/opt/source/php-src/ext/mbstring/libmbfl -I/opt/source/php-src/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/opt/source/php-src/ext/sqlite3/libsqlite -I/opt/source/php-src/ext/zip/lib -I/opt/source/php-src/TSRM -I/opt/source/php-src/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /opt/source/php-src/ext/tokenizer/tokenizer.c -o ext/tokenizer/tokenizer.lo /bin/bash /opt/source/php-src/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/tokenizer/ -I/opt/source/php-src/ext/tokenizer/ -DPHP_ATOM_INC -I/opt/source/php-src/include -I/opt/source/php-src/main -I/opt/source/php-src -I/opt/source/php-src/ext/date/lib -I/opt/source/php-src/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/c-client -I/opt/source/php-src/ext/mbstring/oniguruma -I/opt/source/php-src/ext/mbstring/libmbfl -I/opt/source/php-src/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/opt/source/php-src/ext/sqlite3/libsqlite -I/opt/source/php-src/ext/zip/lib -I/opt/source/php-src/TSRM -I/opt/source/php-src/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /opt/source/php-src/ext/tokenizer/tokenizer_data.c -o ext/tokenizer/tokenizer_data.lo In file included from /opt/source/php-src/main/php.h:406:0, from /opt/source/php-src/ext/tokenizer/tokenizer_data.c:26: /opt/source/php-src/ext/tokenizer/tokenizer_data.c: In function ‘tokenizer_register_constants’: /opt/source/php-src/ext/tokenizer/tokenizer_data.c:89:40: error: ‘T_CHARACTER’ undeclared (first use in this function) REGISTER_LONG_CONSTANT("T_CHARACTER", T_CHARACTER, CONST_CS | CONST_PERSISTENT); ^ /opt/source/php-src/Zend/zend_constants.h:43:103: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC) ^ /opt/source/php-src/ext/tokenizer/tokenizer_data.c:89:40: note: each undeclared identifier is reported only once for each function it appears in REGISTER_LONG_CONSTANT("T_CHARACTER", T_CHARACTER, CONST_CS | CONST_PERSISTENT); ^ /opt/source/php-src/Zend/zend_constants.h:43:103: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC) ^ /opt/source/php-src/ext/tokenizer/tokenizer_data.c:90:44: error: ‘T_BAD_CHARACTER’ undeclared (first use in this function) REGISTER_LONG_CONSTANT("T_BAD_CHARACTER", T_BAD_CHARACTER, CONST_CS | CONST_PERSISTENT); ^ /opt/source/php-src/Zend/zend_constants.h:43:103: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number TSRMLS_CC) ^ /opt/source/php-src/ext/tokenizer/tokenizer_data.c: In function ‘get_token_type_name’: /opt/source/php-src/ext/tokenizer/tokenizer_data.c:228:8: error: ‘T_CHARACTER’ undeclared (first use in this function) case T_CHARACTER: return "T_CHARACTER"; ^ /opt/source/php-src/ext/tokenizer/tokenizer_data.c:229:8: error: ‘T_BAD_CHARACTER’ undeclared (first use in this function) case T_BAD_CHARACTER: return "T_BAD_CHARACTER"; ^ make: *** [ext/tokenizer/tokenizer_data.lo] Error 1 root@patrick:/opt/source/php-src#
Ubuntu 14.04.3 x64
8GB RAM
英特尔i5
如果您需要更多信息,请在投票前告诉我.
谢谢.