The problem is the C compiler on Solaris dos not like:
[1] C++ comments of which there are some in dbdimp.c
remove them or find the C compiler option which tells it to accept them.
[2] there are sometimes lines with cr/lf.
run a dos2unix (or which there are plenty of perl examples) over the files
or manually edit them out on the lines it complains about (i.e. the #define
ones)
Jeff, we get customers hitting this occasionally. Would you consider taking the
C++ comments out and removing the cr/lfs?
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development
On 27-Feb-2003 Jonathan Hall [Dial] wrote:
> Hello dbi-users,
>
> I'm trying to install dbd::odbc v1.04 with perl v5.8.0, dbi v1.32, unixODBC
> v2.2.4, and Easysoft OOB v1.1.0.0
>
> Platforms are MS W2K (SQL 2000) on the server side of the bridge, and
> Solaris 8 on the client side of the bridge.
>
> The dbi is in place and I can successfully get ExampleP / dbi:ExampleP:dir=
> and Proxy from a script containing:-
>
> my @drivers = DBI->available_drivers();
> die "No drivers found!\n" unless @drivers;
> foreach my $driver (@drivers) {
> print "Driver : $driver\n";
> my @data_sources = DBI->data_sources($driver);
> foreach my $data_source (@data_sources) {
> print "\tData source is $data_source\n";
> }
> print "\n";
> }
>
> The unixODBC / Easysoft OOB combination is in place, and I can successfully
> use (unixODBC's) isql against my DSN, to get a connection.
>
> When I come to run the "make" on dbd::odbc though, I get the following
> error:-
>
> [EMAIL PROTECTED]<2187>make
> cp Changes blib/lib/DBD/ODBC/Changes.pm
> cp ODBC.pm blib/lib/DBD/ODBC.pm
> /bin/perl -p -e "s/~DRIVER~/ODBC/g" <
> /usr/local/perl/5.8.0/lib/site_perl/5.8.0/sun4-solaris/auto/DBI/Driver.xst >
> ODBC.xsi
> /bin/perl /usr/local/perl/5.8.0/lib/5.8.0/ExtUtils/xsubpp -typemap
> /usr/local/perl/5.8.0/lib/5.8.0/ExtUtils/typemap ODBC.xs > ODBC.xsc && mv
> ODBC.xsc ODBC.c
> cc -c -I/usr/local/unixODBC/include -I.
> -I/usr/local/perl/5.8.0/lib/site_perl/5.8.0/sun4-solaris/auto/DBI
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.04\"
> -DXS_VERSION=\"1.04\" -KPIC
> "-I/usr/local/perl/5.8.0/lib/5.8.0/sun4-solaris/CORE"
> -I/usr/local/unixODBC/include ODBC.c
> "ODBC.xs", line 1: warning: invalid white space character in directive
> "./ODBC.h", line 9: warning: invalid white space character in directive
> "./fixup_c.h", line 5: warning: invalid white space character in directive
> "./fixup_c.h", line 7: warning: invalid white space character in directive
> "./fixup_c.h", line 9: warning: invalid white space character in directive
> "./fixup_c.h", line 11: warning: invalid white space character in directive
> "./ODBC.h", line 11: warning: invalid white space character in directive
> "./ODBC.h", line 13: warning: invalid white space character in directive
> "./ODBC.h", line 15: warning: invalid white space character in directive
> "./ODBC.h", line 17: warning: invalid white space character in directive
> "ODBC.xs", line 208: warning: invalid white space character in directive
> "ODBC.xs", line 213: warning: invalid white space character in directive
> "ODBC.xs", line 232: warning: argument #1 is incompatible with prototype:
> prototype: pointer to char : "/usr/include/iso/string_iso.h", line
> 66
> argument : pointer to uchar
> "ODBC.xs", line 252: warning: argument #1 is incompatible with prototype:
> prototype: pointer to const char :
> "/usr/local/perl/5.8.0/lib/5.8.0/sun4-solaris/CORE/proto.h", line 570
> argument : pointer to uchar
> "ODBC.xs", line 260: warning: invalid white space character in directive
> cc -c -I/usr/local/unixODBC/include -I.
> -I/usr/local/perl/5.8.0/lib/site_perl/5.8.0/sun4-solaris/auto/DBI
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.04\"
> -DXS_VERSION=\"1.04\" -KPIC
> "-I/usr/local/perl/5.8.0/lib/5.8.0/sun4-solaris/CORE"
> -I/usr/local/unixODBC/include dbdimp.c
> "./ODBC.h", line 9: warning: invalid white space character in directive
> "./fixup_c.h", line 5: warning: invalid white space character in directive
> "./fixup_c.h", line 7: warning: invalid white space character in directive
> "./fixup_c.h", line 9: warning: invalid white space character in directive
> "./fixup_c.h", line 11: warning: invalid white space character in directive
> "./ODBC.h", line 11: warning: invalid white space character in directive
> "./ODBC.h", line 13: warning: invalid white space character in directive
> "./ODBC.h", line 15: warning: invalid white space character in directive
> "./ODBC.h", line 17: warning: invalid white space character in directive
> "dbdimp.c", line 25: syntax error before or at: /
> "dbdimp.c", line 94: syntax error before or at: /
> "dbdimp.c", line 94: invalid source character: '#'
> "dbdimp.c", line 94: undefined or not a type: define
> "dbdimp.c", line 94: identifier redeclared: SQLFreeStmt
> current : function() returning int
> previous: function(pointer to void, ushort) returning sshort :
> "/usr/local/unixODBC/include/sql.h", line 665
> "dbdimp.c", line 94: syntax error before or at: SQLFreeHandle
> "dbdimp.c", line 102: identifier redeclared: SQLFreeHandle
> current : function() returning int
> previous: function(sshort, pointer to void) returning sshort :
> "/usr/local/unixODBC/include/sql.h", line 662
> "dbdimp.c", line 104: warning: function prototype parameters must have types
> "dbdimp.c", line 104: parameter not in identifier list: odbc_init
> "dbdimp.c", line 104: syntax error before or at: dbistate_t
> "dbdimp.c", line 104: parameter not in identifier list: dbistate
> "dbdimp.c", line 105: syntax error before or at: {
> "dbdimp.c", line 106: parameter not in identifier list: dbis
> "dbdimp.c", line 106: cannot initialize parameter: dbis
> "dbdimp.c", line 106: non-constant initializer: op "NAME"
> "dbdimp.c", line 107: syntax error before or at: }
> "dbdimp.c", line 109: only "register" valid as formal parameter storage
> class
> "dbdimp.c", line 110: parameter not in identifier list:
> odbc_clear_result_set
> "dbdimp.c", line 110: cannot recover from previous errors
> cc: acomp failed for dbdimp.c
> *** Error code 2
> make: Fatal error: Command failed for target `dbdimp.o'
> [EMAIL PROTECTED]<2188>
>
> I've checked out perldoc ODBC.pm, but can't find any mention of dbdimp.c
>
> I've checked out perldoc Changes.pm, and can only find:-
> "Fix to dbdimp.c to allow quoted identifiers ..."
>
> I've checked out http://www.xmlproj.com/cgi/fom.cgi, but can't find any
> reference to what I'm seeing
>
> And I've checked through Easysoft's "Building perl dbi dbd-odbc with OOB"
> but can't find anything there either.
>
> I'm not a c programmer, and don't understand the errors that I'm getting.
>
> Can anyone help? All suggestions gratefully appreciated.
>
> Cheers,
>
> Jon
>
> __________________________________________________
>
> Jonathan Hall
> +44 (0) 7 919 165 005 [cell] / +44 (0) 1 628 511 811 [land]
> [EMAIL PROTECTED]
> __________________________________________________
>
> As Shakespeare said in The Merchant of Vienna
> Does Magna Carta mean nothing to you?
> Did she die in vain?
>
>