Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jello [...] debian.org
Cc:
AdminCc:

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



Subject: Can't build DBD::ODBC v1.15
Downloaded and installed StrawberryPerl 5.10.0 from: http://strawberryperl.com/download/strawberry-perl-5.10.0-final.exe Tried to install the DBD::ODBC module from CPAN and it failed. It looks to me like the triggering error is: In file included from ODBC.xs:1: ODBC.h:13:61: DBIXS.h: No such file or directory Digging deeper, it seems that the DBIXS.h file does exist within the strawberry perl tree: C:\>dir /s/b c:\strawberry\DBIXS.h c:\strawberry\perl\site\lib\auto\DBI\DBIXS.h However it doesn't seem like this directory is part of the normal include search path: C:\>echo %INCLUDE% C:\Program Files\Microsoft Visual Studio.NET\FrameworkSDK\include\;C:\strawberry\c\include;C:\strawberry\perl\lib\CORE Nor was it specifically mentioned (via -I) in the compile args: gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-IC:\strawberry\perl\lib\CORE" -DWITH_UNICODE ODBC.c Per ADAMK in http://rt.cpan.org/Public/Bug/Display.html?id=32789: The DBI-specific path will of course not be included in the INCLUDE paths, as it is only needed for this specific case. This is not as bug in Strawberry Perl, it is a bug in the Makefile.PL for DBD::ODBC, not looking for the .h file in a typical location. ---- Let me know if you need any additional info. --Joe
Subject: DBD-ODBC-1.15-build.log
Download DBD-ODBC-1.15-build.log
application/octet-stream 59.7k

Message body not shown because it is not plain text.

