php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59558 declaration warnings - missing headers
Submitted: 2011-01-03 10:53 UTC Modified: 2011-01-05 05:03 UTC
From: remicollet@php.net Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.2 OS: GNU/Linux (Fedora 14)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: remicollet@php.net
New email:
PHP Version: OS:

 

 [2011-01-03 10:53 UTC] remicollet@php.net
Description:
------------
make

Patch proposal.
https://github.com/remicollet/remirepo/raw/5fd5179fa11516bd5316663daebb96b75115df84/php-pecl-rrd/rrd-build.patch

This patch add some include to avoid warning.

It also try to fix the rrd_lastupdate call, but this must be checked/reviewed.

Reproduce code:
---------------
make


Expected result:
----------------
Build complete.

Actual result:
--------------
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_graph.c: In function 'zim_RRDGraph_save':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_graph.c:218:3: warning: implicit declaration of function 'zend_throw_exception'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_graph.c:218:3: warning: implicit declaration of function 'zend_exception_get_default'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_graph.c: In function 'zim_RRDGraph_saveVerbose':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_graph.c:285:30: warning: unused variable 'data_p'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_create.c: In function 'zim_RRDCreator___construct':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_create.c:126:3: warning: implicit declaration of function 'zend_throw_exception'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_create.c:126:3: warning: implicit declaration of function 'zend_exception_get_default'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_update.c: In function 'zim_RRDUpdater_update':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_update.c:146:4: warning: implicit declaration of function 'zend_throw_exception'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd_update.c:146:4: warning: implicit declaration of function 'zend_exception_get_default'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c: In function 'zif_rrd_lastupdate':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c:247:3: error: too many arguments to function 'rrd_lastupdate'
/usr/include/rrd.h:198:9: note: declared here
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c: In function 'zm_info_rrd':
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c:555:2: warning: implicit declaration of function 'php_info_print_table_start'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c:556:2: warning: implicit declaration of function 'php_info_print_table_header'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c:557:2: warning: implicit declaration of function 'php_info_print_table_row'
/home/rpmbuild/BUILD/php-pecl-rrd-0.9.0/rrd-0.9.0/rrd.c:558:2: warning: implicit declaration of function 'php_info_print_table_end'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-03 12:23 UTC] koubel at seznam dot cz
I have no include reason warnings. I use php 5.3.2 installed from php.net sources. Maybe exception and info headers are included via php.h and your distro php version has some difference in it. But I can add this headers, no problem.

I verify rrd_lastupdate_r, maybe it isn't supported in current debian stable (my dev machine). If really isn't, you would need to wait for next debian stable release. Is it a problem for you?
 [2011-01-03 13:43 UTC] fedora at famillecollet dot com
I'm not a debian user, but a fedora user.
AFAIK debian provides rrdtool 1.3.1 in lenny (stable) and 1.4.3 in sid (unstable).
http://packages.debian.org/search?keywords=rrdtool

Fedora 13 provides 1.3.8
Fedora 14 provides 1.4.4
http://rpms.famillecollet.com/rpmphp/zoom.php?rpm=rrdtool

In rrdtool-1.3.1/src/rrd.h
    int       rrd_lastupdate(
    int argc,
    char **argv,
    time_t *last_update,
    unsigned long *ds_cnt,
    char ***ds_namv,
    char ***last_ds);
    time_t    rrd_first(
    int,
    char **);

In rrdtool-1.4.5/src/rrd.h
    int rrd_lastupdate(int argc, char **argv);
    int rrd_lastupdate_r (const char *filename,
            time_t *ret_last_update,
            unsigned long *ret_ds_count,
            char ***ret_ds_names,
            char ***ret_last_ds);

I'm searching for a way to add conditional stuff around this call...
 [2011-01-04 05:33 UTC] koubel at seznam dot cz
zend_exceptions.h header added (just zend_exceptions.h, no  Zend/zend_exceptions.h) - http://svn.php.net/viewvc?view=revision&revision=307067

thank you for investigation for rrd_lastupdate_r. I think we can wait for new debian stable, then I upgrade code, new major version of extension will be released - BC break. I think new debian will be released soon. 

For conditional compilation - some work in config.m4 and C code is needed. I don't want to spend time with it, it needs compilation of rrd from sources. I choose debian stable rrd version as version which will be supported in stable extension version.
 [2011-01-04 13:12 UTC] fedora at famillecollet dot com
I'm really disappointed by your anwser.

How can you consider debian as "the only distribution in the world" ? Please, open your mind !

I'm really sorry to read this.
I think, your extension will not be available in Fedora/Redhat repository before a very very long time (in all case, I will not work for it).
 [2011-01-05 05:03 UTC] koubel at seznam dot cz
maybe little misunderstanding

I think debian is most conservative distro maybe most widely used, so support for version in this distro is good choice.

If you need support for rrd_lastupdate_r for your distro, make a patch for it in sense of my previous comment (for config.m4, rrd.c), I will test it in my debian stable, if it will work, it will be integrated into extension without any problem.

So my mind is open for your patches for good extension work in fedora and I'm looking forward to see rrd extension in fedora distro.

Create new bug for your upcoming patch please
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC