Skip Menu |

This queue is for tickets about the DBD-DB2 CPAN distribution.

Report information
The Basics
Id: 44903
Status: resolved
Priority: 0/
Queue: DBD-DB2

People
Owner: opendev [...] us.ibm.com
Requestors: appfault [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Perl v5.8.7 and DBD-DB2-1.71 differ on include paths
Perl v5.8.7 and DBD-DB2-1.71 differ on include paths The following patch fixes the issue. --- Makefile.PL 2009-02-23 05:03:37.000000000 +0000 +++ Makefile.PL 2009-04-08 21:26:07.000000000 +0000 @@ -126,7 +126,7 @@ { # --- Setup include paths and libraries - $opts{INC} .= qq(-I"$DB2/include" -I"$Config{sitearch}/auto/DBI" ); + $opts{INC} .= qq(-I"$DB2/include" -I"$Config{sitearch}/auto/DBI" -I"$Config{archlib}/auto/DBI"); $opts{INC} .= qq(-I"$Config{vendorarch}/auto/DBI") if $Config{vendorarch}; $opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '};
RT-Send-CC: opendev [...] us.ibm.com
Hi Thanks for reporting this. As far as I remember, version 1.3 fixed the issue of different include paths for both 5.8.7 and 5.10. Also, with the current makefile, the code is getting build successfully. I would like to know if you are getting any build errors of any specific kinds. However, I would definitely check the makefile again and test it across platforms to verify the include file problems if any. -- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
This is still broken with Perl v5.10.0. According to `man Config` with Perl v5.10.0 the 'installvendorarch' variable is the correct one to use for make files. Indeed patching the Makefile.PL to use installvendorarch does work.
--- Makefile.PL 2009-02-23 05:03:37.000000000 +0000 +++ Makefile.PL 2009-06-08 20:06:47.000000000 +0000 @@ -79,7 +79,7 @@ if( $] ge '5.010000') { $opts{INC} .= qq(-I"$DB2/include" -I"$Config{archlib}/auto/DBI" ); - $opts{INC} .= qq(-I"$Config{vendorarch}/auto/DBI") if $Config{vendorarch}; + $opts{INC} .= qq(-I"$Config{installvendorarch}/auto/DBI") if $Config{installvendorarch}; $opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '}; } else
New patch for the win and non-win sides.
--- DBD-DB2-1.71/Makefile.PL 2009-02-23 05:03:37.000000000 +0000 +++ Makefile.PL 2009-06-08 20:42:04.000000000 +0000 @@ -79,7 +79,7 @@ if( $] ge '5.010000') { $opts{INC} .= qq(-I"$DB2/include" -I"$Config{archlib}/auto/DBI" ); - $opts{INC} .= qq(-I"$Config{vendorarch}/auto/DBI") if $Config{vendorarch}; + $opts{INC} .= qq(-I"$Config{installarchlib}/auto/DBI") if $Config{installarchlib}; $opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '}; } else @@ -127,7 +127,7 @@ # --- Setup include paths and libraries $opts{INC} .= qq(-I"$DB2/include" -I"$Config{sitearch}/auto/DBI" ); - $opts{INC} .= qq(-I"$Config{vendorarch}/auto/DBI") if $Config{vendorarch}; + $opts{INC} .= qq(-I"$Config{installarchlib}/auto/DBI") if $Config{installarchlib}; $opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '}; my $DB2LIB = $ENV{'DB2LIB'};
Thanks I had been a bit tied up with other work so did not find much time to look into it earlier. However, I would verify, test this and would include it into next release. I would get back to you on this one by Monday. On Mon Jun 08 17:07:58 2009, appfault wrote: Show quoted text
> New patch for the win and non-win sides.
-- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
RT-Send-CC: opendev [...] us.ibm.com
Hi.. I noticed that in 5.10 the DBI gets installed in installsitearch and not in installlibarch. However, for better compatibility I have included the includepaths according to how perl would search its libraries by running the following commands $ perl '-V:install.*' $ perl -le 'print join $/, @INC' I would request you to verify this on your machine. Since this is a makefile change, I would need to verify this on other systems as well like solaris, AIX, MacOS etc before making a release. -- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
# engn/perldb2/Makefile.PL, engn_perldb2, db2_v82fp9, 1.11 04/09/14 10:47:41 # # Copyright (c) 1995-2004 International Business Machines Corp. # #!/usr/local/bin/perl -sw use ExtUtils::MakeMaker qw(&WriteMakefile $Verbose ); use Getopt::Std; use Config; require 'flush.pl'; use DBI; # The DBI must be installed before we can build a DBD my %opts = ( 'NAME' => 'DBD::DB2', 'VERSION_FROM' => 'DB2.pm', ($] ge '5.005') ? ( 'AUTHOR' => 'DB2 Perl (db2perl@ca.ibm.com)', 'ABSTRACT' => 'Perl driver for IBM DB2 Universal Database', ) : (), ( $Config{archname} =~ /-object\b/i ) ? ( 'CAPI' => 'TRUE', ) : (), 'OBJECT' => '$(O_FILES)', ); # --- Introduction print "\nConfiguring DBD::DB2...\n"; print "Remember to actually read the README and CAVEATS files!\n\n"; # --- Operating system my $os = $^O; # --- Where is DB2 installed... my $envvar = 'DB2_HOME'; my $DB2 = $ENV{$envvar}; if( not $DB2 ) { $envvar = 'DB2PATH'; $DB2 = $ENV{$envvar}; } if( not $DB2 ) { my ($pathsep, $path, @pathlist); $pathsep = $Config{'path_sep'}; $pathsep = ':' unless $pathsep; $path = $ENV{'PATH'}; $path =~ s:\\:/:g if $pathsep eq ';'; @pathlist = split /$pathsep/, $path; foreach $path (@pathlist) { if( lc( substr( $path, -4 ) ) eq '/bin' && -f "$path/../include/sqlcli.h" ) { $DB2 = substr( $path, 0, -4 ); last; } } } $DB2 =~ s:\\:/:g if $os eq 'MSWin32' || $os eq 'MSWin64' || $os eq 'os2'; $DB2 =~ s/"//g; die "DB2_HOME environment variable must be set to installed location of DB2.\n" unless $DB2; die "$envvar environment variable ($DB2) not valid.\n" unless -d $DB2; print qq(Using DB2 in "$DB2"\n); # --- Setup include paths and libraries $opts{INC} .= qq(-I"$DB2/include" -I"$Config{sitearchexp}/auto/DBI" ); $opts{INC} .= qq(-I"$Config{installarchlib}/auto/DBI") if $Config{installarchlib}; $opts{INC} .= qq(-I"$Config{installvendorarch}/auto/DBI") if $Config{installvendorarch}; $opts{INC} .= qq(-I"$Config{installsitearch}/auto/DBI") if $Config{installsitearch}; $opts{dynamic_lib} = { OTHERLDFLAGS => '$(COMPOBJS) '}; # libraries required to build DBD::DB2 driver if( $os eq 'MSWin32' || $os eq 'MSWin64' || $os eq 'os2' ) { my $DB2LIB = $ENV{'DB2LIB'}; if( not $DB2LIB ) { if (-e "$DB2/lib64") { $DB2LIB = "$DB2/lib64"; } else { if (-e "$DB2/lib32") { $DB2LIB = "$DB2/lib32"; } else { $DB2LIB = "$DB2/lib"; } } } $sysliblist = qq(-L"$DB2LIB" db2cli.lib db2api.lib); my @libpaths = split /;/, $ENV{'LIB'}; my $libpath; while( @libpaths ) { ( $libpath = shift(@libpaths) ) =~ s/"//g; # Remove quotes $libpath =~ s:\\:/:g; if( $libpath && $sysliblist !~ /-L"$libpath"/i ) { $sysliblist .= qq( -L"$libpath"); } } } else { my $DB2LIB = $ENV{'DB2LIB'}; if( not $DB2LIB ) { if (-e "$DB2/lib64") { $DB2LIB = "$DB2/lib64"; } else { if (-e "$DB2/lib32") { $DB2LIB = "$DB2/lib32"; } else { $DB2LIB = "$DB2/lib"; } } } $sysliblist = "-L$DB2LIB -ldb2"; } # --- Handle special cases --- if ($os eq 'hpux') { $sysliblist .= ' -lcl'; $opts{DEFINE} .= ' +e'; } #Defining a macro to fix the compile issue in DBD::DB2 #which was due to change in definition of DBIc_CACHED_KIDS in DBIv1.55 #if( $DBI::VERSION > 1.54 ) if( "$DBI::VERSION" ge "1.55" ) { $opts{DEFINE} .= ' -DDB2_CACHE_FIX '; } $opts{LIBS} = [ $sysliblist ]; # log key platform information to help me help you quickly print "System: perl$] DBI$DBI::VERSION @Config{qw(myuname archname dlsrc)}\n"; print "Compiler: @Config{qw(cc optimize ccflags)}\n"; print "Includes: $opts{INC}\n"; print "Libraries: @{$opts{LIBS}}\n"; print "\n"; WriteMakefile(%opts); exit 0; sub MY::post_initialize{ ' default_target: all '; } __END__
Released in version 1.74. CPAN would be updated with this release by EOD tomorrow. -- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)