I'm not so sure this is an DBD::ODBC issue. When I install Strawberry perl and repeat the exercise I get a Makefile containing snippets like this: # MakeMaker 'CONFIGURE' Parameters: # INC => q[ -IC:\strawberry\perl\site\lib\auto\DBI] INC = -IC:\strawberry\perl\site\lib\auto\DBI # --- MakeMaker const_cccmd section: CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) So the path to DBI files is defined and added to the Makefile. Unfortunately I cannot take this any further at the moment because I don't have nmake or a compiler on this windows machine. Please look at the Makefile that was generated for you and search it for lines like those above - have you got them? and if so then why is the CC command being run without the INC? Martin -- Martin J. Evans Wetherby, UK
As the reporter has not replied I have commented at: http://rt.cpan.org//Ticket/Display.html?id=32789 where the issue was originally reported. Martin
Subject: Re: [rt.cpan.org #32811] Can't build DBD::ODBC v1.15
Date: Fri, 15 Feb 2008 15:28:27 +0000
To: Martin J Evans via RT <bug-DBD-ODBC [...] rt.cpan.org>
From: Joe Nahmias <jello [...] debian.org>
Hi Martin, Sorry, I don't have nmake, only the dmake that comes with strawberry perl. Attached is the generated Makefile. --Joe

Message body is not shown because sender requested not to inline it.

On Fri Feb 15 10:30:13 2008, jello wrote: Show quoted text
> Hi Martin, > > Sorry, I don't have nmake, only the dmake that comes with strawberry > perl. Attached is the generated Makefile. > > --Joe
The Makefile generated for dmake is wrong. However, I notice: # MakeMaker ARGV: (q[LIBS=-LC:\strawberry\c\lib], q[INC=-IC:\strawberry\c\include]) at the start of your Makefile. What command are you typing to generate the Makefile? I think the issue is that if INC is set on the command line it is overriding any additions to INC in the Makefile.PL. As a result, to make it work if you need to specify paths on the command line you'd need to add -IC:\strawberry\perl\site\lib\auto\DBI to INC on the command line too. I'm not sure if this is an ExtUtils::MakeMaker issue but I still doubt it is a DBD::ODBC one. Martin
Subject: Re: [rt.cpan.org #32811] Can't build DBD::ODBC v1.15
Date: Fri, 15 Feb 2008 18:48:43 +0000
To: Martin J Evans via RT <bug-DBD-ODBC [...] rt.cpan.org>
From: Joe Nahmias <jello [...] debian.org>
Hi Martin, On Fri, Feb 15, 2008 at 11:17:35AM -0500, Martin J Evans via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > On Fri Feb 15 10:30:13 2008, jello wrote:
> > Hi Martin, > > > > Sorry, I don't have nmake, only the dmake that comes with strawberry > > perl. Attached is the generated Makefile. > > > > --Joe
> > The Makefile generated for dmake is wrong. However, I notice: > > # MakeMaker ARGV: (q[LIBS=-LC:\strawberry\c\lib], > q[INC=-IC:\strawberry\c\include]) > > at the start of your Makefile. What command are you typing to generate > the Makefile?
I'm not typing anything to explicitly generate the Makefile. All I do is run "cpan -i DBD::ODBC". Reading cpan.bat, it looks like all it does is call "CPAN::Shell->$method( $arg )" with $method = "install" and $arg = "DBD::ODBC". Show quoted text
> I think the issue is that if INC is set on the command > line it is overriding any additions to INC in the Makefile.PL. As a > result, to make it work if you need to specify paths on the command line > you'd need to add > > -IC:\strawberry\perl\site\lib\auto\DBI > > to INC on the command line too. I'm not sure if this is an > ExtUtils::MakeMaker issue but I still doubt it is a DBD::ODBC one.
Well I've temporarily worked around the problem by editing the INC line of the Makefile manually to include that directory. I don't what else I should or could be doing. --Joe
From: martin.evans [...] easysoft.com
On Fri Feb 15 13:50:03 2008, jello wrote: Show quoted text
> Hi Martin,
Show quoted text
> I'm not typing anything to explicitly generate the Makefile. All I do > is run "cpan -i DBD::ODBC". Reading cpan.bat, it looks like all it > does is call "CPAN::Shell->$method( $arg )" with $method = "install" > and $arg = "DBD::ODBC".
Yes, I appreciate that now. I've reproduced this issue but I cannot explain (as yet) why INC on the command line overrides the Makefile.PL from adding paths. I've posted to makemaker list for help. Show quoted text
> Well I've temporarily worked around the problem by editing the INC > line of the Makefile manually to include that directory. I don't what > else I should or could be doing.
At least you are up and running. I'll leave this issue open until I can find out more from the makemaker list. Martin
I've looked at this again and taken advice. ExtUtils::MakeMaker refuses to let Makefile.PL override or add to INC and strawberry perl sets makepl_args to INC so I am now checking for INC in ARGV, outputting a warning and not writing a makefile. This means a) cpan testers running strawberry perl does not FAIL and b) anyone else using strawberry perl will get output telling them what to do. Unless you object I'll be closing this now. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #32811] Can't build DBD::ODBC v1.15
Date: Thu, 25 Sep 2008 21:29:55 +0000
To: Martin J Evans via RT <bug-DBD-ODBC [...] rt.cpan.org>
From: Joe Nahmias <jello [...] debian.org>
On Thu, Sep 25, 2008 at 03:24:29PM -0400, Martin J Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > I've looked at this again and taken advice. ExtUtils::MakeMaker refuses > to let Makefile.PL override or add to INC and strawberry perl sets > makepl_args to INC so I am now checking for INC in ARGV, outputting a > warning and not writing a makefile. This means a) cpan testers running > strawberry perl does not FAIL and b) anyone else using strawberry perl > will get output telling them what to do.
In which version of DBD::ODBC did you do this? I tried with 1.17 and it still errors in the same way. Show quoted text
> Unless you object I'll be closing this now.
I'd like to be able to see/test the fix before you close the report. Is there a cvs/svn/git/etc... repo I should check out? Show quoted text
> Martin
--Joe
On Thu Sep 25 17:30:20 2008, jello wrote: Show quoted text
> On Thu, Sep 25, 2008 at 03:24:29PM -0400, Martin J Evans via RT wrote:
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > > > I've looked at this again and taken advice. ExtUtils::MakeMaker refuses > > to let Makefile.PL override or add to INC and strawberry perl sets > > makepl_args to INC so I am now checking for INC in ARGV, outputting a > > warning and not writing a makefile. This means a) cpan testers running > > strawberry perl does not FAIL and b) anyone else using strawberry perl > > will get output telling them what to do.
> > In which version of DBD::ODBC did you do this? I tried with 1.17 and it > still errors in the same way. >
> > Unless you object I'll be closing this now.
> > I'd like to be able to see/test the fix before you close the report. Is > there a cvs/svn/git/etc... repo I should check out? >
> > Martin
> > --Joe
It is checked in to subversion. See the pod that comes with DBD::ODBC. If you need a distribution with the change it will have to wait until tomorrow but I could email it to you. The version in subversion is 1.17_1. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #32811] Can't build DBD::ODBC v1.15
Date: Thu, 25 Sep 2008 21:46:16 +0000
To: Martin J Evans via RT <bug-DBD-ODBC [...] rt.cpan.org>
From: Joe Nahmias <jello [...] debian.org>
On Thu, Sep 25, 2008 at 05:34:31PM -0400, Martin J Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > On Thu Sep 25 17:30:20 2008, jello wrote:
> > On Thu, Sep 25, 2008 at 03:24:29PM -0400, Martin J Evans via RT wrote:
> > > <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > > > > > I've looked at this again and taken advice. ExtUtils::MakeMaker refuses > > > to let Makefile.PL override or add to INC and strawberry perl sets > > > makepl_args to INC so I am now checking for INC in ARGV, outputting a > > > warning and not writing a makefile. This means a) cpan testers running > > > strawberry perl does not FAIL and b) anyone else using strawberry perl > > > will get output telling them what to do.
> > It is checked in to subversion. See the pod that comes with DBD::ODBC. > If you need a distribution with the change it will have to wait until > tomorrow but I could email it to you. The version in subversion is 1.17_1.
OK, checked out svn, built fine for me. :D Thanks for your work on this! --Joe
Interesting thread on perl monks about strawberry perl and setting INC: http://www.perlmonks.org/?node_id=714150
This: http://www.mail-archive.com/dbi-users@perl.org/msg31418.html is going to be a permanent solution. This will be in 1.17_2.
Subject: Re: [rt.cpan.org #32811] Can't build DBD::ODBC v1.15
Date: Thu, 13 Nov 2008 22:30:41 +0000
To: Martin J Evans via RT <bug-DBD-ODBC [...] rt.cpan.org>
From: Joe Nahmias <jello [...] debian.org>
On Tue, Nov 11, 2008 at 04:10:00PM -0500, Martin J Evans via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32811 > > > This: > > http://www.mail-archive.com/dbi-users@perl.org/msg31418.html > > is going to be a permanent solution. This will be in 1.17_2.
Great news! Thanks for keeping after this, I really appreciate it. --Joe