I'm trying to build PHP 5.6.17 from source on FreeBSD 10 with libmcrypt-2.5.8 enabled, as per http://php.net/manual/en/mcrypt.requirements.php . The libmcrypt build seems to go OK using make EXTRACFLAGS=-fPIC :
root#dev% dir /usr/local/lib/*mcry*
-rw-r--r-- 1 root wheel 1033370 Jan 14 11:30 /usr/local/lib/libmcrypt.a
-rwxr-xr-x 1 root wheel 746 Jan 14 11:30 /usr/local/lib/libmcrypt.la
After :
./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/etc \
--enable-bcmath --without-cdb \
--with-gd --with-mysql=/usr/local/mysql \
--without-iodbc --enable-inline-optimization \
--without-gdbm --with-ndbm --without-db2 \
--without-dbm --without-readline --without-recode \
--with-openssl --without-db3 --enable-dba \
--with-curl --with-jpeg-dir=/usr/local/lib --enable-calendar \
--with-mhash --enable-mbstring=all --with-png-dir=/usr/local/libpng \
--with-zlib --with-freetype-dir=/usr/local/lib \
--with-pdo-mysql=mysqlnd --enable-exif --with-libxml-dir=/usr/local/lib \
--enable-zip \
--with-imap=/usr/local/imap-2007f \
--with-mcrypt
Configure output relating to mcrypt:
checking for mcrypt support... yes
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... no
checking for mcrypt_module_open in -lmcrypt... yes
I get this error when I 'make'
/usr/bin/ld: /usr/local/lib/libmcrypt.a(mcrypt_extra.o): relocation R_X86_64_32 against `mps' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmcrypt.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make: stopped in /usr/local/dev_build_sources/php-5.6.17
I've previously been able to build using these steps in PHP 5.6.6
This question https://serverfault.com/questions/357020/how-can-i-install-enable-mcrypt-without-re-installing-php suggested making mcrypt (why not libmcrypt?) an extension, but the mcrypt make kept failing
EDIT - adding in result of trying to make the extension in php-5.6.17/ext/mcrypt it seems to fail saying it needs the -fPI flags, but they were already supplied..
root#dev% make EXTRACFLAGS=-fPIC
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=compile cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -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/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt.c -o mcrypt.lo
mkdir .libs
cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -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/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt.c -fPIC -DPIC -o .libs/mcrypt.o
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=compile cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -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/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c -o mcrypt_filter.lo
cc -I. -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -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/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c -fPIC -DPIC -o .libs/mcrypt_filter.o
/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/mcrypt_filter.c:210:37: warning: passing 'const char *' to
parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
mcrypt_module = mcrypt_module_open(cipher, algo_dir, mode, mode_dir);
^~~~~~
/usr/local/include/mutils/mcrypt.h:38:34: note: passing argument to parameter 'algorithm' here
MCRYPT mcrypt_module_open(char *algorithm,
^
1 warning generated.
/bin/sh /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/include -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/main -I/usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt -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/usr/local/include -DHAVE_CONFIG_H -g -O2 -o ./mcrypt.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/dev_build_sources/TEMP_PHP/php-5.6.17/ext/mcrypt/modules mcrypt.lo mcrypt_filter.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lmcrypt
cc -shared .libs/mcrypt.o .libs/mcrypt_filter.o -L/usr/local/lib /usr/local/lib/libmcrypt.a -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,mcrypt.so -o ./.libs/mcrypt.so
/usr/bin/ld: /usr/local/lib/libmcrypt.a(mcrypt_extra.o): relocation R_X86_64_32 against `mps' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libmcrypt.a: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Got it working:
In the libmcrypt-2.5.8 source directory
./configure --disable-posix-threads --with-pic
Then make without any flags
PHP build went fine with above configure command and a plain make
Related
Please I am trying to compile gd with webp on azure web app
apt-get update && apt-get install -y libwebp-dev && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr && docker-php-ext-install gd
And i am getting this error , I tested it on 7.3 and it is working good
/bin/bash /usr/src/php/ext/gd/libtool --mode=compile cc -I/usr/src/php/ext/gd/libgd -I. -I/usr/src/php/ext/gd -DPHP_ATOM_INC -I/usr/src/php
/ext/gd/include -I/usr/src/php/ext/gd/main -I/usr/src/php/ext/gd -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/includ
e/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/libpng16 -fstac
k-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -D_
LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c /usr/src/php/ext/gd/libgd/gd.c -o libgd/gd.lo
/usr/src/php/ext/gd/libtool: line 1283: libgd/gd.loT: No such file or directory
mkdir libgd/.libs
mkdir: cannot create directory 'libgd/.libs': No such file or directory
make: *** [Makefile:197: libgd/gd.lo] Error 1
when I trying to install memcache on xampp using this commands
wget http://pecl.php.net/get/memcache-3.0.8.tgz
tar xf memcache-3.0.8.tgz
cd memcache-3.0.8
/opt/lampp/bin/phpize
./configure --enable-memcache --with-php-config=/opt/lampp/bin/php-config
make && make install
/opt/lampp/lampp restart
i get error after this line
make && make install
the full error message
/bin/bash /memcache-3.0.8/libtool --mode=compile cc
-I/opt/lampp/include/php -I. -I/memcache-3.0.8 -DPHP_ATOM_INC -I/memcache-3.0.8/include -I/memcache-3.0.8/main -I/memcache-3.0.8 -I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /memcache-3.0.8/memcache.c -o memcache.lo cc -I/opt/lampp/include/php -I. -I/memcache-3.0.8 -DPHP_ATOM_INC
-I/memcache-3.0.8/include -I/memcache-3.0.8/main -I/memcache-3.0.8 -I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /memcache-3.0.8/memcache.c -fPIC -DPIC -o .libs/memcache.o In file included from
/memcache-3.0.8/php_memcache.h:34:0,
from /memcache-3.0.8/memcache.c:30: /memcache-3.0.8/memcache_pool.h:45:47: fatal error:
ext/standard/php_smart_str_public.h: No such file or directory
include "ext/standard/php_smart_str_public.h"
^ compilation terminated. Makefile:193: recipe for target 'memcache.lo' failed make:
*** [memcache.lo] Error 1
I'm trying to install php amqp according to this answer https://stackoverflow.com/a/9997263/2271028
but at the make command i see following:
/bin/bash /var/www/rabbitmq-c/amqp-1.4.0/libtool --mode=compile cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -o amqp.lo
libtool: compile: cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -fPIC -DPIC -o .libs/amqp.o
In file included from /var/www/rabbitmq-c/amqp-1.4.0/amqp.c:46:0:
/var/www/rabbitmq-c/amqp-1.4.0/php_amqp.h:303:2: error: unknown type name 'amqp_socket_t'
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c: In function 'amqp_error':
/var/www/rabbitmq-c/amqp-1.4.0/amqp.c:616:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat]
make: *** [amqp.lo] Error 1
I see that there is some trouble with make, but can not resolve this problem.
Any ideas?
Thanks.
After some magic tryies i decided to install rabbitmq1 instead of rabbitmq0 that i can see in
aptitude search rabbitmq
command on my ubuntu 12.04 server.
i've manually installed
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq-dev_0.4.1-1_amd64.deb
and
http://security.ubuntu.com/ubuntu/pool/main/libr/librabbitmq/librabbitmq1_0.4.1-1_amd64.deb
and after that again repeated actions from https://stackoverflow.com/a/9997263/2271028
It helps!
Im having hard time install tcpwrap using pecl install and also tried manual install its giving me the following error on make. I appreciate any help on how to install tcpwrap properly.
running: make
/bin/sh /root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/libtool --mode=compile cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -o tcpwrap.lo
mkdir .libs
cc -I. -I/root/tmp/pear/tcpwrap -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/include -I/root/tmp/pear/pear-build-rootNwW6Vg/tcpwrap-1.1.3/main -I/root/tmp/pear/tcpwrap -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 -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/tcpwrap/tcpwrap.c -fPIC -DPIC -o .libs/tcpwrap.o
/root/tmp/pear/tcpwrap/tcpwrap.c:42: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtcpwrap_functionsâ
/root/tmp/pear/tcpwrap/tcpwrap.c:55: error: âtcpwrap_functionsâ undeclared here (not in a function)
make: *** [tcpwrap.lo] Error 1
ERROR: `make' failed
I tried many tutorials on how to install PDO_OCI on my openSuse 11.4 64bit machine and I couldn't get it to work.
What I do is:
wget http://pecl.php.net/get/PDO_OCI
tar -xzvf PDO_OCI-1.0.tgz
cd PDO_OCI-1.0/
phpize
and I get this output:
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
Despite the warnings I run:
./configure --with-pdo-oci
and it goes fine.
Then I run make and it stops:
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
mkdir .libs
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -fPIC -DPIC -o .libs/pdo_oci.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -o oci_driver.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -fPIC -DPIC -o .libs/oci_driver.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -o oci_statement.lo
gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -fPIC -DPIC -o .libs/oci_statement.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=link gcc -std=gnu99 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -o pdo_oci.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/modules pdo_oci.lo oci_driver.lo oci_statement.lo -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh
gcc -std=gnu99 -shared .libs/pdo_oci.o .libs/oci_driver.o .libs/oci_statement.o -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh -Wl,-rpath -Wl,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -Wl,-soname -Wl,pdo_oci.so -o .libs/pdo_oci.so
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib/libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [pdo_oci.la] Error 1
Any help is appreciated.
Have you tried either installing via. Yast (best option) or pecl (pecl install PDO_OCI)?
I patched config.m4 as follows:
--- config.m4.orig 2012-11-26 11:04:49.237538293 -0500
+++ config.m4 2012-11-26 11:31:35.693839416 -0500
## -208,15 +208,15 ##
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
- ifdef([PHP_CHECK_PDO_INCLUDES],
+ ifdef([PHP_CHECK_PDO_INCLUDES_CV],
[
- PHP_CHECK_PDO_INCLUDES
+ PHP_CHECK_PDO_INCLUDES_CV
],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
- elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
+ elif test -f $abs_srcdir/../pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/../../ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php/ext
else
Then invoked in php5-5.3.10/ext/pdo_oci:
autoconf -f
./configure
cp /usr/include/oracle/11.1.0.1/client64/* include/
make
Here is a relevant bug report.