perl5-dbi / DBD-Oracle

Oracle database driver for the DBI module
http://search.cpan.org/dist/DBD-Oracle
18 stars 25 forks source link

InstantClient 18.3 support #68

Closed abraxxa closed 5 years ago

abraxxa commented 6 years ago

InstantClient 18.3 is available: http://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html Please add support for it. Version 1.74 detects it as version 8.0.0.0 and dies because support for that version was removed some time ago, the 1.75_40 trial detects it as 9.2.0.0. Thanks!

eserte commented 6 years ago

In 18.3 demo.mk was moved to a subdirectory, so Makefile.PL should also check for /usr/share/oracle/$1/client64/demo/demo.mk in addition to /usr/share/oracle/$1/client64/demo.mk for its location.

whindsx commented 6 years ago

@abraxxa export LD_LIBRARY_PATH=/lib:/usr/lib:/path/to/your/instantclient/lib perl Makefile.PL -m /path/to/your.mk -V 18.3.0.0.0

@eserte On what OS distro are you seeing the library under client64?

cjbj commented 6 years ago

The Linux Instant Client devel RPM's install demo.mk to paths like:

/usr/share/oracle/12.2/client64/demo/demo.mk
/usr/share/oracle/18.3/client64/demo/demo.mk

This is not new in 18.3

eserte commented 6 years ago

@whindsx : as cjbj already said, this is in the RPM package (in my case converted with alien into a .deb package, but this should not matter).

Also, I try to create a Debian package libdbd-oracle-perl using dh-make-perl, but in this environment it's not possible to inject options for Makefile.PL.

whindsx commented 6 years ago

The de facto method for getting the DBD::Oracle module installed on just about any system is building from source and has been this way for years. Building in general is less likely to work if you use the CPAN distribution rather than the Github master or CPAN-Dev. Even then some Makefile.PL options or even Makefile modification may necessary.

My best advice right now is to install Oracle Instant Client from the .zip files: basic, sdk, sqlplus. Extracting them all into the same instantclient_18_3 ORACLE_HOME directory.

Setting ORACLE_HOME, LD_LIBRARY_PATH and having SQLPlus installed in ORACLE_HOME will get you the correct version. But trying the same thing probably won't work when installing from an rpm since it spreads things out between /usr/share and /usr/lib. The rpm also lacks the sdk/ sub directory that Makefile.PL looks for as well.

I could fix/improve the above issues in Makefile.PL similar to what I've done before. But it really won't help many people if a proper release never makes it to CPAN. The last one being in 2014 and an upcoming release most recently talked about here #57. If an actual CPAN release goes up then the Debian Perl group can pick it up at some point and maybe we can get some proper .deb installs working too.

Also 18.3 fails the bind_param_inout() test in t/25plsql.t (#70). So I wouldn't go using it just yet anyways.

cjbj commented 6 years ago

Since installation is often a tricky thing for users, any build improvements are good. Python cx_Oracle added auto-detection and use of Instant Client RPMs via https://github.com/oracle/python-cx_Oracle/commit/f749e02fb44fbe9cc5b911efb9cc5f384d173d7a. PHP OCI8 has had it for some time.

The later move of cx_Oracle to ODPI-C removed all build (but not runtime) dependencies on Oracle Client, but this is a bigger task, see https://github.com/pythian/DBD-Oracle/issues/66

Install scripts that use ORACLE_HOME to locate Instant Client are a pet peeve of mine: Instant Client is not an Oracle Home and shouldn't need that variable!

djzort commented 5 years ago

We're in the process of curating a release. This would be great to get included.

djzort commented 5 years ago

This is related https://rt.cpan.org/Ticket/Display.html?id=127841

mjegh commented 5 years ago

Is this fixed now? Looks like we merged a change from @whindsx

whindsx commented 5 years ago

Yes, #74 fixed this.

The 25plsql.t issue is a still a problem with 18+ clients but is tracked in issue #70

Safe to close this one IMO.