• Bug#1032142: marked as done (unblock: libdbd-oracle-perl/1.83-1) (2/11)

    From Debian Bug Tracking System@21:1/5 to All on Tue Feb 28 22:20:01 2023
    [continued from previous message]

    See the appropriate troubleshooting guide for your OS for more information.
    ABORTED!
    } unless (-d $OH and $^O eq 'VMS')
    - or -d "$OH/sdk/." # Instant Client with SDK
    - or -d "$OH/lib/." # normal Oracle installation
    + or -d "$OH/sdk/." # Instant Client with SDK
    + or -d "$OH/lib/." # normal Oracle installation
    or glob("$OH/libclntsh.$so*") # pre-sdk instant client or rpm
    - or -e "$OH/oci.dll"; # Windows Instant Client
    + or -e "$OH/oci.dll"; # Windows Instant Client

    print "Installing on a $^O, Ver#$osvers\n";
    print "Using Oracle in $OH\n";
    @@ -277,8 +276,8 @@

    # --- How shall we link with Oracle? Let me count the ways...

    -my $mkfile; # primary .mk file to use
    -my @mkfiles; # $mkfile plus any files it 'includes'
    +my $mkfile; # primary .mk file to use
    +my @mkfiles; # $mkfile plus any files it 'includes'
    my $linkwith = "";
    my $linkwith_msg = "";
    my $need_ldlp_env;
    @@ -287,16 +286,16 @@
    my @libclntsh = glob("$OH/libclntsh.$so*");

    if ($^O eq 'VMS') {
    - my $OCIINCLUDE = join " ", vmsify("$OH/rdbms/"),
    - vmsify("$OH/rdbms/public"),
    - vmsify("$OH/rdbms/demo/"),
    - vmsify("$OH/rdbms/demo/oci_demo/"),
    - vmsify("$OH/netconfig/demo/"); # eg nzt.h in 8.1.7 on VMS
    + my $OCIINCLUDE = join " ", vmsify("$OH/rdbms/"),
    + vmsify("$OH/rdbms/public"),
    + vmsify("$OH/rdbms/demo/"),
    + vmsify("$OH/rdbms/demo/oci_demo/"),
    + vmsify("$OH/netconfig/demo/"); # eg nzt.h in 8.1.7 on VMS
    $opts{INC} = "$OCIINCLUDE $dbi_arch_dir";
    $opts{OBJECT} = 'oracle.obj dbdimp.obj oci7.obj oci8.obj' if $] < 5.005;

    unless ($ENV{PERL_ENV_TABLES}) {
    - print qq{
    + print qq{
    The logical PERL_ENV_TABLES is not set.

    This may mean that some of the UTF functionallity tests may fail,
    @@ -306,7 +305,7 @@
    table, please set this logical:

    \$ DEFINE PERL_ENV_TABLES LNM\$PROCESS
    - \a\n};
    + \a\n};
    sleep 3;
    }
    }
    @@ -315,9 +314,9 @@

    my $OCIDIR = "";
    find( sub {
    - print "Found $_ directory\n" if /^OCI\d*$/i;
    - $OCIDIR = $_ if /^OCI\d*$/i && $OCIDIR lt $_;
    - $File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
    + print "Found $_ directory\n" if /^OCI\d*$/i;
    + $OCIDIR = $_ if /^OCI\d*$/i && $OCIDIR lt $_;
    + $File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
    }, $OH );

    $OCIDIR = 'sdk' if !$OCIDIR && -d "$OH/sdk"; # Instant Client SDK
    @@ -338,14 +337,14 @@
    my %OCILIB;
    my $oci_compiler_dir;
    my @oci_compiler_dirs =
    - map { -d "$OH/$OCIDIR/lib/$_" ? "$OH/$OCIDIR/lib/$_": () }
    - $Config{cc} eq 'bcc32' ? qw(BORLAND BC) : qw(MSVC);
    + map { -d "$OH/$OCIDIR/lib/$_" ? "$OH/$OCIDIR/lib/$_": () }
    + $Config{cc} eq 'bcc32' ? qw(BORLAND BC) : qw(MSVC);
    find( sub {
    - $File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
    - return unless /^(OCI|ORA).*\.LIB$/i;
    - ($oci_compiler_dir = $File::Find::dir) =~ s:^.*/::;
    - print "Found $OCIDIR/lib/$oci_compiler_dir/$_ library\n";
    - $OCILIB{uc($_)} = $_;
    + $File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
    + return unless /^(OCI|ORA).*\.LIB$/i;
    + ($oci_compiler_dir = $File::Find::dir) =~ s:^.*/::;
    + print "Found $OCIDIR/lib/$oci_compiler_dir/$_ library\n";
    + $OCILIB{uc($_)} = $_;
    }, @oci_compiler_dirs );
    # sort the version numbered libs into assending order
    my @OCILIB = sort grep { /(OCI|ORA)\d\d+\./i } keys %OCILIB;
    @@ -359,8 +358,8 @@
    that you have your OCI installed in your oracle home ($OH)
    directory and that it has the following files (and probably more):

    - $OH\\$OCIDIR\\include\\oratypes.h
    - $OH\\$OCIDIR\\lib\\$oci_compiler_dir\\$OCILIB.lib
    + $OH\\$OCIDIR\\include\\oratypes.h
    + $OH\\$OCIDIR\\lib\\$oci_compiler_dir\\$OCILIB.lib

    Please install OCI or send comments back to dbi-users\@perl.org
    if you have an OCI directory other than $OCIDIR.
    @@ -370,8 +369,8 @@
    ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd

    } unless (-e "$OH/$OCIDIR/include/oratypes.h"
    - && -e "$OH/$OCIDIR/lib/$oci_compiler_dir/$OCILIB.lib")
    - or $::opt_F;
    + && -e "$OH/$OCIDIR/lib/$oci_compiler_dir/$OCILIB.lib")
    + or $::opt_F;

    print "Using $OCIDIR/lib/$oci_compiler_dir/$OCILIB.lib\n";
    $opts{LIBS} = [ "-L$OH/$OCIDIR/LIB/$oci_compiler_dir $OCILIB" ];
    @@ -418,11 +417,11 @@
    # the libclntsh.$so (without version suffix) may be missing
    # we need it to link to so try to create it
    eval {
    - print "You don't have a libclntsh.$so file, only @libclntsh\n";
    - my $libclntsh_v = (grep { /\d$/ } sort @libclntsh)[0]; # tacky but sufficient
    - print "So I'm going to create a $OH/libclntsh.$so symlink to $libclntsh_v\n";
    + print "You don't have a libclntsh.$so file, only @libclntsh\n";
    + my $libclntsh_v = (grep { /\d$/ } sort @libclntsh)[0]; # tacky but sufficient
    + print "So I'm going to create a $OH/libclntsh.$so symlink to $libclntsh_v\n";
    symlink($libclntsh_v, "$OH/libclntsh.$so")
    - or warn "Can't create symlink $OH/libclntsh.$so to $libclntsh_v: $!\n";
    + or warn "Can't create symlink $OH/libclntsh.$so to $libclntsh_v: $!\n";
    } unless -e "$OH/libclntsh.$so";

    check_ldlibpthname($OH);
    @@ -434,7 +433,7 @@

    my $lib = "clntsh";
    $linkwith_msg = "-l$lib.";
    - $opts{LIBS} = [ "-L$OH -l$lib $syslibs" ];
    + $opts{LIBS} = [ "-L$OH -Wl,-rpath,$OH -l$lib $syslibs" ];

    my $inc = join " ", map { "-I$_" } find_headers();
    $opts{INC} = "$inc -I$dbi_arch_dir";
    @@ -448,12 +447,12 @@
    $MK{CCINCLUDES} = '-I$(ICINCHOME)'; # undo odd refinition in demo_xe.mk

    # From linux Oracle XE (10.2.0):
    - # ICINCHOME=$(ORACLE_HOME)/rdbms/public/
    - # ICLIBHOME=$(ORACLE_HOME)/lib/
    - # ICLIBPATH=-L$(ICLIBHOME)
    - # THREADLIBS=-lpthread [initially -lthread then redefined]
    - # CCLIB=$(ICLIBPATH) -lclntsh $(THREADLIBS)
    - # CCINCLUDES = -I$(ICINCHOME) [see above]
    + # ICINCHOME=$(ORACLE_HOME)/rdbms/public/
    + # ICLIBHOME=$(ORACLE_HOME)/lib/
    + # ICLIBPATH=-L$(ICLIBHOME)
    + # THREADLIBS=-lpthread [initially -lthread then redefined]
    + # CCLIB=$(ICLIBPATH) -lclntsh $(THREADLIBS)
    + # CCINCLUDES = -I$(ICINCHOME) [see above]
    # CCFLAGS=$(CCINCLUDES) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g [initially without -DLINUX -D_GNU_SOURCE]
    my $cclib = expand_mkvars($MK{CCLIB}, 0, 1);
    my $ccflags = expand_mkvars($MK{CCFLAGS}, 0, 1);
    @@ -465,27 +464,27 @@
    check_ldlibpthname();
    }

    -else { # --- trawl the guts of Oracle's make files looking the how it wants to link
    +else { # --- trawl the guts of Oracle's make files looking the how it wants to link
    #Lincoln: pick the right library path
    check_ldlibpthname();
    my $libdir = ora_libdir();
    my @ora_libs = <$OH/$libdir/lib*>;
    if (@ora_libs < 6) { # just a helpful hint
    - warn "\nYou don't seem to have many Oracle libraries installed. If the" - ."\nbuild fails you probably need to install more Oracle software.\n\n";
    - sleep 6;
    + warn "\nYou don't seem to have many Oracle libraries installed. If the"
    + ."\nbuild fails you probably need to install more Oracle software.\n\n";
    + sleep 6;
    }

    # can we give the shared library a helping hand?
    my @shared = grep { m:/lib(cl(ie)?ntsh|oracle).\w+$:o } @ora_libs;
    # show original value of ORA_CLIENT_LIB if defined ...
    print "\$ORA_CLIENT_LIB=$ENV{ORA_CLIENT_LIB}\n"
    - if defined $ENV{ORA_CLIENT_LIB};
    + if defined $ENV{ORA_CLIENT_LIB};
    # ... before we then set it how it probably should be set
    # XXX but we still need to write it into the generated Makefile.
    $ENV{ORA_CLIENT_LIB} = 'shared'
    - if !defined $ENV{ORA_CLIENT_LIB}
    - && ($opts{LINKTYPE}||'') ne 'static' && @shared && !$::opt_c;
    + if !defined $ENV{ORA_CLIENT_LIB}
    + && ($opts{LINKTYPE}||'') ne 'static' && @shared && !$::opt_c;

    my $linkvia = fetch_oci_macros($mkfile) if -f $mkfile;

    @@ -501,83 +500,83 @@
    my @build_rules = grep { $mk_target_rules{$_} } qw(build build64 build32);
    my $build_target = "build";
    if (@build_rules && $::opt_b) {
    - print "\n";
    + print "\n";

    - $build_target = "build32" if $mk_target_rules{build32};
    - $build_target = "build64" if $mk_target_rules{build64} && perl_is_64bit();
    - $build_target = $::opt_r if $::opt_r;
    + $build_target = "build32" if $mk_target_rules{build32};
    + $build_target = "build64" if $mk_target_rules{build64} && perl_is_64bit();
    + $build_target = $::opt_r if $::opt_r;

    - print "Attempting to discover Oracle OCI $build_target rules\n";
    + print "Attempting to discover Oracle OCI $build_target rules\n";

    - # create dummy C file to keep 'make $mkfile' happy
    - my $DBD_ORA_OBJ = 'DBD_ORA_OBJ';
    + # create dummy C file to keep 'make $mkfile' happy
    + my $DBD_ORA_OBJ = 'DBD_ORA_OBJ';
    open DBD_ORA_C, ">$DBD_ORA_OBJ.c"
    - or die "Can't create temporary $DBD_ORA_OBJ.c file in current directory: $!\n";
    + or die "Can't create temporary $DBD_ORA_OBJ.c file in current directory: $!\n";
    print DBD_ORA_C "int main() { return 1; }\n";
    close DBD_ORA_C;
    - sleep 2; #
    - system("make $DBD_ORA_OBJ.o CC='$Config{cc}'"); # make a valid .o file. + sleep 2; #
    + system("make $DBD_ORA_OBJ.o CC='$Config{cc}'"); # make a valid .o file.

    - my $make = "$Config{make} -f $mkfile $build_target"
    - ." ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true"
    - ." OPTIMIZE= CCFLAGS="
    - ." EXE=DBD_ORA_EXE OBJS=$DBD_ORA_OBJ.o";
    - print "by executing: [$make]\n";
    - my @cmds = `$make 2>&1`;
    - chomp @cmds;
    - print "returned:\n[".join("]\n[",@cmds)."]\n" if $::opt_v;
    - warn "WARNING: Oracle build rule discovery failed ($?)\n" if $?;
    - warn "Add path to $Config{make} command into your PATH environment variable.\n"
    - if $? && "@cmds" =~ /make.*not found/; # hint
    + my $make = "$Config{make} -f $mkfile $build_target"
    + . q/ ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true/ + . q/ OPTIMIZE= CCFLAGS=/
    + . qq/ EXE=DBD_ORA_EXE OBJS=$DBD_ORA_OBJ.o/;
    + print "by executing: [$make]\n";
    + my @cmds = `$make 2>&1`;
    + chomp @cmds;
    + print "returned:\n[".join("]\n[",@cmds)."]\n" if $::opt_v;
    + warn "WARNING: Oracle build rule discovery failed ($?)\n" if $?;
    + warn "Add path to $Config{make} command into your PATH environment variable.\n"
    + if $? && "@cmds" =~ /make.*not found/; # hint

    - my @filtered_cmds;
    + my @filtered_cmds;
    while (my $line = shift @cmds) {
    - # join lines split with \'s
    - while ($line =~ s/\\$/ /) { $line .= shift @cmds; }
    - # remove any echo's as the following line should be the result of the echo
    - next if $line =~ /^\s*\S*echo\s+/;
    - next if $line =~ /^\s*\S*make\s+/; # remove recursive calls to make - next if $line =~ /^\s*\S*make(\[\d\])?:/; # remove message rom "make:" or "make[x]:"
    -
    - next if $line =~ /^\s*$/; # remove any blank lines
    - push @filtered_cmds, $line;
    - }
    - print "reduced to:\n[".join("]\n[",@filtered_cmds)."]\n"
    - if $::opt_v && "@filtered_cmds" ne "@cmds";
    - @cmds = @filtered_cmds;
    -
    - my @prolog; push @prolog, shift @cmds while @cmds && $cmds[0] !~ /DBD_ORA_EXE/;
    - print "Oracle oci build prolog:\n \t[", join("]\n\t[", @prolog), "]\n" if @prolog;
    - print "Oracle oci build command:\n\t[", join("]\n\t[", @cmds ), "]\n"; - if (@cmds == 1 && (my $build = shift @cmds) =~ /DBD_ORA_EXE/) {
    - $build =~ s/\s*true\s+//; # remove dummy compiler
    - $build =~ s/$DBD_ORA_OBJ.o//; # remove dummy object file
    - $build =~ s/\S+\s+DBD_ORA_EXE//; # remove dummy exe file and preceding flag
    - $build =~ s/-o build\S*//; # remove -o target that confuses gcc at least on Sun
    - $linkwith = $build;
    - # delete problematic crt?.o on solaris
    - $linkwith = del_crtobj($linkwith, 1) if $^O eq 'solaris';
    - }
    - else {
    - print "WARNING: Unable to interpret Oracle build commands from $mkfile.\a\n";
    - print "(Will continue by using fallback approach.)\n";
    - sleep 2;
    - $::opt_b = 0;
    - }
    - unlink "$DBD_ORA_OBJ.c", "$DBD_ORA_OBJ.o"
    - unless $^O eq 'darwin'; # why?
    - print "\n";
    + # join lines split with \'s
    + while ($line =~ s/\\$/ /) { $line .= shift @cmds; }
    + # remove any echo's as the following line should be the result of the echo
    + next if $line =~ m/^\s*\S*echo\s+/;
    + next if $line =~ m/^\s*\S*make\s+/; # remove recursive calls to make
    + next if $line =~ m/^\s*\S*make(\[\d\])?:/; # remove message rom "make:" or "make[x]:"
    +
    + next if $line =~ m/^\s*$/; # remove any blank lines
    + push @filtered_cmds, $line;
    + }
    + print "reduced to:\n[".join("]\n[",@filtered_cmds)."]\n"
    + if $::opt_v && "@filtered_cmds" ne "@cmds";
    + @cmds = @filtered_cmds;
    +
    + my @prolog; push @prolog, shift @cmds while @cmds && $cmds[0] !~ /DBD_ORA_EXE/;
    + print "Oracle oci build prolog:\n \t[", join("]\n\t[", @prolog), "]\n" if @prolog;
    + print "Oracle oci build command:\n\t[", join("]\n\t[", @cmds ), "]\n";
    + if (@cmds == 1 && (my $build = shift @cmds) =~ /DBD_ORA_EXE/) {
    + $build =~ s/\s*true\s+//; # remove dummy compiler
    + $build =~ s/$DBD_ORA_OBJ.o//; # remove dummy object file
    + $build =~ s/\S+\s+DBD_ORA_EXE//; # remove dummy exe file and preceding flag
    + $build =~ s/-o build\S*//; # remove -o target that confuses gcc at least on Sun
    + $linkwith = $build;
    + # delete problematic crt?.o on solaris
    + $linkwith = del_crtobj($linkwith, 1) if $^O eq 'solaris';
    + }
    + else {
    + print "WARNING: Unable to interpret Oracle build commands from $mkfile.\a\n";
    + print "(Will continue by using fallback approach.)\n";
    + sleep 2;
    + $::opt_b = 0;
    + }
    + unlink "$DBD_ORA_OBJ.c", "$DBD_ORA_OBJ.o"
    + unless $^O eq 'darwin'; # why?
    + print "\n";
    }
    else {
    - print "WARNING: Oracle $mkfile doesn't define a 'build' rule.\n" if $::opt_b;
    - $::opt_b = 0;
    - print "\n";
    - print "WARNING: I will now try to guess how to build and link DBD::Oracle for you.$BELL\n";
    - print " This kind of guess work is very error prone and Oracle-version sensitive.\n";
    - print " It is possible that it won't be supported in future versions of DBD::Oracle.\n";
    - print " *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.\n";
    - print "\n";
    - sleep 6;
    + print "WARNING: Oracle $mkfile doesn't define a 'build' rule.\n" if $::opt_b;
    + $::opt_b = 0;
    + print "\n";
    + print "WARNING: I will now try to guess how to build and link DBD::Oracle for you.$BELL\n";
    + print " This kind of guess work is very error prone and Oracle-version sensitive.\n";
    + print " It is possible that it won't be supported in future versions of DBD::Oracle.\n";
    + print " *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.\n";
    + print "\n";
    + sleep 6;
    }

    $linkwith =~ s/-Y P,/-YP,/g if $Config{gccversion};
    @@ -651,8 +650,8 @@
    #
    # Jay: Add Librarys where one gets Unresolved symbols
    #
    - if ( ( $osvers >= 11 and $client_version_full =~ /^8\.1\.6/ )
    - or ( $osvers >= 11 and $OH =~ m,/8\.1\.6, ) ) {
    + if ( ( $osvers >= 11 and $client_version_full =~ m/^8\.1\.6/ )
    + or ( $osvers >= 11 and $OH =~ m|/8\.1\.6| ) ) {
    my @extraLib = qw[libqsmashr.sl libclntsh.sl];
    foreach my $extraLib (@extraLib) {
    if (-r "$OH/lib/$extraLib") {
    @@ -663,9 +662,9 @@
    }

    if ($osvers >= 11 and $linkwith =~ m/-l:libcl.a/) {
    - print "WARNING: stripping -l:libcl.a from liblist (conflict with ld looking for shared libs)\n";
    - $linkwith =~ s/\s*-l:libcl.a\b//g;
    - }
    + print "WARNING: stripping -l:libcl.a from liblist (conflict with ld looking for shared libs)\n";
    + $linkwith =~ s/\s*-l:libcl.a\b//g;
    + }

    #lincoln: this is bringing back everything we thought we removed... (like libcl.a)
    # I wonder if this should targetted less specifically than only HPUX 11
    @@ -680,59 +679,59 @@
    }

    my $ccf = join " ", map { $_ || '' } @Config{qw(ccflags ccldflags cccdlflags)};
    - if ($Config{cc} =~ /gcc/i) {
    - print "WARNING: perl was not built with -fpic or -fPIC in compiler flags.\n",
    - " You may need to rebuild perl from sources.\n",
    - " See instructions in DBD::Oracle::Troubleshooting::Hpux\n"
    - unless $ccf =~ m/-fpic\b/i;
    + if ($Config{cc} =~ m/gcc/i) {
    + print "WARNING: perl was not built with -fpic or -fPIC in compiler flags.\n",
    + " You may need to rebuild perl from sources.\n",
    + " See instructions in DBD::Oracle::Troubleshooting::Hpux\n"
    + unless $ccf =~ m/-fpic\b/i;
    }
    else {
    print "WARNING: perl was not built with +z or +Z in compiler flags.\n",
    " You may need to rebuild perl from sources.\n",
    " See instructions in DBD::Oracle::Troubleshooting::Hpux\n"
    - unless $ccf =~ m/\+[zZ]/;
    + unless $ccf =~ m/\+[zZ]/;
    }
    }


    - if ($::opt_b) { # The simple approach
    - $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g $linkwith" };
    - $linkwith_msg = "OTHERLDFLAGS = $linkwith [from '$build_target' rule]"; - }
    - else { # the not-so-simple approach!
    - # get a cut down $linkwith to pass to MakeMaker liblist
    - my $linkwith_s = expand_mkvars($linkwith, 1, 1);
    -
    - # convert "/full/path/libFOO.a" into "-L/full/path -lFOO"
    - # to cater for lack of smarts in MakeMaker / Liblist
    - # which ignores /foo/bar.a entries!
    - my $lib_ext_re = "(a|$Config{dlext}|$Config{so})";
    - $linkwith_s =~ s!(\S+)/lib(\w+)\.($lib_ext_re)\b!-L$1 -l$2!g;
    -
    - # Platform specific fix-ups:
    - # delete problematic crt?.o on solaris
    - $linkwith_s = del_crtobj($linkwith_s) if $^O eq 'solaris';
    - $linkwith_s =~ s/-l:lib(\w+)\.sl\b/-l$1/g; # for hp-ux
    - # this kind of stuff should be in a ./hints/* file:
    - $linkwith_s .= " -lc" if $Config{osname} eq 'dynixptx'
    - or $Config{archname} =~ /-pc-sco3\.2v5/;
    - if ($^O eq 'solaris' and $linkwith_s =~ /-lthread/
    - and $osvers >= 2.3 and $osvers <= 2.6
    - ) {
    - print "WARNING: Solaris 2.5 bug #1224467 may cause '_rmutex_unlock' error.\n";
    - print "Deleting -lthread from link list as a possible workround ($osvers).\n";
    - $linkwith_s =~ s/\s*-lthread\b/ /g;
    - }
    -
    - # extract object files, keep for use later
    - my @linkwith_o;
    - push @linkwith_o, $1 while $linkwith_s =~ s/(\S+\.[oa])\b//;
    - # also extract AIX .exp files since they confuse MakeMaker
    - push @linkwith_o, $1 while $linkwith_s =~ s/(-bI:\S+\.exp)\b//;
    -
    - $linkwith_msg = "@linkwith_o $linkwith_s [from $linkvia]";
    - $opts{LIBS} = [ "-L$libhome $linkwith_s" ];
    - $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g @linkwith_o \$(COMPOBJS)" };
    + if ($::opt_b) { # The simple approach
    + $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g $linkwith" };
    + $linkwith_msg = "OTHERLDFLAGS = $linkwith [from '$build_target' rule]";
    + }
    + else { # the not-so-simple approach!
    + # get a cut down $linkwith to pass to MakeMaker liblist
    + my $linkwith_s = expand_mkvars($linkwith, 1, 1);
    +
    + # convert "/full/path/libFOO.a" into "-L/full/path -lFOO"
    + # to cater for lack of smarts in MakeMaker / Liblist
    + # which ignores /foo/bar.a entries!
    + my $lib_ext_re = "(a|$Config{dlext}|$Config{so})";
    + $linkwith_s =~ s!(\S+)/lib(\w+)\.($lib_ext_re)\b!-L$1 -l$2!g;
    +
    + # Platform specific fix-ups:
    + # delete problematic crt?.o on solaris
    + $linkwith_s = del_crtobj($linkwith_s) if $^O eq 'solaris';
    + $linkwith_s =~ s/-l:lib(\w+)\.sl\b/-l$1/g; # for hp-ux
    + # this kind of stuff should be in a ./hints/* file:
    + $linkwith_s .= " -lc" if $Config{osname} eq 'dynixptx'
    + or $Config{archname} =~ /-pc-sco3\.2v5/;
    + if ($^O eq 'solaris' and $linkwith_s =~ /-lthread/
    + and $osvers >= 2.3 and $osvers <= 2.6
    + ) {
    + print "WARNING: Solaris 2.5 bug #1224467 may cause '_rmutex_unlock' error.\n";
    + print "Deleting -lthread from link list as a possible workround ($osvers).\n";
    + $linkwith_s =~ s/\s*-lthread\b/ /g;
    + }
    +
    + # extract object files, keep for use later
    + my @linkwith_o;
    + push @linkwith_o, $1 while $linkwith_s =~ s/(\S+\.[oa])\b//;
    + # also extract AIX .exp files since they confuse MakeMaker
    + push @linkwith_o, $1 while $linkwith_s =~ s/(-bI:\S+\.exp)\b//;
    +
    + $linkwith_msg = "@linkwith_o $linkwith_s [from $linkvia]";
    + $opts{LIBS} = [ "-L$libhome $linkwith_s" ];
    + $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g @linkwith_o \$(COMPOBJS)" };
    }

    my $OCIINCLUDE = expand_mkvars($MK{INCLUDE} || '', 0, 0);
    @@ -750,7 +749,7 @@

    $opts{DEFINE} .= ' -Wall -Wno-comment' if $Config{gccversion};

    -$opts{DEFINE} .= ' -Xa' if $Config{cc} eq 'clcc'; # CenterLine CC +$opts{DEFINE} .= ' -Xa' if $Config{cc} eq 'clcc'; # CenterLine CC



    @@ -763,8 +762,8 @@
    # Use OCIEnvNlsCreate if available for best unicode behaviour
    #$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
    $opts{DEFINE} .= ($^O ne 'VMS')
    - ? " -DORA_OCI_VERSION=\\\"$client_version_full\\\""
    - : " -DORA_OCI_VERSION=\"$client_version_full\"";
    + ? " -DORA_OCI_VERSION=\\\"$client_version_full\\\""
    + : " -DORA_OCI_VERSION=\"$client_version_full\"";
    # force additional special behavior for oci 8. For now, this means
    # emulating OciLobWriteAppend
    # use this if, for some reason the default handling for this function
    @@ -775,10 +774,10 @@
    print "\nclient_version=$client_version\n\n";

    $opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
    - or ( $client_version >= 10.2);
    + or ( $client_version >= 10.2);

    $opts{DEFINE} .= " -DORA_OCI_112" if ($::opt_V && $client_version == 11.2)
    - or ( $client_version >= 11.2);
    + or ( $client_version >= 11.2);

    print "\nDEFINE=$opts{DEFINE}\n\n";
    # OCIStmntFetch2() is a feature of OCI 9.0.0
    @@ -790,11 +789,11 @@
    $BELL = "<BELL>" if ($ENV{LOGNAME}||'') eq 'timbo';
    $::opt_g = '-g';
    if ($Config{gccversion}) {
    - $opts{DEFINE} .= ' -Wall -Wcast-align -Wpointer-arith';
    - $opts{DEFINE} .= ' -Wbad-function-cast -Wcast-qual';
    - #$opts{DEFINE} .= ' -Wconversion'; # very noisy so remove to see what people say
    - $opts{DEFINE} .= ' -Wimplicit -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wimport -Winline -Wlong-long -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wpacked -Wparentheses -
    Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare -Wswitch -Wtrigraphs -Wundef -Wuninitialized -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wbad-
    function-cast -Wmissing-declarations -Wnested-externs'
    - if $::opt_w;
    + $opts{DEFINE} .= ' -Wall -Wcast-align -Wpointer-arith';
    + $opts{DEFINE} .= ' -Wbad-function-cast -Wcast-qual';
    + #$opts{DEFINE} .= ' -Wconversion'; # very noisy so remove to see what people say
    + $opts{DEFINE} .= ' -Wimplicit -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wimport -Winline -Wlong-long -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wpacked -
    Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare -Wswitch -Wtrigraphs -Wundef -Wuninitialized -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-
    strings -Wbad-function-cast -Wmissing-declarations -Wnested-externs'
    + if $::opt_w;
    }
    $opts{dynamic_lib}->{OTHERLDFLAGS} .= " $::opt_g";
    }
    @@ -804,12 +803,12 @@
    # files, we sadly have to build static on HP-UX 9 :(
    if ($^O eq 'hpux') {
    if ($osvers < 10) {
    - print "WARNING: Forced to build static not dynamic on $^O $osvers.$BELL\n";
    - $opts{LINKTYPE} = 'static';
    + print "WARNING: Forced to build static not dynamic on $^O $osvers.$BELL\n";
    + $opts{LINKTYPE} = 'static';
    }
    else {
    - print "WARNING: If you have trouble, see DBD::Oracle::Troubleshooting::Hpux...\n"
    - ." you may have to build your own perl, or go hunting for libraries\n";
    + print "WARNING: If you have trouble, see DBD::Oracle::Troubleshooting::Hpux...\n"
    + ." you may have to build your own perl, or go hunting for libraries\n";
    }
    print "WARNING: If you have trouble, try perl Makefile.PL -l\n" unless $::opt_l;
    sleep 5;
    @@ -845,11 +844,11 @@
    print "Linker: ". (find_bin('ld')||"not found") ."\n" unless $^O eq 'VMS';
    print "Sysliblist: ".read_sysliblist()."\n";
    print "Oracle makefiles would have used these definitions but we override them:\n"
    - if $MK{CFLAGS} || $MK{LDFLAGS} || $MK{LDSTRING};
    -print " CC: $MK{CC}\n" if $MK{CC};
    -print " CFLAGS: $MK{CFLAGS}\n" if $MK{CFLAGS};
    + if $MK{CFLAGS} || $MK{LDFLAGS} || $MK{LDSTRING};
    +print " CC: $MK{CC}\n" if $MK{CC};
    +print " CFLAGS: $MK{CFLAGS}\n" if $MK{CFLAGS};
    print " [".mkvar('CFLAGS',0,1,0). "]\n" if $MK{CFLAGS};
    -print " CLIBS: $MK{CLIBS}\n" if $MK{CLIBS};
    +print " CLIBS: $MK{CLIBS}\n" if $MK{CLIBS};
    print " [".mkvar('CLIBS',0,1,0). "]\n" if $MK{CLIBS};
    if ($mk_target_rules{build} && !$::opt_b) {
    my $rules = join "\n", '', @{ $mk_target_rules{build} };
    @@ -963,17 +962,17 @@
    my @oh = grep { (glob("$_/libclntsh.$so*"))[0] } @path;

    if (!@oh) { # failing that, try LD_LIBRARY_PATH or equiv
    - my (undef, undef, @ldlibpth) = ldlibpth_info(1);
    - print "using ldlib @ldlibpth\n" if $::opt_v;
    - @oh = grep { (glob("$_/libclntsh.$so*"))[0] } @ldlibpth;
    - # for instant client @oh may be actual ORACLE_HOME
    - # but for non-IC ORACLE_HOME may be dir above a /lib*
    - s:/lib\w*/?$:: for @oh; # remove possible trailing lib dir
    + my (undef, undef, @ldlibpth) = ldlibpth_info(1);
    + print "using ldlib @ldlibpth\n" if $::opt_v;
    + @oh = grep { (glob("$_/libclntsh.$so*"))[0] } @ldlibpth;
    + # for instant client @oh may be actual ORACLE_HOME
    + # but for non-IC ORACLE_HOME may be dir above a /lib*
    + s:/lib\w*/?$:: for @oh; # remove possible trailing lib dir
    }
    if (!@oh) { # else try the traditional kind of install
    - # this should work for non-instant-client installs ($OH/bin & $OH/lib*) - @oh = grep { (glob("$_/../lib*/libclntsh.$so*"))[0] } @path;
    - s:/[^/]/?$:: for @oh;
    + # this should work for non-instant-client installs ($OH/bin & $OH/lib*)
    + @oh = grep { (glob("$_/../lib*/libclntsh.$so*"))[0] } @path;
    + s:/[^/]/?$:: for @oh;
    }
    if (!@oh && lc($^O) eq 'linux') { # Try the standard Linux RPM location
    my @loh = glob("/usr/lib/oracle/*/*/lib/libclntsh.$so*");
    @@ -994,37 +993,37 @@
    my $default_home;
    if ( ! $oh ) {
    if ( $Config{osname} eq "MSWin32") {
    - # Win32::TieRegistry is prefered, but it requires Win32API::Registry - # which is not available in mingw or cygwin
    - eval {
    - require Win32::TieRegistry;
    - $Win32::TieRegistry::Registry->Delimiter("/");
    - $hkey = $Win32::TieRegistry::Registry->{"LMachine/SOFTWARE/Oracle/"}
    + # Win32::TieRegistry is prefered, but it requires Win32API::Registry + # which is not available in mingw or cygwin
    + eval {
    + require Win32::TieRegistry;
    + $Win32::TieRegistry::Registry->Delimiter("/");
    + $hkey = $Win32::TieRegistry::Registry->{"LMachine/SOFTWARE/Oracle/"}
    and $req_ok = 1;
    - };
    - eval { # older name of Win32::TieRegistry
    - require Tie::Registry;
    - $Tie::Registry::Registry->Delimiter("/");
    - $hkey = $Tie::Registry::Registry->{"LMachine/SOFTWARE/Oracle/"}
    + };
    + eval { # older name of Win32::TieRegistry
    + require Tie::Registry;
    + $Tie::Registry::Registry->Delimiter("/");
    + $hkey = $Tie::Registry::Registry->{"LMachine/SOFTWARE/Oracle/"}
    and $req_ok = 1;
    - } unless $req_ok;
    - eval {
    - $default_home = $hkey->{ORACLE_HOME} || '';
    - };
    - eval {
    - $Val = sub {
    - # Return value
    - my ($hkey) = @_;
    - return $hkey->{ORACLE_HOME} || '';
    - };
    - $Keys = sub {
    - # Return list of sub-folder keys
    - my ($hkey) = @_;
    - # MAC: %$hkey and related method calls don't work under
    - # perl5db, so don't try single stepping through here
    - return map {m:/$: ? $hkey->{$_} : ()} keys %$hkey;
    - };
    - } if $hkey;
    + } unless $req_ok;
    + eval {
    + $default_home = $hkey->{ORACLE_HOME} || '';
    + };
    + eval {
    + $Val = sub {
    + # Return value
    + my ($hkey) = @_;
    + return $hkey->{ORACLE_HOME} || '';
    + };
    + $Keys = sub {
    + # Return list of sub-folder keys
    + my ($hkey) = @_;
    + # MAC: %$hkey and related method calls don't work under
    + # perl5db, so don't try single stepping through here
    + return map {m:/$: ? $hkey->{$_} : ()} keys %$hkey;
    + };
    + } if $hkey;
    }

    # Win32::Registry imports some symbols into main::
    @@ -1032,29 +1031,29 @@
    # MAC: it is available under mingw and might be available under cygwin
    # If cygwin doesn't have it, move the rest inside the other if block
    eval {
    - require Win32::Registry;
    - $main::HKEY_LOCAL_MACHINE->Open('SOFTWARE\\ORACLE', $hkey);
    - my $dummy = $main::HKEY_LOCAL_MACHINE; # avoid single use complaint
    - eval {
    - my $hval;
    - $hkey->GetValues($hval);
    - $default_home = $hval->{ORACLE_HOME}[2] || '';
    - };
    - $Val = sub {
    - # Return value
    - my ($hkey) = @_;
    - my $hval;
    - $hkey->GetValues($hval);
    - return $hval->{ORACLE_HOME}[2] || '';
    - };
    - $Keys = sub {
    - # Return list of sub-folder keys
    - my ($hkey) = @_;
    - my @hkey;
    - $hkey->GetKeys(\@hkey);
    - @hkey = map { $hkey->Open($_, $_); $_ } @hkey;
    - return @hkey;
    - };
    + require Win32::Registry;
    + $main::HKEY_LOCAL_MACHINE->Open('SOFTWARE\\ORACLE', $hkey);
    + my $dummy = $main::HKEY_LOCAL_MACHINE; # avoid single use complaint + eval {
    + my $hval;
    + $hkey->GetValues($hval);
    + $default_home = $hval->{ORACLE_HOME}[2] || '';
    + };
    + $Val = sub {
    + # Return value
    + my ($hkey) = @_;
    + my $hval;
    + $hkey->GetValues($hval);
    + return $hval->{ORACLE_HOME}[2] || '';
    + };
    + $Keys = sub {
    + # Return list of sub-folder keys
    + my ($hkey) = @_;
    + my @hkey;
    + $hkey->GetKeys(\@hkey);

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)