Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dmcbride [...] cpan.org
Cc:
AdminCc:

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



Subject: DBD::DB2 1.80 does not compile against perl 5.14.1
Functions called in DB2.xs and dbdimp.c are no longer available. You should be using Devel::PPPort to create a portability header file, ship it in your distribution and #include it, and be using PL_sv_undef instead of sv_undef, and similarly for sv_yes, sv_no, sv_na, dirty, and maybe others I'm missing. Thanks,
Hi Darin, Thanks for notifying this. Do you have a patch for DBD::DB2 on this? If yes, will you be be willing to commit the same? -- Thanks Praveen IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
Subject: Re: [rt.cpan.org #68933] DBD::DB2 1.80 does not compile against perl 5.14.1
Date: Mon, 20 Jun 2011 11:09:20 -0600
To: bug-DBD-DB2 [...] rt.cpan.org
From: Darin McBride <dmcbride [...] cpan.org>
No, I don't have a patch that will work against all versions you may want to support. All I did was change all the functions that gcc complained about by adding PL_ in front, and it eventually compiled (and is now working on a low- volume, but live, site). This worked for perl 5.14.1, but may break you against perl 5.8 or even 5.6 (if you still support those levels). I don't know. However, here's the suggestion. First, download and compile/install perl 5.14.1. I installed it to ~/perl/5.14.1 (I have multiple perl versions installed, and this keeps them apart). Then run (assuming that perl5.14.1 is in your PATH): perl5.14.1 -MDevel::PPPort -lE 'Devel::PPPort::WriteFile' This will create a ppport.h for you. Then you can run: perl5.14.1 ppport.h This will scan your code and make recommendations on what to change. Also, this should include C<#include "ppport.h"> at the top. This means that you must start shipping ppport.h in your distribution. You should from time to time use the latest perl available to do all this again. Hopefully, there are no changes to ppport.h in a new version, in which case there's nothing more to be done. However, the whole purpose of ppport.h is to be able to make changes in the future to the API, and ppport.h is what will protect you, more or less. And before every release, you would ideally rerun the latest perl against the ppport.h just to see if there are any more recommended changes. By the way, I do not write XS code, so I am not an expert on this. This is all from just a few minutes' of reading.
Okay, because I've now installed perl 5.14.2 AND you haven't managed to release a fix based on the above instructions, I had to do this myself again. So I produced a patch. Here's the patch. Please note: 90% of the work was done by Devel::PPPort and running "perl ppport.h" afterward. The patch also removes a C<require "flush.pl"> from your Makefile.PL - not only is that deprecated, but you don't use it anyway. This had to be removed to continue to work in future releases of perl. Please apply and release a newer version, especially before perl 5.14.3 is released.
Subject: add_ppport_h.patch

Message body is not shown because it is too large.

I tested the patched version with perl versions 5.8.8, 5.10.1, 5.12.0, 5.12.1, 5.12.2, 5.14.0, 5.14.1, and 5.14.2, and it seemed to at least compile with all of them.
Hi Darin, I will plan to have this is the next release of the module, planned to happen end of this month. -- Thanks Praveen IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
Hi Darin, New version 1.82 containing this fix is been released. Give it a try and let me know how it goes. -- Thanks Praveen IBM OpenSource Application Development Team India Software Labs, Bangalore (India)