Skip Menu |

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

Report information
The Basics
Id: 2183
Status: resolved
Worked: 1.6 hours (93 min)
Priority: 0/
Queue: DBD-Informix

People
Owner: j.leffler [...] acm.org
Requestors: st-meyer [...] foni.net
Cc: jleffler [...] earthlink.net
jleffler [...] us.ibm.com
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2003.03.0303
  • 2003.03.0400
  • 2003.03.0401
  • 2003.04
Fixed in:
  • 2003.03.0303
  • 2003.03.0400
  • 2003.03.0401
  • 2003.04



Subject: Problem with compiling DBD::Informix
Hello, I have a problem compile DBD::Informix. Here is the error: Informix.xsi: In function `XS_DBD__Informix__dr_data_sources': Informix.xsi:56: parse error before `*' Informix.xsi:58: `av' undeclared (first use in this function) Informix.xsi:58: (Each undeclared identifier is reported only once Informix.xsi:58: for each function it appears in.) Informix.xsi:58: `imp_drh' undeclared (first use in this function) I found that in the Change of DBD-Informix-2003.03.0400 stand that there was a fix which cause this error but i it still there. I found that the File Informix.xsi is generated with: /usr/bin/perl -p -e "s/~DRIVER~/Informix/g" < /usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI/Driver.xst > Informix.xsi so i must delete the function data_sources in this Informix.xsi manualy and then it compiles. I think it is a problem in the DBI module in /usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI/Driver.xst Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.4.3, archname=i586-linux uname='linux ragsdale 2.4.3 #1 smp fri sep 13 11:17:17 utc 2002 i686 unknown ' config_args='-ds -e -Dprefix=/usr -Di_db -Di_dbm -Di_ndbm -Di_gdbm' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O2 -pipe', gccversion=2.95.3 20010315 (SuSE) cppflags='-fno-strict-aliasing -I/usr/local/include' ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Sep 19 2002 14:48:47 @INC: /usr/lib/perl5/5.6.0/i586-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i586-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl Linux mnp-engine-lx 2.4.18-64GB-SMP #1 SMP Wed Dec 4 22:19:46 GMT 2002 i686 unknown Modul: DBD-Informix-2003.03.0401 I hope this will help you find this bug and fix it. sincerely yours Stefan
RT-Send-CC: jleffler [...] earthlink.net, jleffler [...] us.ibm.com
[guest - Wed Mar 5 14:55:16 2003]: Show quoted text
> Hello, > > > I have a problem compile DBD::Informix. > > Here is the error: > > Informix.xsi: In function `XS_DBD__Informix__dr_data_sources': > Informix.xsi:56: parse error before `*' > Informix.xsi:58: `av' undeclared (first use in this function) > Informix.xsi:58: (Each undeclared identifier is reported only once > Informix.xsi:58: for each function it appears in.) > Informix.xsi:58: `imp_drh' undeclared (first use in this function)
That one is supposed to be fixed, as you noted below. Please provide me with copies of the files Informix.xs, Informix.xsi and Informix.c (gzipped tar file, or just plain old attachments). Please also confirm that you are using DBI 1.34. And please also ensure that you really, really are using DBD::Informix 2003.03.0401. The version I downloaded from CPAN does not have a data_sources function in Informix.xs. I recommend a 'make distclean' followed by 'perl Makefile.PL && make && make test && make install'. In general, please also note that bug reporting procedure documented in the README file -- I've no objection to collecting bugs via rt.cpan.org, but I do need the information that is documented in the README file and automatically provided by the BugReport or InformixTechSupport scripts. Note that there is now a DBD::Informix 2003.04 available on CPAN. It is an administrative release - purely changing version numbers. Show quoted text
> I found that in the Change of DBD-Informix-2003.03.0400 > stand that there was a fix which cause this error but i it still > there. I found that the File Informix.xsi is generated with: > > /usr/bin/perl -p -e "s/~DRIVER~/Informix/g" < > /usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI/Driver.xst > > Informix.xsi > > so i must delete the function data_sources in this Informix.xsi > manualy and then it compiles. > > I think it is a problem in the DBI module in > /usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI/Driver.xst
Which version of DBI are you using? Show quoted text
> I hope this will help you find this bug and fix it. > > > sincerely yours Stefan
RT-Send-CC: jleffler [...] earthlink.net, jleffler [...] us.ibm.com
[st-meyer@foni.net - Thu Mar 6 02:00:38 2003]: Show quoted text
> >Which version of DBI are you using?
> > I am using DBI 1.34
Good. Show quoted text
> I still have this Problem. I make a make distclean but it does not > help. Here is the full output:
That's not the really interesting bit - I want to see the output of 'perl Makefile.PL'. I also cannot find the Informix.xs, Informix.xsi and Informix.c files as attachments at the rt.cpan.org site - which is likely to be a problem with that site rather than anything else. Please send them to me direct - by regular email - to jleffler@earthlink.net AND jleffler@us.ibm.com. They are collectively critical to understanding the problem. While you are at it, please include the Driver.xst file too. Show quoted text
> /usr/bin/perl -p -e "s/~DRIVER~/Informix/g" < > /usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI/Driver.xst > > Informix.xsi
This creates Informix.xsi. Show quoted text
> /usr/bin/perl -I/usr/lib/perl5/5.6.0/i586-linux -I/usr/lib/perl5/5.6.0 > /usr/lib/perl5/5.6.0/ExtUtils/xsubpp -typemap > /usr/lib/perl5/5.6.0/ExtUtils/typemap Informix.xs > Informix.xsc && > mv Informix.xsc Informix.c
This takes Informix.xsi, Informix.xs and some other bits and creates Informix.c Show quoted text
> cc -c -I/opt/informix/incl/esql > -I/usr/lib/perl5/5.6.0/i586-linux/auto/DBI > -I/usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI -I/auto/DBI > -I/usr/lib/perl5/site_perl/5.6.0/i586-linux/auto/DBI > -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -O2 -pipe -DVERSION=\"2003.04\" > -DXS_VERSION=\"2003.04\" -fpic > -I/usr/lib/perl5/5.6.0/i586-linux/CORE -DESQLC_VERSION=930 -DNDEBUG > Informix.c
You have upgraded to 2003.04, uploaded earlier today, which completely confuses me (at one level), and reassures us at another - the problem is sysematic. It may take a while to work out what is up; I may even have to go and build a Perl 5.6.0 to see whether I can get it to reproduce (I've got 5.005_03, 5.6.1 and 5.8.0 pre-built). Show quoted text
> Informix.xsi: In function `XS_DBD__Informix__dr_data_sources': > Informix.xsi:56: parse error before `*' > Informix.xsi:58: `av' undeclared (first use in this function) > Informix.xsi:58: (Each undeclared identifier is reported only once > Informix.xsi:58: for each function it appears in.) > Informix.xsi:58: `imp_drh' undeclared (first use in this function) > make: *** [Informix.o] Error 1 > > And the Files Informix.c Informix.xsi and Informix.xs as attachment.
Not found...sorry. Show quoted text
> I am sorry if i made something wrong with sending an bugreport over > this tracking system and didnt read the readme file. Its me first > time sending a bug report to cpan.
I wasn't even aware of rt.cpan.org until your message arrived. However, the information I need to debug problems is clearly stated (it includes the output of 'perl Makefile.PL' for example), and it simplifies my life because I don't have to do as much of the pestering like this as I'm having to do. Please send the Informix.c, Informix.xs, Informix.xsi and Driver.xst files directly to me at the email addresses jleffler@earthlink.net and jleffler@us.ibm.com so I get to see them. Thanks, Jonathan Leffler <jleffler@earthlink.net> <jleffler@us.ibm.com> <JOHNL@cpan.org>
[JOHNL - Thu Mar 6 14:51:20 2003]: Show quoted text
> Note that the problem has been resolved.
[...incomplete message accidentally sent...] The code in Driver.xst (provided by DBI v1.34) for the data_sources() method is faulty in that it will not compile with C compilers that do not support declarations interleaved with statements, as in: int function(void) { int i; i = 3; int j = i + 1; /* Problem */ return(j); } A patch for Driver.xst from DBI 1.34 has been sent to Tim Bunce, and posted to those who have explicitly run into this problem, and also sent to dbi-users@perl.org. Fundamentally, it puts an extra open brace immediately after the PPCODE: directive (before the declaration D_imp_drh(drh);) and an extra close brace at the end of the function body. The patch also annotates this and indents the code properly. -- Jonathan Leffler <jleffler@earthlink.net> <jleffler@us.ibm.com> Guardian of DBD::Informix 2003.04 -- see http://dbi.perl.org/ "I don't suffer from insanity - I enjoy every minute of it!"