Here’s my quick guide on compiling IBM_DB2 PHP extension module (IBM_DB2.so) from source.  The version i was working with was 1.9.9.  I’m still having some troubles with this extension so i’ll update this guide when I figure out why i’m getting this runtime error with the extension:

#after loading ibm_db2.so
php -v

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303/ibm_db2.so’ – rtld: 0712-001 Symbol __cxa_finalize was referenced
from module /usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303/ibm_db2.so(), but a runtime definition
of the symbol was not found.

 

Background info

phpize command prepares the build environment for a PHP extension.
configure gets the software ready to be built on your specific system. Ensures dependencies are available and what it needs to know to use them for build and install process.
For example if your compiling c you’ll need a c compiler like gcc and configure will find it amongst other things
gmake controls the generation of executables and other non-source files of a program from the program’s source files.
gmake test runs test scripts against the created executable to make sure its working properly (funcitonal tests)
gmake install will install the application. In the case of a PHP Extension it should move the extension into the PHP extension folder.

The && operator chains all the commands into one line.
phpize && ./configure –build=$CCHOST –host=$CCHOST –target=$CCHOST && gmake && gmake test && gmake install
execute phpize, if it returns zero exit status, execute ./configure, if it returns zero exit status, …

Actual Script to build the extension

#get latest ibm_db2 php extension tarbal (can't use wget for https, using curl and ignoring ssl [we don't need this data encrypted])
#and installs it to /usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303/ibm_db2.so
#note depending on how PHP is configured on your system their will be either be a debug build or Zend Thread Safety (ZTS) builds of the extension
#$PREFIX/lib/php/extensions/no-debug-non-zts-API_NO for release builds without ZTS
#$PREFIX/lib/php/extensions/debug-non-zts-API_NO for debug builds without ZTS
#$PREFIX/lib/php/extensions/no-debug-zts-API_NO for release builds with ZTS
#$PREFIX/lib/php/extensions/debug-zts-API_NO for debug builds with ZTS
joe /usr/local/phpdave7/lib/php.ini
#add extension=ibm_db2.so
#Get the ibm_db2 source
curl https://pecl.php.net/get/ibm_db2-1.9.9.tgz –insecure > ibm_db2-1.9.9.tgz
#Extract the archive file. If you dont have this tar feature try “`gzip -dc ibm_db2-1.9.9.tgz | tar xvf -“`
tar zxvf ibm_db2-1.9.9.tgz
#1) Copy SQ headers
#Specific issue to litmis spaces: /usr/include/sql.h -> ../../opt/freeware/include/sql.h
#rm /usr/include/sql.h on litmis space to try not have a symlink
/*Backup existing files in /usr/include*/
mkdir -p ~/backup/usr/include/ && cp /usr/include/sql* ~/backup/usr/include/ && ls ~/backup/usr/include/
/*Tony's way*/
joe zzcopyincludes.sh
#!/QOpenSys/usr/bin/ksh
ls /QIBM/include/sql* > ./list2
for i in $(< ./list2)
do
echo "PREPARATION COPY"
system -v "CPY OBJ('$i') TODIR('/usr/include/') TOCCSID(*STDASCII) DTAFMT(*TEXT) REPLACE(*YES)"
done
./zzcopyincludes.sh
/*CPY not working maybe try qsh_out */
#qsh_out -c 'cat /qsys.lib/qsysinc.lib/h.file/sqlcli.mbr' > /usr/include/sqlcli.h
#litmis
cp /QOpenSys/usr/include/sql* /usr/include/
#2) Create sqlcli1.h to match LUW compiles
joe /usr/include/sqlcli1.h
#ifndef SQL_H_SQLCLI1
#include "sqlcli.h";
#endif
#3) common symbolic links
#ln -sf /QOpenSys/opt/freeware/bin /usr/local/bin
#ln -sf /QOpenSys/opt/freeware/lib /usr/local/lib
#Rather not create hard links try and figure alternative
export PATH=/opt/freeware/bin:$PATH
#4) make a copy of our current ibm_db2.so extension
cp /usr/local/zendsvr/lib/php_extensions/ibm_db2.so /usr/local/zendsvr/lib/php_extensions/ibm_db2.so-orig
#if you have two libiconv.a you'll have to fix that or the libpath might cause issues
#setup environment variables for configure and make
export IBM_DB_HOME=/usr
export PHP_HOME=/usr/local/phpdave7
export PASE_TOOLS_HOME=/QOpenSys/usr
export AIX_TOOLS_HOME=/usr/local
export PATH=$PATH:$PHP_HOME/bin:$PASE_TOOLS_HOME/bin:$AIX_TOOLS_HOME/bin
export LIBPATH=$PHP_HOME/lib:$PASE_TOOLS_HOME/lib:$AIX_TOOLS_HOME/lib
export CC=gcc
export CFLAGS="-DPASE -I=.:$PHP_HOME/php/include"
export CCHOST=powerpc-ibm-aix6.1.0.0
#Had tp remove LIBPATH w/ $PASE_TOOLS_HOME because it was using the wrong libiconv
#export LIBPATH=/usr/local/phpdave7/lib:/usr/local/lib
#php -v
#Could not load program php:
# Dependent module /QOpenSys/usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
# Member libiconv.so.2 is not found in archive
#check the versions
php -v
gcc -v
Target: powerpc-ibm-aix6.1.0.0 … used in CCHOST above
#compile php extension
phpize && ./configure –build=$CCHOST –host=$CCHOST –target=$CCHOST && gmake && gmake test && gmake install
#-d will force temporary loading the extension (add extension=ibm_db2.so to permenantly always load it) –ri display the configuration of an extension
php -dextension=ibm_db2.so –ri ibm_db2
#check what php extension modules are loaded
php -m
#References:
#1. http://www.youngiprofessionals.com/wiki/index.php/XMLService/PHPDB2Install
#2. http://yips.idevcloud.com/wiki/index.php/PHP/DB2Connection – In depth article on ibm_db2
#3. https://pecl.php.net/package/ibm_db2
#4. https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/GCC
#5. http://www.deloli.net/distrib-2.1_compil_script.txt
#6. https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.swg.im.dbclient.php.doc/doc/t0011926.html
#7. https://wiki.php.net/internals/extensions
#8. http://www.phpinternalsbook.com/build_system/building_extensions.html
#Debugging some encoding issue (If you are working with a db2 project, you will need to copy ILE db2 headers (EBCDIC) (/QIBM/include/sql) into PASE headers (ASCII).)
#cat /QOpenSys/opt/freeware/include/sql.h
#a\@�����m���������m���m���������m������@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\a@@@@@@@@@a\@㈉�@��@��@���������
ls -all /usr/include/sql*
-rwx—— 1 usrcis42 0 9840 Jun 2 11:04 /usr/include/sqlca.h
-rwx—— 1 usrcis42 0 0 Jun 5 11:48 /usr/include/sqlcli.h
-rw——- 1 usrcis42 0 89 Jun 2 11:04 /usr/include/sqlcli1.h
-rw——- 1 usrcis42 0 56 May 23 08:53 /usr/include/sqlcli1.h~
-rwx—— 1 usrcis42 0 16400 Jun 2 11:04 /usr/include/sqlda.h
lrwxrwxrwx 1 usrcis42 0 68 May 30 19:07 /usr/include/sqldb.h –> ../../opt/freeware/include/sqldb.h
-rwx—— 1 usrcis42 0 17920 Jun 2 11:04 /usr/include/sqlenv.h
lrwxrwxrwx 1 usrcis42 0 70 May 30 19:07 /usr/include/sqlext.h –> ../../opt/freeware/include/sqlext.h
-rwx—— 1 usrcis42 0 12400 Jun 2 11:04 /usr/include/sqlfp.h
lrwxrwxrwx 1 usrcis42 0 74 May 30 19:07 /usr/include/sqlfront.h –> ../../opt/freeware/include/sqlfront.h
lrwxrwxrwx 1 usrcis42 0 72 May 30 19:07 /usr/include/sqlite3.h –> ../../opt/freeware/include/sqlite3.h
lrwxrwxrwx 1 usrcis42 0 78 May 30 19:07 /usr/include/sqlite3ext.h –> ../../opt/freeware/include/sqlite3ext.h
-rwx—— 1 usrcis42 0 21840 Jun 2 11:04 /usr/include/sqlscds.h
-rwx—— 1 usrcis42 0 71440 Jun 2 11:04 /usr/include/sqlstate.h
-rwx—— 1 usrcis42 0 12400 Jun 2 11:04 /usr/include/sqlsystm.h
lrwxrwxrwx 1 usrcis42 0 74 May 30 19:07 /usr/include/sqltypes.h –> ../../opt/freeware/include/sqltypes.h
lrwxrwxrwx 1 usrcis42 0 74 May 30 19:07 /usr/include/sqlucode.h –> ../../opt/freeware/include/sqlucode.h
-rwx—— 1 usrcis42 0 65360 Jun 2 11:04 /usr/include/sqludf.h
need to run:
zzcopyincludes.sh :
#!/QOpenSys/usr/bin/ksh
ls /QIBM/include/sql* > ./list2
for i in $(< ./list2)
do
echo "PREPARATION COPY"
system -v "CPY OBJ('$i') TODIR('/usr/include/') TOCCSID(*STDASCII) DTAFMT(*TEXT) REPLACE(*YES)"
done
/*Running of configure, make and make install*/
[usrcis42@SPACES]~/ibm_db2-1.9.9% ./configure –build=$CCHOST –host=$CCHOST –target=$CCHOST && gmake && gmake install
checking for grep that handles long lines and -e… /opt/freeware/bin/grep
checking for egrep… /opt/freeware/bin/grep -E
checking for a sed that does not truncate output… /opt/freeware/bin/sed
checking for powerpc-ibm-aix6.1.0.0-cc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking how to run the C preprocessor… gcc -E
checking for icc… no
checking for suncc… no
checking whether gcc and cc understand -c and -o together… yes
checking for system library directory… lib
checking if compiler supports -R… no
checking if compiler supports -Wl,-rpath,… no
checking build system type… powerpc-ibm-aix6.1.0.0
checking host system type… powerpc-ibm-aix6.1.0.0
checking target system type… powerpc-ibm-aix6.1.0.0
checking for PHP prefix… /usr/local/phpdave7
checking for PHP includes… -I/usr/local/phpdave7/include/php -I/usr/local/phpdave7/include/php/main -I/usr/local/phpdave7/include/php/TSRM -I/usr/local/phpdave7/include/php/Zend -I/usr/local/phpdave7/include/php/ext -I/usr/local/phpdave7/include/php/ext/date/lib
checking for PHP extension directory… /usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303
checking for PHP installed headers prefix… /usr/local/phpdave7/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk… no
checking for nawk… no
checking for awk… awk
checking if awk is broken… no
checking for IBM_DB2 support… yes, shared
checking PHP… Could not load program php:
Dependent module /QOpenSys/usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
Member libiconv.so.2 is not found in archive
./configure[4154]: test: argument expected
Detected 32-bit PHP
checking IBM_DB_HOME location… /usr
checking Looking for DB2 CLI libraries… checking in /usr…
checking in /usr/lib32…
checking in /usr/lib… found
checking for DB2 CLI include files in default path… checking in /usr… found in /usr
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… no
checking for /usr/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /opt/freeware/bin/nm -B
checking whether ln -s works… yes
checking how to recognize dependent libraries… pass_all
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking the maximum length of command line arguments… 262144
checking command to parse /opt/freeware/bin/nm -B output from gcc object… ok
checking for objdir… .libs
checking for powerpc-ibm-aix6.1.0.0-ar… no
checking for ar… ar
checking for powerpc-ibm-aix6.1.0.0-ranlib… no
checking for ranlib… no
checking for powerpc-ibm-aix6.1.0.0-strip… no
checking for strip… no
checking if gcc supports -fno-rtti -fno-exceptions… ./configure[7356]: diff: not found
no
checking for gcc option to produce PIC…
checking if gcc static flag -static works… no
checking if gcc supports -c -o file.o… yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… aix6.1.0.0 ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… no
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
/bin/sh /home/USRCIS42/ibm_db2-1.9.9/libtool –mode=compile gcc -DPASE -I. -I/home/USRCIS42/ibm_db2-1.9.9 -DPHP_ATOM_INC -I/home/USRCIS42/ibm_db2-1.9.9/include -I/home/USRCIS42/ibm_db2-1.9.9/main -I/home/USRCIS42/ibm_db2-1.9.9 -I/usr/local/phpdave7/include/php -I/usr/local/phpdave7/include/php/main -I/usr/local/phpdave7/include/php/TSRM -I/usr/local/phpdave7/include/php/Zend -I/usr/local/phpdave7/include/php/ext -I/usr/local/phpdave7/include/php/ext/date/lib -DHAVE_CONFIG_H -DPASE -I=.:/usr/local/phpdave7/php/include -c /home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c -o ibm_db2.lo
mkdir .libs
gcc -DPASE -I. -I/home/USRCIS42/ibm_db2-1.9.9 -DPHP_ATOM_INC -I/home/USRCIS42/ibm_db2-1.9.9/include -I/home/USRCIS42/ibm_db2-1.9.9/main -I/home/USRCIS42/ibm_db2-1.9.9 -I/usr/local/phpdave7/include/php -I/usr/local/phpdave7/include/php/main -I/usr/local/phpdave7/include/php/TSRM -I/usr/local/phpdave7/include/php/Zend -I/usr/local/phpdave7/include/php/ext -I/usr/local/phpdave7/include/php/ext/date/lib -DHAVE_CONFIG_H -DPASE -I=.:/usr/local/phpdave7/php/include -c /home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c -DPIC -o .libs/ibm_db2.o
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_column_privileges':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3383:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3383:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3383:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3383:5: warning: passing argument 8 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_columns':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3458:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3458:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3458:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3458:5: warning: passing argument 8 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_foreign_keys':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3528:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3528:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3528:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_primary_keys':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3603:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3603:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3603:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_procedure_columns':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3677:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3677:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3677:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3677:5: warning: passing argument 8 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&column_name, &column_name_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_procedures':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3746:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3746:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3746:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_special_columns':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3817:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3817:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3817:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_statistics':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3892:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3892:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3892:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_table_privileges':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3967:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3967:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:3967:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
NULL, NULL);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c: In function 'zif_db2_tables':
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:4045:5: warning: passing argument 2 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&table_type, &table_type_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:4045:5: warning: passing argument 4 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&table_type, &table_type_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:4045:5: warning: passing argument 6 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&table_type, &table_type_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:4045:5: warning: passing argument 8 of '_php_db2_meta_helper' from incompatible pointer type [enabled by default]
&table_type, &table_type_len);
^
/home/USRCIS42/ibm_db2-1.9.9/ibm_db2.c:508:13: note: expected 'int *' but argument is of type 'size_t *'
static void _php_db2_meta_helper(SQLCHAR **qualifier, int *qualifier_len,
^
/bin/sh /home/USRCIS42/ibm_db2-1.9.9/libtool –mode=link gcc -DPHP_ATOM_INC -I/home/USRCIS42/ibm_db2-1.9.9/include -I/home/USRCIS42/ibm_db2-1.9.9/main -I/home/USRCIS42/ibm_db2-1.9.9 -I/usr/local/phpdave7/include/php -I/usr/local/phpdave7/include/php/main -I/usr/local/phpdave7/include/php/TSRM -I/usr/local/phpdave7/include/php/Zend -I/usr/local/phpdave7/include/php/ext -I/usr/local/phpdave7/include/php/ext/date/lib -DHAVE_CONFIG_H -DPASE -I=.:/usr/local/phpdave7/php/include -Wl,-G -o ./ibm_db2.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/USRCIS42/ibm_db2-1.9.9/modules ibm_db2.lo -L/usr/lib/ -L/usr/lib/ -ldb400 && mv -f ./.libs/ibm_db2.so ./ibm_db2.so
generating symbol list for `ibm_db2.la'
/opt/freeware/bin/nm -B -Bpg .libs/ibm_db2.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > ./.libs/ibm_db2.exp
gcc -shared -o ./.libs/ibm_db2.so .libs/ibm_db2.o -L/usr/lib/ -ldb400 -lc -Wl,-bnoentry -Wl,-G -Wl,-bE:./.libs/ibm_db2.exp ${wl}-berok
ar cru ./.libs/ibm_db2.a ./.libs/ibm_db2.so
creating ./ibm_db2.la
(cd ./.libs && rm -f ibm_db2.la && ln -s ../ibm_db2.la ibm_db2.la)
/bin/sh /home/USRCIS42/ibm_db2-1.9.9/libtool –mode=install cp ./ibm_db2.so /home/USRCIS42/ibm_db2-1.9.9/modules
cp ./ibm_db2.so /home/USRCIS42/ibm_db2-1.9.9/modules/ibm_db2.so
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303/
#Reference yips website: yips.idevcloud.com/