it has been a number of years since i have made and installed the dbi, and i'm at it again.
platform: solaris 9 on sparc, dbi 1.34, dbd informix 2003.03.0401, gcc 2.95.3, perl 5.8.4.
problem is that with the stock perl, (which is 5.6.1), while with some tweaking, i can get things to compile and test reasonably ok. but it is explicit in the README that perl, dbi and dbd should all be compiled with the same compiler. i've also read that there can be issues with replacing the standard perl that comes with solaris.
things compile and run great when i start from scratch, but that means replacing the existing perl that shipped with solaris.
my one thought was to simply install it under a different path, and set my path to point to that when i want to use the dbi.
any other thoughts? i'm sure this has been encountered before..
I've already responded separately to Mickey from the office, but had better make sure the news group knows the answer too.
I did have some extra information to help with the diagnosis:
this is the output of the make:
/tmp/mickm/perl5/bin/perl /tmp/mickm/perl5/lib/5.8.4/ExtUtils/xsubpp -typemap /tmp/mickm/perl5/lib/5.8.4/ExtUtils/typemap Informix.xs > Informix.xsc && mv Informix.xsc Informix.c gcc -c -I/opt/informix/incl/esql -I/tmp/mickm/perl5/lib/5.8.4/sun4-solaris/auto/DBI -I/tmp/mickm/perl5/lib/site_perl/5.8.4/sun4-solaris/auto/DBI -I/auto/DBI -I/tmp/mickm/perl5/lib/site_perl/5.8.4/sun4-solaris/auto/DBI -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2003.03.0401\" -DXS_VERSION=\"2003.03.0401\" -fPIC "-I/tmp/mickm/perl5/lib/5.8.4/sun4-solaris/CORE" -DESQLC_VERSION=953 -DNDEBUG Informix.c 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) *** Error code 1 make: Fatal error: Command failed for target `Informix.o'
OK - I remember what this problem is, now I've rebuilt DBI 1.34 for Perl 5.8.4 and then tried your version of DBD::Informix (and had it pass!!!). I'm using GCC 3.4.1, and it follows ISO C:1999 and permits declarations anywhere in a function, unlike GCC 2.95.3. And that's the trouble. At line 100 of Informix.c, you'd find a declaration D_imp_drh(drh); aftersome code.
So, what's the fix? The code in Informix.xs in 2003.04 is identical with the code in 2003.03.0401, so the change must be in DBI -- it's a bit of template copied from DBI.
And the Changes file for DBI (1.42 happens to be the version I'm looking at) says under DBI 1.35 Fixed to ANSI C in dbd_dr_data_sources thanks to Jonathan Leffler.
Please upgrade your DBI - v1.35 is minimum, 1.43 is recommended.
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/