php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59869 rrd extension fails to compile with php trunk.
Submitted: 2011-07-24 17:06 UTC Modified: 2011-07-27 05:54 UTC
From: bobvin at pillars dot net Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: Trunk SVN-2011-07-24 (dev) OS: Debian Linux (sid)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bobvin at pillars dot net
New email:
PHP Version: OS:

 

 [2011-07-24 17:06 UTC] bobvin at pillars dot net
Description:
------------
Downloaded php trunk and rrd pecl extension as shown in 
"Reproduce code" section, and tried to compile PHP with rrd 
module built-in.

Reproduce code:
---------------
apt-get install librrd4 librrd-dev rrdtool
mkdir -p /usr/src/phptest
cd /usr/src/phptest
svn co http://svn.php.net/repository/php/php-src/trunk php
cd php/ext
svn co http://svn.php.net/repository/pecl/rrd/trunk rrd
cd ..
rm -rf rrd-build generated_lists autom4te.cache
touch *.in
./buildconf --force
mkdir rrd-build
cd rrd-build
../configure --with-rrd=/usr && make && make install


Expected result:
----------------
Clean compile and install.

Actual result:
--------------
Various fatal errors during configure step.

The first error was "config.status: error: cannot find input 
file: `tests/rrdtool-bin.inc.in'"

I applied the workaround patch at http://pillars.net/rrd-
disable-tests.patch

The next error was 
"/usr/src/phptest/php/ext/rrd/rrd.c:544:23: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 
'rrd_functions'
/usr/src/phptest/php/ext/rrd/rrd.c:591:2: error: 
'rrd_functions' undeclared here (not in a function)
"

I applied the patch at http://pillars.net/rrd-
zend_function_entry.patch

The next error was 
"/usr/src/phptest/php/ext/rrd/rrd_graph.c:80:48: error: 
'zend_class_entry' has no member named 'default_properties'"

I applied the patch at http://pillars.net/rrd_graph-
object_properties_init.patch

The next error was 
"/usr/src/phptest/php/ext/rrd/rrd_create.c:93:48: error: 
'zend_class_entry' has no member named 'default_properties'"

I applied the patch at http://pillars.net/rrd_create-
object_properties_init.patch

The next error was 
"/usr/src/phptest/php/ext/rrd/rrd_update.c:74:48: error: 
'zend_class_entry' has no member named 'default_properties'"

I applied the patch at http://pillars.net/rrd_update-
object_properties_init.patch

Finally I obtained a clean compile.  I will report back 
after confirming whether the build actually works as 
expected.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-24 17:10 UTC] bobvin at pillars dot net
Combined patch at:

http://pillars.net/rrd.patch
 [2011-07-26 03:23 UTC] koubel at seznam dot cz
Nice, I'll investigate after few days. I hope your patch doesn't have any impact on compiling and running under current stable PHP version.
 [2011-07-27 05:54 UTC] koubel at seznam dot cz
I made changes in trunk for fix both problems 
- compilation with 5.4+/trunk
- test for file under test directory

I tried to compile against trunk with your way, but I get 
error /usr/lib/libdbi.so: No such file or directory when sapi/cli/php was linked, but there was binaries in /ext/rdd, so I hope it works.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 03:01:28 2025 UTC