php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58602 error: duplicate 'static' when building
Submitted: 2009-03-27 10:39 UTC Modified: 2009-08-23 17:15 UTC
From: paul at paulgarvin dot net Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.3.0RC1 OS: GNU/Linux
Private report: No CVE-ID:
 [2009-03-27 10:39 UTC] paul at paulgarvin dot net
Description:
------------
The APC extension does not build and exits the build process with what appears to be a compile time error.

Reproduce code:
---------------
I ran 'sudo pecl install apc' after installing PHP 5.3.0RC1. From the option '1. Use apxs to set compile flags (if using APC with Apache)?' I choose 'no' as I am using lighttpd.

Expected result:
----------------
An installed instance of APC.

Actual result:
--------------
This is the line it stops on:
 cc -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-root/APC-3.0.19/include -I/var/tmp/pear-build-root/APC-3.0.19/main -I/tmp/pear/temp/APC -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APC/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/tmp/pear/temp/APC/php_apc.c:959: error: duplicate 'static'
make: *** [php_apc.lo] Error 1

Some other information you may find useful.
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20090115
Zend Extension Api No:   220090115

gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

As mentioned above I am building without apxs/Apache support.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-27 13:27 UTC] shire@php.net
Hi, thanks for the bug report but I believe this is already fixed in CVS HEAD.  Can you re-test by checking out the latest CVS code and letting us know how that goes for you?
 [2009-03-28 13:02 UTC] paul at paulgarvin dot net
Code from CVS HEAD built with no errors. Thanks.
 [2009-04-05 23:35 UTC] shire@php.net
Great, thanks for the bug report and verifying the fix!
 [2009-04-08 02:56 UTC] dirk at bean-it dot nl
I still get this error, I've used the snapshot: 200904080430.
The only difference is that I do use apxs, so I just hit enter on the question. Error message is exactly the same as above.
 [2009-05-21 12:58 UTC] ast3r3x at myrealbox dot com
CentOS 5.3
PHP 5.3rc2
200904080430

I'm getting the same problem, although I too am using apxs 
with Apache 2.2.3
 [2009-06-21 05:05 UTC] alexc223 at googlemail dot com
Same with RC4:

/tmp/pear/temp/APC/php_apc.c:959: error: duplicate 'static'
make: *** [php_apc.lo] Error 1
ERROR: `make' failed

Debian Lenny
 [2009-07-03 07:49 UTC] cht at agarik dot com
Having the same issue with apxs
Centos 5.3 x64
PHP 5.3.0

]# /opt/applis/php-5.3.0-1/bin/pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes)
.........................done: 115,735 bytes
47 source files, building
WARNING: php_bin /opt/applis/php-5.3.0-1/bin/php appears to have a suffix -5.3.0-1/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
[...]
/tmp/pear/temp/APC/php_apc.c:959: error: duplicate 'static'
make: *** [php_apc.lo] Error 1
ERROR: `make' failed
 [2009-07-06 08:59 UTC] gopalv82 at yahoo dot com
APC is b0rked for 5.3 right now ... please await a full port & QA.
 [2009-07-20 07:41 UTC] paul at fsite dot com
Hows the update coming, borked on ubuntu
 [2009-07-28 17:27 UTC] wizard at wizardcomputing dot com
Confirmed on Ubuntu 9.04 Jaunty with php 5.3.0
 [2009-07-29 19:01 UTC] gopalv82 at yahoo dot com
Is there any issue with the apc-beta?

I'm at most a week away from making it the stable branch.
 [2009-08-10 04:54 UTC] svenwin at gmail dot com
On Ubuntu 9.04 and 5.3.0RC1 apc-beta compiled like a charm. Gret work!
 [2009-08-10 04:54 UTC] svenwin at gmail dot com
On Ubuntu 9.04 and 5.3.0RC1 apc-beta compiled like a charm. Great work!
 [2009-08-13 03:15 UTC] martin at mistermartin75 dot com
On Mac OS X 10.5.8 with PHP 5.3 apc-beta also compiles succesfully.
 [2009-08-13 16:10 UTC] mike at mode3 dot net
The 3.1.3 beta seems to be producing similar errors. Running
pecl install apc-beta on Ubuntu 8.04 LTS PPC 64

results in a failure culminating in:

