Re: Compiling FANN
| From: | Andrey Hristov | Date: | Tue, 07 Jun 2005 20:15:19 +0000 |
| Subject: | Re: Compiling FANN | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2434@lists.php.net to get a copy of this message | ||
Quoting Sean Coates <sean@caedmon.net>:
Hi all, I compiled FANN (pecl.php.net/fann) on one of my boxes, this morning -- no problem. (phpize; configure; make; make install) Trying the same thing on another, and I'm getting a parse error: sean@iconoclast:/opt/src/pecl-fann-0.1.1$ make /bin/sh /opt/src/pecl-fann-0.1.1/libtool --mode=compile gcc -I. -I/opt/src/pecl-fann-0.1.1 -DPHP_ATOM_INC -I/opt/src/pecl-fann-0.1.1/include -I/opt/src/pecl-fann-0.1.1/main -I/opt/src/pecl-fann-0.1.1 -I/opt/php5/include/php -I/opt/php5/include/php/main -I/opt/php5/include/php/Zend -I/opt/php5/include/php/TSRM -DHAVE_CONFIG_H -g -O2 -prefer-pic -c /opt/src/pecl-fann-0.1.1/fann.c -o fann.lo gcc -I. -I/opt/src/pecl-fann-0.1.1 -DPHP_ATOM_INC -I/opt/src/pecl-fann-0.1.1/include -I/opt/src/pecl-fann-0.1.1/main -I/opt/src/pecl-fann-0.1.1 -I/opt/php5/include/php -I/opt/php5/include/php/main -I/opt/php5/include/php/Zend -I/opt/php5/include/php/TSRM -DHAVE_CONFIG_H -g -O2 -cThe problem is here : -------------------------------- le_fann = zend_register_list_destructors_ex(destroy_fann,NULL,le_fann_name,module_number); zend_class_entry php_fann_ce; -------------------------------- Reverse the lines and it should compile on all compilers. HTH, Andrey/opt/src/pecl-fann-0.1.1/fann.c -fPIC -DPIC -o fann.lo/opt/src/pecl-fann-0.1.1/fann.c: In function `zm_startup_fann': /opt/src/pecl-fann-0.1.1/fann.c:387: parse error before `php_fann_ce' /opt/src/pecl-fann-0.1.1/fann.c:392: `fe_set' undeclared (first use in this function) /opt/src/pecl-fann-0.1.1/fann.c:392: (Each undeclared identifier is reported only once /opt/src/pecl-fann-0.1.1/fann.c:392: for each function it appears in.) /opt/src/pecl-fann-0.1.1/fann.c:402: `fe_get' undeclared (first use in this function) /opt/src/pecl-fann-0.1.1/fann.c:412: `php_fann_ce' undeclared (first use in this function) /opt/src/pecl-fann-0.1.1/fann.c: In function `zif_fann_create': /opt/src/pecl-fann-0.1.1/fann.c:496: parse error before `int' /opt/src/pecl-fann-0.1.1/fann.c:498: `ret' undeclared (first use in this function) /opt/src/pecl-fann-0.1.1/fann.c:509: parse error before `*' /opt/src/pecl-fann-0.1.1/fann.c:511: `fd' undeclared (first use in this function) /opt/src/pecl-fann-0.1.1/fann.c: In function `zif_fann_save': /opt/src/pecl-fann-0.1.1/fann.c:643: parse error before `*' /opt/src/pecl-fann-0.1.1/fann.c:644: `fd' undeclared (first use in this function) make: *** [fann.lo] Error 1 Any suggestions? S One of the compilers is C++ one, the other one pure C.