Ok Martin we can pick this up on the morrow. I will add a few debug extra debug stuff about the Makefile and get you email me the results directly.

Talk to you tomorrow

Cheers John Scoles

Martin Evans wrote:
John Scoles wrote:
Yes it is a rather delicate subject as if we make it work for one it will break for everyone else.

Don't agree in this case since a) the code is already not working and b) the change only comes into play if sqlplus fails with SP2-0750.

The real root of the problem is that Oracle in its divine wisdom has compacted all the .so files into one so there is no way you c compiler can get them but of SQL on the Ubuntu Server it could be the case that the Makefile fort 1.19 is not recognizing it as a Linux server or alike.

We could try to debug it but I would need access to your server for an hour or so or if you have the time we can debug it together as I can send you a Makefile.PL with a little more debugging into? I have time tomorrow if you are interested Martin


I am happy to anything to help now, tomorrow or whenever. However, I don't understand your response since the problem I am seeing is that sqlplus will NOT run if ORACLE_HOME is defined and it does not seem related to combining libraries into one. The actual code failing (omitting comments) is:

sub get_client_version {
    my ($force_version) = @_;
    my $client_version_full = '';
my $sqlplus_exe = ($os eq 'Win32' || $os eq 'MSWin32' || $os eq 'cygwin') ? "sqlplus.exe" : "sqlplus";
    my $OH_path = $OH;
chomp($OH_path = `/usr/bin/cygpath -u $OH_path`) if $os eq 'cygwin' && $OH; local $ENV{PATH} = join $Config{path_sep}, "$OH_path/bin", $OH_path, $ENV{PATH} if $OH;
    print "PATH=$ENV{PATH}\n" if $::opt_v;

    if (find_bin($sqlplus_exe)) {

    # code gets here since find_bin finds sqlplus on my path

        local $ENV{SQLPATH} = "";
        open FH, ">define.sql" or warn "Can't create define.sql: $!";
        print FH "DEFINE _SQLPLUS_RELEASE\nQUIT\n";
        my $sqlplus_release = `$sqlplus_exe -S /nolog [EMAIL PROTECTED] 2>&1`;
        unlink "define.sql";
print $sqlplus_release; # the _SQLPLUS_RELEASE may not be on first line: if ($sqlplus_release =~ /DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\d\d)(\d\d)"/) { # code does not get here since sqlplus returned an error
    # instead of the version. It returns SP2-0750 because
    # when it sees ORACLE_HOME is defined it expects to find
    # message files which are not present with instant client
$client_version_full = sprintf("%d.%d.%d.%d", $1, $2, $3, $4);
        }

My change (although ugly) should not break anyone else because all it does is re-run sqlplus with ORACLE_HOME temporarily deleted from environment IF sqlplus returns the error SP2-0750. i.e., I insert into above before "unlink":

        if ($sqlplus_release =~ /SP2-0750/) {
                my $x = $ENV{ORACLE_HOME};
                delete $ENV{ORACLE_HOME};
$sqlplus_release = `$sqlplus_exe -S /nolog [EMAIL PROTECTED] 2>&1`;
                $ENV{ORACLE_HOME} = $x;
        }

After this minor addition it works fine.

If you still want me to run anything on my machine let me know. I cannot provide access to it from outside our network but I can run anything you like.

Martin

Reply via email to