Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl 5.36 cpan | DBD::Oracle installation #69

Open
shawnlaffan opened this issue Mar 13, 2023 · 12 comments
Open

perl 5.36 cpan | DBD::Oracle installation #69

shawnlaffan opened this issue Mar 13, 2023 · 12 comments

Comments

@shawnlaffan
Copy link
Contributor

We need the Oracle Instant Client 64bit for DBD::Oracle

{ module=>'DBD::Oracle', makefilepl_param=>'-V 12.2.0.1.0', env=>{ ORACLE_HOME=>'c:\ora122instant64' }, skiptest=>1 }, ## requires Oracle Instant Client 64bit!!!

@shawnlaffan
Copy link
Contributor Author

@genio - looks like we need to add the Oracle Instant Client to the docker image. The path is from a local machine used for the 5.32 builds, I assume.

I am not sure which of the downloads should be used for this.
https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html

@genio
Copy link
Member

genio commented Mar 21, 2023

https://github.com/gwenshap/DBD-Oracle/blob/dc6325d4f96da3c54fc6862512f4de67e5ec03e2/README.win64.txt#L7 seems to indicate we can use either of the instant clients, so I'd say basic. I don't know if we need any of the features excluded from basic for basic-light

genio added a commit to StrawberryPerl/spbuild that referenced this issue Apr 2, 2023
In order to build some necessary modules, we'll need this instant
client.

StrawberryPerl/Perl-Dist-Strawberry#69
@abraxxa
Copy link

abraxxa commented Apr 22, 2023

DBD::Oracle also needs the SQLPlus package to detect some settings like the version. If I remember correctly also the SDK is required. I can check that next week if you want.

@shawnlaffan
Copy link
Contributor Author

Thanks @abraxxa - that would be very helpful.

@shawnlaffan
Copy link
Contributor Author

DBD::Oracle also needs the SQLPlus package to detect some settings like the version. If I remember correctly also the SDK is required. I can check that next week if you want.

@abraxxa - have you had a chance to follow up on this?

@shawnlaffan
Copy link
Contributor Author

shawnlaffan commented May 6, 2023

Just a data point, building DBD::Oracle under the docker container needs both SQLPlus and OCI.

C:\spbuild\msys64\.cpanm\work\1683344904.1912\DBD-Oracle-1.83>set ORACLE_HOME=z:\sw\orainst

C:\spbuild\msys64\.cpanm\work\1683344904.1912\DBD-Oracle-1.83>perl Makefile.PL -V 21.9
Using DBI 1.643 (for perl 5.036001 on MSWin32-x64-multi-thread) installed in C:/strawberry/perl/vendor/lib/auto/DBI/
Configuring DBD::Oracle for perl 5.036001 on MSWin32 (MSWin32-x64-multi-thread)

If you encounter any problem, a collection of troubleshooting
guides are available under lib/DBD/Oracle/Troubleshooting.
'DBD::Oracle::Troubleshooting' is the general troubleshooting
guide, while platform-specific troubleshooting hints
live in their labelled sub-document (e.g., Win32
hints are gathered in 'lib/DBD/Oracle/Troubleshooting/Win32.pod').

Installing on a MSWin32, Ver#10.0
Using Oracle in z:/sw/orainst
Can't find sqlplus. Pity, it would have helped.
Forcing Oracle version to be treated as 21.9
Oracle Version 21.9 (21.9)
OCI directory not found, please install OCI in z:/sw/orainst at Makefile.PL line 324.

@shawnlaffan
Copy link
Contributor Author

shawnlaffan commented Jul 4, 2023

In the absence of further input I made the executive decision to not include this module from in the distribution.

Even if we provide the XS bindings, the user still has to have the instant client and sqlplus distributions on their machines.

Building the bindings seems not so difficult (a few env vars need to be set). I assume things were much harder at the time Strawberry Perl was started.

If there is a need for this module to be in SP then we would need to resolve the above issues for the build system and cut a new SP release.

I'll close this issue in about a week (or maybe later) unless there is further discussion.

@xiaoyafeng
Copy link

Strawberry Perl shipped with DBD-Oracle since 2015, and it's very helpful for Oracle DBA. hope it will reappear in next release ball.

@abraxxa
Copy link

abraxxa commented Jul 6, 2023

DBD::Oracle also needs the SQLPlus package to detect some settings like the version. If I remember correctly also the SDK is required. I can check that next week if you want.

@abraxxa - have you had a chance to follow up on this?

Sorry for the much too late reply! We finally migrated away from Oracle and I failed to remember to look it up.
I've installed all three zip files for DBD::Oracle to recognize the InstantClient:

  • instantclient-basic-linux.x64-18.3.0.0.0dbru.zip
  • instantclient-sdk-linux.x64-18.3.0.0.0dbru.zip
  • instantclient-sqlplus-linux.x64-18.3.0.0.0dbru.zip

Further the libaio1 package is required on Debian.

And I've set those env vars system wide via /etc/environment:

export ORACLE_HOME=/opt/instantclient_18_3
export LD_LIBRARY_PATH=/opt/instantclient_18_3
export TNS_ADMIN=/etc
export NLS_LANG=AMERICAN_AMERICA.AL32UTF

@shawnlaffan
Copy link
Contributor Author

Thanks @abraxxa

That gives a good indication of which packages are needed for a Windows install.

I wonder if this is best done as an Alien module to simplify the user experience? It can be used to add the relevant paths to the system before running in addition to downloading and unpacking. (Assuming it is loaded before or as part of DBD::Oracle).

In any case, I have builds of 5.36.1 and 5.38.0 ready to go (more recent than the current dev releases). If we include it in Strawberry Perl then it will be in the next point releases (5.38.0.2, 5.36.1.2).

I'll leave this issue open.

@thuety
Copy link

thuety commented Oct 16, 2023

I'm looking forward to build that includes DBD::Oracle... still using the eol 5.32.1 at the moment

@shawnlaffan
Copy link
Contributor Author

Cross-ref: #216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants