We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

centos(7 64bit) update phalcon 1.3 to 2.0 catch error redefine TOKEN

configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands /bin/sh /home/jzb/cphalcon/build/64bits/libtool --mode=compile gcc -I. -I/home/jzb/cphalcon/build/64bits -DPHP_ATOM_INC -I/home/jzb/cphalcon/build/64bits/include -I/home/jzb/cphalcon/build/64bits/main -I/home/jzb/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /home/jzb/cphalcon/build/64bits/phalcon.zep.c -o phalcon.lo libtool: compile: gcc -I. -I/home/jzb/cphalcon/build/64bits -DPHP_ATOM_INC -I/home/jzb/cphalcon/build/64bits/include -I/home/jzb/cphalcon/build/64bits/main -I/home/jzb/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /home/jzb/cphalcon/build/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o /home/jzb/cphalcon/build/64bits/phalcon.zep.c: In function 'pp_syntax_error': /home/jzb/cphalcon/build/64bits/phalcon.zep.c:98723:0: warning: "TOKEN" redefined [enabled by default]

define TOKEN (ppminor.pp0)

^ /home/jzb/cphalcon/build/64bits/phalcon.zep.c:29228:0: note: this is the location of the previous definition

define TOKEN (aaminor.aa0)

^ /home/jzb/cphalcon/build/64bits/phalcon.zep.c: In function 'vv_syntax_error': /home/jzb/cphalcon/build/64bits/phalcon.zep.c:116831:0: warning: "TOKEN" redefined [enabled by default]

define TOKEN (vvminor.vv0)

^ /home/jzb/cphalcon/build/64bits/phalcon.zep.c:98723:0: note: this is the location of the previous definition

define TOKEN (ppminor.pp0)

^ ^Cmake: *** [phalcon.lo] Error 1



11.1k

I found the same problem on debian 8 too



11.1k
Accepted
answer

Here is the solution try this https://blog.phalcon.io/post/115773676765/guide-upgrading-to-phalcon-2 It's work for me on debian 8



27.0k

i try it ................................................ git clone https://github.com/phalcon/cphalcon git checkout 2.0.0 cd ext sudo ./install .........................................................but it show configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

/.........................................thanks very much



11.1k
edited May '15

Code

1. git clone https://github.com/phalcon/cphalcon
2. git checkout 2.0.0
3. cd build
4. sudo ./install

try this



27.0k
edited May '15

it display question's error
thanks a lot



5.7k

Are you doing a fresh Phalcon install or are you upgrading from 1.3.x to 2.0?



27.0k

i upgrading from 1.3.x to 2.0, so catch this error, do you have some methed,thanks (感激涕零)



5.7k

Have you tried to delete the original phalcon.so file that was created from the 1.3.x install? I had a problem with the compile/install when upgrading from 1.3.x to 2.0 but I don't remember if it was this exact error.

My file was located at "/usr/lib/php5/20131226/phalcon.so"

Try to delete your phalcon.so file then install again. Hopefully this will work for your issue as it did for mine

i upgrading from 1.3.x to 2.0, so catch this error, do you have some methed,thanks (感激涕零)

Compile from ext/:

git clone https://github.com/phalcon/cphalcon
git checkout 2.0.x
cd ext
sudo ./install


27.0k
edited May '15


27.0k

我也試著刪除了phalcon.so的文件了,沒什麼影響,但是還是很感謝你的回答