Subject: Problem in Installing Postgres-v4.0

From: Shin'ichi KONOMI <[email-masked]>
Date: Tue, 21 Jul 92 19:04:52 -0700

Yesterday, I got postgres-v4r0.tar.Z from Kyoto University 
and tried to install it on a SPARCstation IPX. However, 
"~postgres/newconf/Make install" fails.

Error messages are generated while compiling "inh.c".
They indicate that ~postgres/src/lib/H/nodes/*.gen 
have errors. 

The errors in *.gen files seem to be in lines defining 
variables of specific types, such as FuncIndexInfoPtr, 
IndexInfoPtr, ExprContext, TupleTableSlot, ScanDirection, 
HeapTuple, RelationInfo, TupleCount, etc.

Did anyone find bugs in the program that generates *.gen 
(~postgres/src/lib/Gen/*.sh) ?

I appreciate any kind of advice. Sorry if I am too easy to ask.
--
Shin'ichi KONOMI 
  Computer Center, Kyushu University, Fukuoka, JAPAN)
PHONE: 81-92-641-1101 (ext.2524) FAX: 81-92-631-3196

---

From: [email-masked] ("Neil M. McQuaig, III")
Date: Tue, 21 Jul 92 22:42:50 CDT

>I appreciate any kind of advice. Sorry if I am too easy to ask.

I have had such errors generated because of laxness in typing.
String, bool *, BoolPtr, char *, etc. are used interchangably it
seems.  Unfortunately, many compilers interested in typing and/or
in being "Ansi" enforce such things as 'anything that gets promoted
to an integer in an function call must match an integer in the
prototype' and other such non-research trivialities ;-}
There seems also to be some underlying assumptions and/or beliefs
that various of these types are the same size.  Unfortunately this is not 
the case on all platforms.   ScanDirection is one such variable.  I am
currently experimenting with such things as defining uint16 to an unsigned
int in c.h instead of an unsigned short.  This quieted my compiler but I
have no experience yet as to was it did to the engine.

Although I'm not sure if it still exists (it did in 3.0) but another gotcha
of the Ansi fad is the typing of Pointer in c.h.  By default it is set to
a void *.  This causes some compilers to complain that you can't do 
pointer arithmetic on a pointer of unknown size (definition of void *) since
a pointer is supposed to increment by the size of the object to which it
points.  Evidently Beserkeley compilers default to a size of 1.   Defining
Pointer as a char * might solve some strangenesses.  It appears that it
is consistently treated as such.   Good luck, its worth the effort to
get it running.   Jeff et.al. do good work and seem to care about what 
they do.  Thanks fellas.

Neil M. McQuaig, III
344 Millicent Way
Shreveport, LA  71106
Voice: (318) 868-5611
Email: uunet!mcquaig!nmm or [email-masked]

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 21 Jul 92 23:00:34 PDT

> (~postgres/src/lib/Gen/*.sh) ?

One thing you should watch out for is that the awk and sed scripts
that we ship with postgres don't work with the international versions
of awk and sed.  If you are getting errors in the .gen files, I'd
be willing to bet serious money that this is your problem.  Use the
standard versions of these unix utilities (assuming you have them
available to you).

Jeff Meredith
[email-masked]