Skipping incompatible lclntsh

Received this error whilst make-ing oci8 for PHP. It was a fresh install of 64-bit CentOS 5.4 w/ Oracle XE 10g installed; e.g.

$ sudo make
.
.
.
/usr/bin/ld: skipping incompatible /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so when searching for -lclntsh
/usr/bin/ld: cannot find -lclntsh
$

So I checked for /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so — it was there, but for some reason it was “incompatible”. Google helped once again. The problem was that the 10g RPM was 32-bit, but I was compiling a 64-bit version of oci8. how vague is that?

To resolve the issue, I installed the 64-bit -basic, -devel versions of Oracle Instant Client. Obviously I was being a smart-ass, since I thought that the XE RPM would’ve been sufficient, not!

When running the configure script, prepend with the path to Oracle Instsnt Client:

$ phpize
$ ./configure -with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib
$ sudo make
$ sudo make install

Hopefully this helps the next one confounded by “skipping incompatible lcntsh”.

Advertisements