I have a linux server CentOS Linux release 8.5.2111.
I'm trying to compile PDO_IBM extension.
I have php 7.4.
I have installed ibm driver package
tar -xvzf ibm_data_server_driver_package_linuxx64_v11.5.tar.gz
mv dsdriver /opt/ibm/
cd /opt/ibm/dsdriver
./installDSDriver
After that
export IBM_DB_HOME=/opt/ibm/dsdriver
pecl install ibm_db2
Everything is good: I can see the new ext with pecl list
After that (PDO_IBM 1.5.0)
pecl download PDO_IBM
cd to PDO dir
phpize --clean
phpize
./configure
make
make install
The first error is
/bin/sh /home/PDO_IBM-1.5.0/libtool --mode=link cc -DPHP_ATOM_INC -I/home/PDO_IBM-1.5.0/include -I/home/PDO_IBM-1.5.0/main -I/home/PDO_IBM-1.5.0 -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 -I/include -DHAVE_CONFIG_H -g -O2 -o pdo_ibm.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/PDO_IBM-1.5.0/modules pdo_ibm.lo ibm_driver.lo ibm_statement.lo -Wl,-rpath, -L -ldb2
libtool: error: require no space between '-L' and '-ldb2'
If i try to edit MakeFile and correct the space
libtool: error: cannot determine absolute directory name of '-ldb2'
Where I'm wrong?
Find the solution: the compiler expect to found lib X64 file in /opt/ibm/lib64 but from default dsdriver setup create two folder: lib32 for X32 and lib for X64. just create a copy and the compiler works well. Also i need to add:
./configure --with-pdo-ibm=/opt/ibm/dsdriver
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.