Discussion:
Perl DBD::Oracle 'make test' fails: Oracle.dll permission denied
Bob McGowan
2013-03-04 19:01:56 UTC
Permalink
Hello,

First, I'm not subscribed, please include my email in the reply.

I have installed Cygwin 1.7 (Windows properties says: 1007.17.0.0,
currently).

I'm running under Windows XP (version 2002, service pack 2).

I have DBI 1.623 installed, and am attempting to install DBD::Oracle 1.27.

I'm using Oracle instant client for Oracle 11.2, and I created my own
oci.def file using 'pexports' and 'dlltool', as described in the header
of the original oci.def file.

The 'perl Makefile.PL' generates no errors.

My 'make' creates Oracle.dll without any major issues (a few minor
complaints about mismatched types in printf, pointer casts, ...).

The 'make test' fails the first test:

Can't load ... Oracle.dll for module DBD::Oracle: Permission denied...

I've searched the FAQ (found 15 articles with similar issues, but no
helpful resolution) and the web (various suggestions such as being sure
files are executable, and using regsvr32 to register the dll found,
tried but no joy).

I did a getfacl on several dll's supplied by Cygwin, and Perl, for
comparison, and I've set Oracle.dll to be at least the same, and just
for fun, added the 'SYSTEM' group with r-x permission.

Nothing has helped, so I can't successfully test Oracle functionality
before installing it.

When I did do the 'make install', make reported running 'rebase' on
Oracle.dll.

I have not tested this install, yet, but I'm wondering if 'rebase' is
what was missing, or is there something else that must be done to get
dll's with Perl working, for testing? I have several other modules that
I use which are C based, so would create dll's and I'd like to be sure
I'm not doing something incorrectly, here.

Many thanks for your help.
--
Bob McGowan
Principal Software Engineer, SES Software Engineering
Shared Engineering Services
Symantec Corporation
marco atzeri
2013-03-04 20:00:26 UTC
Permalink
Post by Bob McGowan
Hello,
First, I'm not subscribed, please include my email in the reply.
I have installed Cygwin 1.7 (Windows properties says: 1007.17.0.0,
currently).
I'm running under Windows XP (version 2002, service pack 2).
I have DBI 1.623 installed, and am attempting to install DBD::Oracle 1.27.
I'm using Oracle instant client for Oracle 11.2, and I created my own
oci.def file using 'pexports' and 'dlltool', as described in the header
of the original oci.def file.
I will not bet on 'pexports' and 'dlltool' making the right thing,
Post by Bob McGowan
The 'perl Makefile.PL' generates no errors.
My 'make' creates Oracle.dll without any major issues (a few minor
complaints about mismatched types in printf, pointer casts, ...).
Can't load ... Oracle.dll for module DBD::Oracle: Permission denied...
check with depends (http://www.dependencywalker.com/)
if all the dll links are correct.
Post by Bob McGowan
I've searched the FAQ (found 15 articles with similar issues, but no
helpful resolution) and the web (various suggestions such as being sure
files are executable, and using regsvr32 to register the dll found,
tried but no joy).
I did a getfacl on several dll's supplied by Cygwin, and Perl, for
comparison, and I've set Oracle.dll to be at least the same, and just
for fun, added the 'SYSTEM' group with r-x permission.
Nothing has helped, so I can't successfully test Oracle functionality
before installing it.
When I did do the 'make install', make reported running 'rebase' on
Oracle.dll.
I have not tested this install, yet, but I'm wondering if 'rebase' is
what was missing, or is there something else that must be done to get
dll's with Perl working, for testing? I have several other modules that
I use which are C based, so would create dll's and I'd like to be sure
I'm not doing something incorrectly, here.
rebase issue will be reported as fork problem that is not your case.
Post by Bob McGowan
Many thanks for your help.
Reini Urban
2013-03-05 14:10:04 UTC
Permalink
Post by Bob McGowan
I have DBI 1.623 installed, and am attempting to install DBD::Oracle 1.27.
I'm using Oracle instant client for Oracle 11.2, and I created my own
oci.def file using 'pexports' and 'dlltool', as described in the header of
the original oci.def file.
The 'perl Makefile.PL' generates no errors.
My 'make' creates Oracle.dll without any major issues (a few minor
complaints about mismatched types in printf, pointer casts, ...).
Can't load ... Oracle.dll for module DBD::Oracle: Permission denied...
I'm not sure if the Dynaloader fails, or if the connection to the
oracle db fails with this error.

If it's the Dynaloader be sure that all dependencies can be loaded.
ldd blib/arch/Oracle/Oracle.dll will tell you that.
--
Reini Urban
http://cpanel.net/ http://www.perl-compiler.org/
Bob McGowan
2013-03-06 00:27:52 UTC
Permalink
Well, I get:

$ ldd Oracle.dll
ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000)
kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000)
??? => ??? (0x6f440000)

So I'd think this was my environment, but (edited to protect the ...),
and I shortened the longer lines, using the traditional UNIX line
continuation backslash:

$ env
.
.
.
SHELL=/bin/bash
OS=Windows_NT
XTERM_SHELL=/bin/bash
ORACLE_USERID=etrack/*******
PATH=/home/rmcgowan/bin:/usr/local/bin:/usr/bin:\
/cygdrive/c/WINDOWS/system32:\
/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:\
/home/rmcgowan/work/oracle/instantclient_11_2
LANG=en_US.UTF-8
TZ=America/Los_Angeles
XTERM_LOCALE=en_US.UTF-8
DBI_DSN=dbi:Oracle:host=toolsdb-dev.engba.symantec.com;sid=etrackdv;\
port=1522
ORACLE_HOME=/home/rmcgowan/work/oracle/instantclient_11_2
NLS_LANG=.WE8ISO8859P15

So, instant client dll's should be accessable, via PATH, I have a DSN
and USERID that work in other environments, so should be OK here, and
ORACLE_HOME set. I've even set NLS_LANG, just in case.

I still get the same permission denied error, and 'ldd .../Oracle.dll'
shows the same 3 lines of output.

I even took the simple example from the user guide and built the dll
version of 'hello world', and that worked just fine.

Clearly, I'm missing something here.

But what?

Thanks,

Bob
Post by Reini Urban
Post by Bob McGowan
I have DBI 1.623 installed, and am attempting to install DBD::Oracle 1.27.
I'm using Oracle instant client for Oracle 11.2, and I created my own
oci.def file using 'pexports' and 'dlltool', as described in the header of
the original oci.def file.
The 'perl Makefile.PL' generates no errors.
My 'make' creates Oracle.dll without any major issues (a few minor
complaints about mismatched types in printf, pointer casts, ...).
Can't load ... Oracle.dll for module DBD::Oracle: Permission denied...
I'm not sure if the Dynaloader fails, or if the connection to the
oracle db fails with this error.
If it's the Dynaloader be sure that all dependencies can be loaded.
ldd blib/arch/Oracle/Oracle.dll will tell you that.
--
Bob McGowan
Principal Software Engineer, SES Software Engineering
Shared Engineering Services
Symantec Corporation
Loading...