php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59650 Build fails against rrdtool 1.2.x
Submitted: 2011-03-05 04:36 UTC Modified: 2011-05-27 10:15 UTC
From: Fedora at FamilleCollet dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.5 OS: GNU/Linux (Fedora 14)
Private report: No CVE-ID: None
 [2011-03-05 04:36 UTC] Fedora at FamilleCollet dot com
Description:
------------
It seems the test provided in config.m4 is not enough.
Should probably use another function check than rrd_version.

*** Configure with rrdtool 1.2.27 (in RHEL 5.6)
checking for rrdtool support... yes, shared
checking for rrdtool header files in default path... found in /usr/include
checking for rrdtool library files in default paths... found in /usr/lib/librrd.so

*** Build
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_info.h:30: warning: type defaults to 'int' in declaration of 'rrd_info_t'
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_info.h:30: error: expected ';', ',' or ')' before '*' token
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c: In function 'rrd_graph_obj_create_argv':
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:154: warning: dereferencing type-punned pointer will break strict-aliasing rules
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c: In function 'zim_RRDGraph_saveVerbose':
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: error: 'rrd_info_t' undeclared (first use in this function)
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: error: (Each undeclared identifier is reported only once
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: error: for each function it appears in.)
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: error: 'rrd_info_data' undeclared (first use in this function)
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: error: 'data_p' undeclared (first use in this function)
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:286: warning: left-hand operand of comma expression has no effect
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:306: warning: implicit declaration of function 'rrd_graph_v'
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:317: warning: implicit declaration of function 'rrd_info_toarray'
/builddir/build/BUILD/php-pecl-rrd-0.10.0/rrd-0.10.0/rrd_graph.c:319: warning: implicit declaration of function 'rrd_info_free'

I perfectly understand you don't want to support very old rrdtool version (<1.3.0), so the confg.m4 probably need to be fixed.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-05 12:38 UTC] fedora at famillecollet dot com
Patch proposal
http://remi.fedorapeople.org/rrd-check_rrdtool_version.patch
 [2011-03-07 06:39 UTC] koubel at seznam dot cz
Thank you, what do you mean about support only 1.4.x? I think 1.4.x is stable and supported rrdtool line. If someone needs to 1.3.x support, then I'll expect patch or maybe patch only for 0.9.x extension version.
 [2011-03-07 07:49 UTC] fedora at famillecollet dot com
I don't understand you.

1 month ago you don't want to support 1.4 (because debian stable have only 1.3, see #21135, #21178), and now you want to already drop support of 1.3 ?!

1.2, 1.3 and 1.4 still present in various LTS (long time support) distribution (RHEL, Ubuntu LTS, Suse, Mandriva, ...).

rrd version 0.10.0 build and works with rrdtool 1.3. I don't see any value to drop such support.

rrd don't build/work with rrdtool 1.2. This patch is only to detect this as soon as possible (and to report it to user).
 [2011-03-07 08:06 UTC] koubel at seznam dot cz
When I switched my devel. environment to rrd 1.4, I had had update some tests, for example rrd_graph returns in 1.4 1px narrower graph then in 1.3.

If all works fine, I keep 1.3 support in config.m4 and I merge your patch.
 [2011-03-07 11:15 UTC] koubel at seznam dot cz
patch is in the trunk, thank you.
 [2011-05-27 06:47 UTC] eyal dot lezmy at niji dot fr
Hi guys,

I Have the same kind of errors while trying to install the 
php extension. I'm working on a RHED 5.6 64bits with PHP 
5.3.3 and RRDTOOL 1.4.4.

I tried to install it through "pear install pecl/rrd" I got 
an error running the make.
Then I tried to do it manually with "phpize, configure and 
make" and I got this output with the make command wich is 
the same than with the pear installation try.

/bin/sh /usr/local/temp/rrd-1.0.3/libtool --mode=compile cc  
-I. -I/usr/local/temp/rrd-1.0.3 -DPHP_ATOM_INC -
I/usr/local/temp/rrd-1.0.3/include -I/usr/local/temp/rrd-
1.0.3/main -I/usr/local/temp/rrd-1.0.3 -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/rrd-1.0.3/rrd.c -o rrd.lo
 cc -I. -I/usr/local/temp/rrd-1.0.3 -DPHP_ATOM_INC -
I/usr/local/temp/rrd-1.0.3/include -I/usr/local/temp/rrd-
1.0.3/main -I/usr/local/temp/rrd-1.0.3 -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/rrd-1.0.3/rrd.c  -fPIC -DPIC -o .libs/rrd.o
In file included from /usr/local/temp/rrd-1.0.3/rrd.c:34:
/usr/local/temp/rrd-1.0.3/rrd_info.h:32: error: expected 
';', ',' or ')' before '*' token
make: *** [rrd.lo] Erreur 1


I checked  and all the needed libraries seems to be having 
found and linked. The patch given above has been applied to 
the downloaded sources.

Do you have an idea about the origin of the problem?
 [2011-05-27 10:15 UTC] koubel at seznam dot cz
Create new bug report please, this bug is closed, you can mention this bug, but I think your problem isn't related with this one.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 11:01:25 2019 UTC