Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Sybperl 2.0 Installation problems
Date: Jan 11 1996 7:27AM

> I've been following the list and the FAQ, and I haven't seen anyone
>with this problem before.  I'm running perl 5.001m, and I'm trying to
>compile Sybperl 2.0.  We have Sybase 10, although I'm clueless as to
>how to find out how to get more specific than that.  perl Makefile.PL
>goes fine, but when I do the make, I get this:
> [ 202 ]% make

[ ...deleted... ]

> gcc -c -O -fpic -I/product/perl/lib/perl5/sun4-solaris/CORE -DCTLIBVS=100 -DSYBPLVER='"2.0"' -DUNDEF_BUG -I/product/sybase10/include CTlib.c
> CTlib.c: In function `constant':
> CTlib.c:1494: parse error before `CS_VOID'
> CTlib.c:1506: parse error before `CS_VOID'


This error has pointed out something to me that may need fixing, but I
am still surprised that gcc will not let you compile it (while it works

Initially it looked like CS_VOID was not defined for some reason (and
you can test to see if this is the case by adding

#ifnef CS_VOID
#define CS_VOID void

near the top of CTlib.xs)

However, after some closer analysis, I see that the first error happens
when constant() tries to return CS_BLKDESC, which is normally
typedef'ed to 'struct _cs_blkdesc. Aha! Normally, this would mean the
CS_BLKDESC is *not* #define'd, so the code

		if (strEQ(name, "CS_BLKDESC"))
		    return CS_BLKDESC;
		goto not_there;

should compile the 'goto not_there' branch. (I verified this here by
trying this little script:

kiruna (8:20am):32 > perl -e 'use Sybase::CTlib; print &CS_BLKDESC, "\n";' 

Your vendor has not defined Sybase::CTlib macro CS_BLKDESC, used at -e line 1 (main).
kiruna (8:21am):33 > 

We are getting closer :-)

So now we take a look at the Sybase include files again, and find that
CS_BLKDESC *can* end up #define'd (as CS_VOID) *if* 'lint is #define'd
(see cspublic.h, around line 750). So it looks like your copy of gcc
thinks that it is lint, or that something else #defines 'lint' (or that
your copy of cspublic.h is somhow munged...)

In CONFIG, try adding -Ulint to the EXTRA_DEFS line, and see what happens...

Hope this helps, and isn't totally confusing the issue :-)