Thread: --with-tcl won't gmake

--with-tcl won't gmake

From
Petre Scheie
Date:
I'm trying to install pg with the --with-tcl and --with-perl options on
an HP-UX 11.0 system.  ./configure runs okay, but when I run gmake I get
the following:

In file included from /usr/local/include/tk.h:83,
                  from pgtkAppInit.c:15:
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:67:19:
X11/X.h: No such file or directory
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:70:28:
X11/Xfuncproto.h: No such file or directory
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:71:25:
X11/Xosdefs.h: No such file or directory
In file included from /usr/local/include/tk.h:83,
                  from pgtkAppInit.c:15:
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:205:
parse error before "Pixmap"
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:209:
parse error before "font"
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:214:
parse error before "clip_mask"
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:217:
parse error before '}' token
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:239:
parse error before "VisualID"
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:248:
parse error before '}' token
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:256:
parse error before "Visual"
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:270:
parse error before "Window"

plus a few hundred more similar lines, and then I get this:

In file included from pgtkAppInit.c:15:
/usr/local/include/tk.h:107: syntax error before "typedef"
/usr/local/include/tk.h:583: parse error before "Window"
/usr/local/include/tk.h:585: parse error before "subwindow"
/usr/local/include/tk.h:586: parse error before "time"
/usr/local/include/tk.h:589: conflicting types for `state'
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:889:
previous declaration of `state'
/usr/local/include/tk.h:592: parse error before '}' token
/usr/local/include/tk.h:599: parse error before "Window"
/usr/local/include/tk.h:601: parse error before "XActivateEvent"
/usr/local/include/tk.h:602: parse error before "XDeactivateEvent"

followed by a few hundred similar lines.  I've got the tcl and tk
packages from the HP Porting and Archive Center installed; I even tried
installing the tcltk package on the chance that the individual packages
had missed something.  Anyone know why I'm getting these errors and
subsequently failing?  I might add that if I compile without --with-tcl
it works just fine.   TIA.

Petre


Re: --with-tcl won't gmake

From
Tom Lane
Date:
Petre Scheie <petre.scheie@nextelpartners.com> writes:
> I'm trying to install pg with the --with-tcl and --with-perl options on
> an HP-UX 11.0 system.  ./configure runs okay, but when I run gmake I get
> the following:

> In file included from /usr/local/include/tk.h:83,
>                   from pgtkAppInit.c:15:
> /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:67:19:
> X11/X.h: No such file or directory
> /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:70:28:
> X11/Xfuncproto.h: No such file or directory
> /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:71:25:
> X11/Xosdefs.h: No such file or directory
> [ followed by lots of errors caused by lack of these headers ]

I'd say that the breakage is in your system headers or gcc installation,
not in either tcl or Postgres.  It would seem that either (a) you don't
have the X11 headers at all, or (b) there's something wrong with gcc's
derived copy of X11/Xlib.h.  Is there anything in /usr/include/X11/ ?
If not, you have some software to install.  If so, maybe rerunning gcc's
fixincludes script would help.  I have seen similar-looking problems
when people copied a gcc installation from one version of HPUX to a
newer one instead of doing a fresh gcc install --- gcc's derived headers
were then out of sync with /usr/include.

If that sounds out of your league, you could probably dodge the problem
by configuring PG --with-tcl --without-tk, and just forget pgtksh.

            regards, tom lane

Re: --with-tcl won't gmake

From
Petre Scheie
Date:
It looks like (a) is the problem, as the only thing in /usr/include/X11/
is a dirctory called bitmaps.  This may be a naive question, but how do
I figure out what I need in there?

I'll try it with the --without-tk. The purpose of including these
switches is to provide support for pgaccess; but the error I was getting
  only refers to needing tcl, I believe.

Tom Lane wrote:
> Petre Scheie <petre.scheie@nextelpartners.com> writes:
>
>>I'm trying to install pg with the --with-tcl and --with-perl options on
>>an HP-UX 11.0 system.  ./configure runs okay, but when I run gmake I get
>>the following:
>
>
>>In file included from /usr/local/include/tk.h:83,
>>                  from pgtkAppInit.c:15:
>>/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:67:19:
>>X11/X.h: No such file or directory
>>/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:70:28:
>>X11/Xfuncproto.h: No such file or directory
>>/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/include/X11/Xlib.h:71:25:
>>X11/Xosdefs.h: No such file or directory
>>[ followed by lots of errors caused by lack of these headers ]
>
>
> I'd say that the breakage is in your system headers or gcc installation,
> not in either tcl or Postgres.  It would seem that either (a) you don't
> have the X11 headers at all, or (b) there's something wrong with gcc's
> derived copy of X11/Xlib.h.  Is there anything in /usr/include/X11/ ?
> If not, you have some software to install.  If so, maybe rerunning gcc's
> fixincludes script would help.  I have seen similar-looking problems
> when people copied a gcc installation from one version of HPUX to a
> newer one instead of doing a fresh gcc install --- gcc's derived headers
> were then out of sync with /usr/include.
>
> If that sounds out of your league, you could probably dodge the problem
> by configuring PG --with-tcl --without-tk, and just forget pgtksh.
>
>             regards, tom lane
>



Re: --with-tcl won't gmake

From
Tom Lane
Date:
Petre Scheie <petre.scheie@nextelpartners.com> writes:
> It looks like (a) is the problem, as the only thing in /usr/include/X11/
> is a dirctory called bitmaps.  This may be a naive question, but how do
> I figure out what I need in there?

You need whatever software bundle HP puts the X11 header files in.  It's
been long enough since I did an HPUX system install that I forget where
to look for that info ... sorry ...

> I'll try it with the --without-tk. The purpose of including these
> switches is to provide support for pgaccess; but the error I was getting
>   only refers to needing tcl, I believe.

You will not be able to build Tk from source either, nor any other
X11-using programs, without those headers.  But if you can rely on a
prebuilt Tk then maybe it doesn't matter to you.  I think pgaccess only
needs libpgtcl.sl, which you should be able to build --without-tk.

            regards, tom lane