/tmp/pear/temp/APC/php_apc.c:37:21: error: apc_bin.h: No such file or directory
/tmp/pear/temp/APC/php_apc.c: In function 'zm_startup_apc':
/tmp/pear/temp/APC/php_apc.c:272: error: 'APC_BIN_VERIFY_MD5' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:272: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/APC/php_apc.c:272: error: for each function it appears in.)
/tmp/pear/temp/APC/php_apc.c:273: error: 'APC_BIN_VERIFY_CRC32' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_dump':
/tmp/pear/temp/APC/php_apc.c:1313: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1313: error: 'bd' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_dumpfile':
/tmp/pear/temp/APC/php_apc.c:1351: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1351: error: 'bd' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_load':
/tmp/pear/temp/APC/php_apc.c:1429: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1429: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1430: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1434: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_loadfile':
/tmp/pear/temp/APC/php_apc.c:1482: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1482: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1483: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1488: error: expected expression before ')' token
make: *** [php_apc.lo] Error 1
ERROR: `make' failed

Installing the 3.1.2 beta did worked like a charm
 [2009-08-14 03:40 UTC] icedfish at gmail dot com
I tried 3.1.3 beta under CentOS 5.3 + php 5.3.0

still faild when I run pecl install apc-beta

where are the error log
++++++++++++++++++
/tmp/pear/temp/APC/php_apc.c:37:21: error: apc_bin.h: No such file or directory
/tmp/pear/temp/APC/php_apc.c: In function 'zm_startup_apc':
/tmp/pear/temp/APC/php_apc.c:272: error: 'APC_BIN_VERIFY_MD5' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:272: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/APC/php_apc.c:272: error: for each function it appears in.)
/tmp/pear/temp/APC/php_apc.c:273: error: 'APC_BIN_VERIFY_CRC32' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_dump':
/tmp/pear/temp/APC/php_apc.c:1313: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1313: error: 'bd' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_dumpfile':
/tmp/pear/temp/APC/php_apc.c:1351: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1351: error: 'bd' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_load':
/tmp/pear/temp/APC/php_apc.c:1429: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1429: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1430: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1434: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c: In function 'zif_apc_bin_loadfile':
/tmp/pear/temp/APC/php_apc.c:1482: error: 'apc_bd_t' undeclared (first use in this function)
/tmp/pear/temp/APC/php_apc.c:1482: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1483: error: expected expression before ')' token
/tmp/pear/temp/APC/php_apc.c:1488: error: expected expression before ')' token
make: *** [php_apc.lo] Error 1
ERROR: `make' failed

++++++++++++++++++
 [2009-08-16 22:16 UTC] icedfish at gmail dot com
It's all ok now when using the newest 'APC-3.1.3p1'
 [2009-08-23 04:04 UTC] bahek_zk at bk dot ru
Same on Xubuntu 9.04
'pecl install apc' failed with error mentioned above
'pecl install apc-beta' worked
 [2009-08-23 17:15 UTC] gopalv82 at yahoo dot com
A week more perhaps ... report bugs on the -beta while it's hot!! :)
 [2009-12-05 21:05 UTC] joel dot perras at gmail dot com
On ArchLinux, PHP 5.3.1 with Suhosin-Patch built as fcgi:

'pecl install apc-beta' worked like a charm.
 [2010-01-06 21:57 UTC] doug dot muth at gmail dot com
I can confirm that I just installed 3.1.3p1 on my Mac Mini running OS/X 10.6 without any issues.

Though there is one minor issue: running make test shows that 24/25 unit tests FAIL. (the 25th is skipped)

If you need any debugging info from me, let me know.
 [2010-02-15 04:11 UTC] tedivm at tedivm dot com
Not sure if I should open this as a new ticket or not-

I can confirm this is happening on OSX. I tried with and without apxs, and when 
explicitly setting the path to it.
 [2010-02-18 06:16 UTC] zlioxk at gmail dot com
i get error in install apc and install apc-beta
Still no fix?
 [2010-03-11 19:00 UTC] pkonink at gmail dot com
Had the same problem on Arch Linux with all concerned software upgraded to latest as of today. I only attempted with Apache flags set to yes.

pear install pecl.php.net/apc //did not work; same error
pear install pecl.php.net/apc-beta //DID work
 [2010-07-05 16:51 UTC] jericho034 at yahoo dot com

 [2010-10-26 07:04 UTC] matthew dot setter at gmail dot com
I tried sudo pecl install apc-beta on Ubuntu 10.04.1 and it 
installed just fine. However apc is currently still failing.
 [2010-10-31 17:03 UTC] baretimothee at gmail dot com
I get the same error with a ubuntu 10.04 64bit server.
I try the pecl install apc-beta but i get those message :
Package "apc" Version "3.1.4" does not have REST dependency information available
install failed
 [2010-10-31 17:08 UTC] baretimothee at gmail dot com
sorry i tried again and it worked perfectly with the beta version
 [2010-11-03 15:11 UTC] daniele dot pignedoli at gmail dot com
Same problem here, running ubuntu 10.10 32bit PHP Version 
5.3.3-1ubuntu9.1.

It worked with `sudo pecl install apc-beta`
 [2010-11-04 09:19 UTC] superaap at gmail dot com
Same on CentOS 5.4

pecl install apc-beta worked after installing pcre-devel.
 [2010-11-16 21:08 UTC] saff at 4info dot com
hello, having trouble compiling for Os X 10.6.4
running in 64bit mode, not sure if that matters.

tried all the flavors apc, apc-beta, etc. All of them fail the apc version has message:

 /usr/local/temp/APC/php_apc.c -o php_apc.lo
 cc -I. -I/usr/local/temp/APC -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/APC-3.0.19/include -I/private/var/tmp/pear-build-root/APC-3.0.19/main -I/usr/local/temp/APC -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 -DHAVE_CONFIG_H -g -O2 -c /usr/local/temp/APC/php_apc.c  -fno-common -DPIC -o .libs/php_apc.o
/usr/local/temp/APC/php_apc.c:959: error: duplicate 'static'
make: *** [php_apc.lo] Error 1
ERROR: `make' failed

Please help.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 09:02:28 2014 UTC