Karim Hamed-abdelouahab wrote:

> Hello everybody,
> 
> I cannot compile php (version 4.3.3) on linux (fedora-core 4 distribution)
> 
> This is the configuration
> ./configure --with-mysql --with-apx=../../apache/bin/apxs
> --disable-cgi --enable-cli
> 
> The output was normal, then I would compile with the commande make and
> I get the following output:
> 
> gcc  -Isapi/cli/ -I/usr/local/src/php/sapi/cli/ -DPHP_ATOM_INC
> -I/usr/local/src/php/include -I/usr/local/src/php/main
> -I/usr/local/src/php -I/usr/local/src/php/Zend
> -I/usr/local/src/php/ext/xml/expat  -I/usr/local/src/php/TSRM  -g -O2
> -c /usr/local/src/php/sapi/cli/php_cli.c -o sapi/cli/php_cli.o  &&
> echo > sapi/cli/php_cli.lo
> /usr/local/src/php/sapi/cli/php_cli.c:94: erreur: static declaration
> of ‘optarg’ follows non-static declaration
> /usr/include/getopt.h:59: erreur: previous declaration of ‘optarg’ was
> here /usr/local/src/php/sapi/cli/php_cli.c:95: erreur: static declaration
> of ‘optind’ follows non-static declaration
> /usr/include/getopt.h:73: erreur: previous declaration of ‘optind’ was
> here make: *** [sapi/cli/php_cli.lo] Erreur 1
> 

Can't say I've tried compiling PHP on Fedora 4 (Running Fedora 3 here), but
I suspect the problem will be down to the fact that the GCC on FC4 is 4.x.

I suggest you try installing the version of PHP included with Fedora 3
(assuming you're doing this because you don't want version 5.x, but want
4.x).  Download the following, and then install:

http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/php-4.3.9-3.i386.rpm
http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/php-devel-4.3.9-3.i386.rpm

cd /download/directory
rpm -ivh --force php-4.3.9-3.i386.rpm php-devel-4.3.9-3.i386.rpm

> Can somone helps me?
> 
> Thank in advance.
> Karim.

Reply via email to