|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-07-14 15:55 UTC] randy at greatplainsmfg dot com
Description:
------------
The php version is actually 5.2.6 however that version
is not a selection on the "PHP version". I don't think
that actually has any bearing on this issue.
ibm_db2 version 1.6.5 phpize's, configure's, and make's cleanly
Environment:
Solaris 10 (sparc)
Sun Studio 11
php 5.2.6
ibm_db2 version 1.6.6 phpize's and configure's cleanly.
It fails during the make. Following is the output of running
make:
spock% make
/bin/bash /files/source/apache/apache2.2/ibm_db2-1.6.6/libtool --mode=compile cc -I. -I/files/source/apache/apache2.2/ibm_db2-1.6.6 -DPHP_ATOM_INC -I/files/source/apache/apache2.2/ibm_db2-1.6.6/include -I/files/source/apache/apache2.2/ibm_db2-1.6.6/main -I/files/source/apache/apache2.2/ibm_db2-1.6.6 -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/opt/IBM/db2/V9.1/include -DHAVE_CONFIG_H -g -c /files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c -o ibm_db2.lo
mkdir .libs
cc -I. -I/files/source/apache/apache2.2/ibm_db2-1.6.6 -DPHP_ATOM_INC -I/files/source/apache/apache2.2/ibm_db2-1.6.6/include -I/files/source/apache/apache2.2/ibm_db2-1.6.6/main -I/files/source/apache/apache2.2/ibm_db2-1.6.6 -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/opt/IBM/db2/V9.1/include -DHAVE_CONFIG_H -g -c /files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c -KPIC -DPIC -o .libs/ibm_db2.o
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 1704: warning: function expects to return value: _php_db2_pconnect
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 1751: void function cannot return value
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 1952: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 2676: warning: argument #2 is incompatible with prototype:
prototype: pointer to unsigned char : "/opt/IBM/db2/V9.1/include/sqlcli.h", line 657
argument : pointer to char
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4857: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4869: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4882: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4895: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4908: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4922: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4935: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4964: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 4994: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5033: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5061: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5077: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5089: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5105: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5117: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5130: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5144: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5158: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5171: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5183: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5195: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5207: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5258: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5270: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5282: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5294: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5307: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5321: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5347: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5361: warning: statement not reached
"/files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c", line 5534: warning: assignment type mismatch:
pointer to char "=" pointer to unsigned char
cc: acomp failed for /files/source/apache/apache2.2/ibm_db2-1.6.6/ibm_db2.c
*** Error code 1
make: Fatal error: Command failed for target `ibm_db2.lo'
spock%
It appears that the problem is line 1751 in ibm_db2.c
where a void function PHP_FUNCTION(db2_pconnect) is attempting to return a value.
Comparing this to the same function in version 1.6.5 we
can see that version 1.6.5 is a lot different.
Expected result:
----------------
Expected result is that make runs successfully like it
does with ibm_db2 version 1.6.5 and previous versions.
Actual result:
--------------
See the output in the description section.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Hi Tarun: I have the same problem with ibm_db2 1.7.0. The problem code is this: PHP_FUNCTION(db2_pconnect) { return _php_db2_pconnect(INTERNAL_FUNCTION_PARAM_PASSTHRU); } Which starts on line 1749 in 1.6.6 and line 1834 in 1.7.0. You have a function defined as void and you are returning a value. This is a problem. Take a look at the same function in 1.6.5 and you will notice that unless PASE is defined there is no return value. Thanks RandyHi Tarun: The patch you sent works. The patch changed the problem function from this: PHP_FUNCTION(db2_pconnect) { return _php_db2_pconnect(INTERNAL_FUNCTION_PARAM_PASSTHRU); } To this: PHP_FUNCTION(db2_pconnect) { _php_db2_pconnect(INTERNAL_FUNCTION_PARAM_PASSTHRU); } I am changing the status of this bug to "Closed". Thanks for the prompt help. RandyI am reopening this bug. Evidently the patch I was sent for 1.7.0 never made it into production because the same issue (with functions defined as void returning a value) still exists in 1.8.2. The problem code is this: PHP_FUNCTION(db2_close) { return _php_db2_close_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } Which starts on line 2560 in 1.8.2. You have a function defined as void and you are returning a value. This is a definite problem.