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



Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 27B8E19B826E for <bug-DBD-ODBC [...] rt.cpan.org>; Tue, 7 Jul 2009 11:32:09 -0400 (EDT)
Received: (qmail 9987 invoked by uid 103); 7 Jul 2009 15:32:09 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Jul 2009 15:32:09 -0000
Received: from relay2.mail.vrmd.de (HELO relay2.mail.vrmd.de) (81.28.224.28) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 07 Jul 2009 08:32:02 -0700
Received: from [92.198.21.83] (helo=[192.168.33.66]) by relay2.mail.vrmd.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <lehmann [...] cnm.de>) id 1MOCeE-0005Ga-UN for bug-DBD-ODBC [...] rt.cpan.org; Tue, 07 Jul 2009 17:31:59 +0200
Delivered-To: cpan-bug+DBD-ODBC [...] diesel.bestpractical.com
Subject: 1.22 doesn't compile on 64 bit systems with unixODBC
MIME-Version: 1.0
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
X-Spam-Status: No, hits=0.0 required=8.0 tests=
Return-Path: <lehmann [...] cnm.de>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-DBD-ODBC [...] rt.cpan.org
Date: Tue, 07 Jul 2009 17:31:59 +0200
X-Relay-User: lehmann [...] variomedia.de
X-Spam-Level: *
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/mixed; boundary="------------050906020301050906050400"
Message-ID: <4A536A6F.3010100 [...] cnm.de>
To: bug-DBD-ODBC [...] rt.cpan.org
From: Marten Lehmann <lehmann [...] cnm.de>
Content-Length: 0
content-type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1001
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
content-type: text/plain; charset="utf-8"; name="dbd-odbc-1.22.patch"
content-disposition: inline; filename="dbd-odbc-1.22.patch"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
Content-Length: 758
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." .
MIME-Version: 1.0
In-Reply-To: <4A536A6F.3010100 [...] cnm.de>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <4A536A6F.3010100 [...] cnm.de>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-25318-1246997712-1969.47650-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 958
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
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.6.HEAD-25318-1246997712-1969.47650-6-0 [...] rt.cpan.org>
References: <RT-Ticket-47650 [...] rt.cpan.org> <4A536A6F.3010100 [...] cnm.de> <rt-3.6.HEAD-25318-1246997712-1969.47650-6-0 [...] rt.cpan.org>
Message-ID: <4A53B62A.1000209 [...] cnm.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 02A7F4D80C7 for <bug-DBD-ODBC [...] rt.cpan.org>; Tue, 7 Jul 2009 16:55:16 -0400 (EDT)
Received: (qmail 7993 invoked by uid 103); 7 Jul 2009 20:55:16 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Jul 2009 20:55:16 -0000
Received: from relay2.mail.vrmd.de (HELO relay2.mail.vrmd.de) (81.28.224.28) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 07 Jul 2009 13:55:10 -0700
Received: from [92.198.21.83] (helo=[192.168.33.66]) by relay2.mail.vrmd.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <lehmann [...] cnm.de>) id 1MOHgv-000051-Ud for bug-DBD-ODBC [...] rt.cpan.org; Tue, 07 Jul 2009 22:55:06 +0200
Delivered-To: cpan-bug+DBD-ODBC [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #47650] 1.22 doesn't compile on 64 bit systems with unixODBC
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
Return-Path: <lehmann [...] cnm.de>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-DBD-ODBC [...] rt.cpan.org
Date: Tue, 07 Jul 2009 22:55:06 +0200
X-Relay-User: lehmann [...] variomedia.de
X-Spam-Level: *
To: bug-DBD-ODBC [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Marten Lehmann <lehmann [...] cnm.de>
RT-Message-ID: <rt-3.6.HEAD-25318-1247000127-15.47650-0-0 [...] rt.cpan.org>
Content-Length: 419
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
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-25318-1247000127-15.47650-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-47650 [...] rt.cpan.org> <4A536A6F.3010100 [...] cnm.de> <rt-3.6.HEAD-25318-1246997712-1969.47650-6-0 [...] rt.cpan.org> <4A53B62A.1000209 [...] cnm.de> <rt-3.6.HEAD-25318-1247000127-15.47650-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-25318-1247157807-5.47650-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1010
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.