php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62229 apd-1.0.1 not compiling on php-5.4.3
Submitted: 2012-06-05 03:01 UTC Modified: 2015-02-26 07:36 UTC
Votes:6
Avg. Score:5.0 ± 0.0
Reproduced:6 of 6 (100.0%)
Same Version:5 (83.3%)
Same OS:6 (100.0%)
From: abhiklahiri at gmail dot com Assigned:
Status: Suspended Package: apd (PECL)
PHP Version: 5.4.3 OS: Red Hat 4.1.2-51
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: abhiklahiri at gmail dot com
New email:
PHP Version: OS:

 

 [2012-06-05 03:01 UTC] abhiklahiri at gmail dot com
Description:
------------
I am trying to build apd-1.0.1 on php-5.4.3
After running ./configure, when I execute make install, it gives the following 
compile errors:

[alahiri@kronos apd-1.0.1]$ make install
/bin/sh /home/alahiri/apd-1.0.1/libtool --mode=compile cc  -I. -
I/home/alahiri/apd-1.0.1 -DPHP_ATOM_INC -I/home/alahiri/apd-1.0.1/include -
I/home/alahiri/apd-1.0.1/main -I/home/alahiri/apd-1.0.1 -
I/home/alahiri/include/php -I/home/alahiri/include/php/main -
I/home/alahiri/include/php/TSRM -I/home/alahiri/include/php/Zend -
I/home/alahiri/include/php/ext -I/home/alahiri/include/php/ext/date/lib  -
DHAVE_CONFIG_H  -g -O2   -c /home/alahiri/apd-1.0.1/php_apd.c -o php_apd.lo 
 cc -I. -I/home/alahiri/apd-1.0.1 -DPHP_ATOM_INC -I/home/alahiri/apd-
1.0.1/include -I/home/alahiri/apd-1.0.1/main -I/home/alahiri/apd-1.0.1 -
I/home/alahiri/include/php -I/home/alahiri/include/php/main -
I/home/alahiri/include/php/TSRM -I/home/alahiri/include/php/Zend -
I/home/alahiri/include/php/ext -I/home/alahiri/include/php/ext/date/lib -
DHAVE_CONFIG_H -g -O2 -c /home/alahiri/apd-1.0.1/php_apd.c  -fPIC -DPIC -o 
.libs/php_apd.o
/home/alahiri/apd-1.0.1/php_apd.c:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘apd_functions’
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘apd_get_active_function_name’:
/home/alahiri/apd-1.0.1/php_apd.c:282: warning: assignment discards qualifiers 
from pointer target type
/home/alahiri/apd-1.0.1/php_apd.c:286: warning: assignment discards qualifiers 
from pointer target type
/home/alahiri/apd-1.0.1/php_apd.c:293: warning: assignment discards qualifiers 
from pointer target type
/home/alahiri/apd-1.0.1/php_apd.c:304: error: ‘znode_op’ has no member named ‘u’
/home/alahiri/apd-1.0.1/php_apd.c: At top level:
/home/alahiri/apd-1.0.1/php_apd.c:418: error: ‘apd_functions’ undeclared here 
(not in a function)
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘zif_override_function’:
/home/alahiri/apd-1.0.1/php_apd.c:595: warning: ‘zend_get_parameters_ex’ is 
deprecated (declared at /home/alahiri/include/php/Zend/zend_API.h:233)
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘zif_rename_function’:
/home/alahiri/apd-1.0.1/php_apd.c:649: warning: ‘zend_get_parameters_ex’ is 
deprecated (declared at /home/alahiri/include/php/Zend/zend_API.h:233)
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘apd_pprof_header’:
/home/alahiri/apd-1.0.1/php_apd.c:704: warning: assignment discards qualifiers 
from pointer target type
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘zif_apd_set_pprof_trace’:
/home/alahiri/apd-1.0.1/php_apd.c:772: warning: ‘zend_get_parameters_ex’ is 
deprecated (declared at /home/alahiri/include/php/Zend/zend_API.h:233)
/home/alahiri/apd-1.0.1/php_apd.c: In function ‘apd_zend_startup’:
/home/alahiri/apd-1.0.1/php_apd.c:947: error: ‘struct _zend_compiler_globals’ has 
no member named ‘extended_info’
make: *** [php_apd.lo] Error 1

Expected result:
----------------
Expected result - the apd-1.0.1 package should at least compile without errors!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-05 23:36 UTC] mmucklo at corp dot oodle dot com
change function_entry to zend_function_entry

Had the same problem and found this note:
https://github.com/indeyets/syck/pull/7
 [2012-06-08 19:12 UTC] keith dot burgoyne at gmail dot com
I also have the problem. mmucklo, could you please elaborate a little further, or 
perhaps include a patch? I've changed function_entry to zend_function_entry on 
line 73 of php_apd.c, and I still get compilation errors:


/so/rpms/rpmbuild-centos6/BUILD/php-pecl-apd-1.0.1/apd-1.0.1/php_apd.c:324: 
error: 'znode_op' has no member named 'u'
 [2012-06-29 19:10 UTC] mmucklo at corp dot oodle dot com
You're right, there are a few other fixes to make (which I was able to cobble 
together from other places), including these fixes:

https://bugs.php.net/bug.php?id=58798

and some hints from:

https://github.com/facebook/xhprof/commit/a6bae51236

Here's a patch that makes things compile for me:

--- ../apd-1.0.1/php_apd.c      2012-06-29 12:01:48.059814181 -0700
+++ php_apd.c   2012-06-29 11:52:53.441691524 -0700
@@ -70,7 +70,7 @@ ZEND_DECLARE_MODULE_GLOBALS(apd);

 /* List of exported functions. */

-function_entry apd_functions[] = {
+zend_function_entry apd_functions[] = {
        PHP_FE(override_function, NULL)
        PHP_FE(rename_function, NULL)
        PHP_FE(apd_set_pprof_trace, NULL)
@@ -321,7 +321,11 @@ char *apd_get_active_function_name(zend_
                        }
                }
                else {
+#if ZEND_EXTENSION_API_NO >= 220100525
+                       switch (execd->opline->extended_value) {
+#else
                        switch (execd->opline->op2.u.constant.value.lval) {
+#endif
                        case ZEND_EVAL:
                                funcname = estrdup("eval");
                                break;
@@ -964,7 +968,7 @@ ZEND_DLEXPORT void onStatement(zend_op_a
 int apd_zend_startup(zend_extension *extension)
 {
        TSRMLS_FETCH();
-       CG(extended_info) = 1;  /* XXX: this is ridiculous */
+       CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
        return zend_startup_module(&apd_module_entry);
 }

--- ../apd-1.0.1/php_apd.h      2012-06-29 12:02:48.662730627 -0700
+++ php_apd.h   2012-06-29 11:46:05.138332602 -0700
@@ -89,7 +89,7 @@ void printUnsortedSummary(struct timeval
 extern zend_module_entry apd_module_entry;
 #define apd_module_ptr &apd_module_entry

-#define APD_VERSION "0.9"
+#define APD_VERSION "1.0.1"

 #define FUNCTION_TRACE 1
 #define ARGS_TRACE 2
 [2015-02-26 07:36 UTC] krakjoe@php.net
-Status: Open +Status: Suspended
 [2015-02-26 07:36 UTC] krakjoe@php.net
APD hasn't had a release in 10 years, this means it's source code is way out of sync with modern PHP.

I'm going to mark this bug as suspended, the report can still be found if a maintainer for APD comes forward.

Sorry about the wait.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC