Skip Menu |
 

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

Report information
The Basics
Id: 47650
Status: resolved
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: lehmann [...] cnm.de
Cc:
AdminCc:

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



Subject: 1.22 doesn't compile on 64 bit systems with unixODBC
Date: Tue, 07 Jul 2009 17:31:59 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Marten Lehmann <lehmann [...] cnm.de>
Download (untitled) / with headers
text/plain 1001b
Hi, since my installation always broke with this error: "I cannot find an ODBC driver manager that I recognize. ...And I know about these drivers: Microsoft ODBC, adabas, easysoft, empress, esodbc, informix, intersolve, iodbc, sapdb, solid, udbc, unixodbc" I looked into Makefile.PL and found this obvious problem at line 349: $myodbc = 'unixodbc' if !$myodbc && glob "$odbchome/lib/libodbc.*"; So Makefile.PL will never detect unixodbc (and other driver managers as well) correctly on 64 bit systems, since most modern 64 bit systems put their libraries into "lib64" and not "lib" os 32 bit systems. The same problem occurs later at line 475: my @libs = glob "$odbchome/lib/libodbc.*"; I attached a patch for release 1.22 which will make it work on 64 bit, but then it won't work on 32 bit any longer. Makefile.PL should include a --libdir parameter to define "lib" or "lib64", or maybe it can detect this on its own. Kind regards Marten Lehmann
Download dbd-odbc-1.22.patch
text/x-diff 758b
--- DBD-ODBC-1.22/Makefile.PL.orig 2009-04-20 17:21:34.000000000 +0200 +++ DBD-ODBC-1.22/Makefile.PL 2009-07-06 18:20:02.000000000 +0200 @@ -347,7 +347,7 @@ $arext =~ s/^\.//; $myodbc = 'unixodbc' - if !$myodbc && glob "$odbchome/lib/libodbc.*"; + if !$myodbc && glob "$odbchome/lib64/libodbc.*"; $myodbc = 'iodbc' if !$myodbc && ((glob "$odbchome/*iodbc*") || @@ -472,7 +472,7 @@ } else { print " odbc_config not found - ok\n"; } - my @libs = glob "$odbchome/lib/libodbc.*"; + my @libs = glob "$odbchome/lib64/libodbc.*"; my @ilibs = grep { /\.($Config{so}|$Config{dlext}|a)$/ } @libs; if (scalar(@ilibs) == 0) { die "That's odd, I can't see any unixodbc libs in $odbchome." .
Download (untitled) / with headers
text/plain 958b
On Tue Jul 07 11:32:27 2009, lehmann@cnm.de wrote: Show quoted text
> Hi, > > since my installation always broke with this error: >
<snipped> Marten, I'll work through this in the nest few days - thanks. I don't actually have a 64 bit linux machine but I'll organise one to try this out. The main problem with unixODBC and 64 bit platforms is that MS changed the spec (they use) where SQLLEN/SQLULEN was a 32bit integer on all platforms and is now 32bits on 32bit platforms and 64bits on 64bit platforms. Until the latest pre-release of unixODBC, the default was the former and now the default is the latter. DBD::ODBC needs to be built with the same size as the driver manager (difficult since it is written in configure although in more recent unixODBCs odbcinst shows the size of SQLLEN and includes the C macros used to build it) and the ODBC driver (much more difficult since there is no standard to expose how it was built). Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #47650] 1.22 doesn't compile on 64 bit systems with unixODBC
Date: Tue, 07 Jul 2009 22:55:06 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Marten Lehmann <lehmann [...] cnm.de>
Download (untitled) / with headers
text/plain 419b
Hello, Show quoted text
> The main problem with unixODBC and 64 bit platforms is that MS changed > the spec (they use) where SQLLEN/SQLULEN was a 32bit integer on all > platforms and is now 32bits on 32bit platforms and 64bits on 64bit > platforms. > [...]
I didn't know about this issues yet. Anyway, I am successful to connect to a Sybase SQL Anywhere 8 and MS SQL Server 2003 through FreeTDS over unixODBC. Kind regards Marten
Download (untitled) / with headers
text/plain 1010b
On Tue Jul 07 16:55:27 2009, lehmann@cnm.de wrote: Show quoted text
> Hello, >
> > The main problem with unixODBC and 64 bit platforms is that MS changed > > the spec (they use) where SQLLEN/SQLULEN was a 32bit integer on all > > platforms and is now 32bits on 32bit platforms and 64bits on 64bit > > platforms.
> > [...]
> > I didn't know about this issues yet. Anyway, I am successful to connect > to a Sybase SQL Anywhere 8 and MS SQL Server 2003 through FreeTDS over > unixODBC. > > Kind regards > Marten
Hi, I have an alternate patch I've been working on which I think will solve the problem you reported if ODBCHOME or -o is NOT specified on the command line. It looks at the dirs in Perl's libspath which is what Perl used to find extra libs and that also means it should find the unixODBC built the same way as perl. If I was to send it to you would you be prepared to give it a try? If you send an email to mjevans @ cpan dot org I will reply with a new distribution. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.