Operating System - HP-UX
1822206 Members
4089 Online
109641 Solutions
New Discussion юеВ

Re: error: X11/Xlib.h: No such file or directory

 
GnanaShekar
Regular Advisor

error: X11/Xlib.h: No such file or directory

Hi,

I am trying to build tcltk on HPUnix 11.31. I am getting the following error. Please suggest.

gmake[1]: Entering directory `/tmp/bldexpect/tcltk-8.4.14/tk/unix'
gcc -pipe -c -O -I/usr/local/include -Wall -Wno-implicit-int -fno-strict-aliasing -fPIC -I/tmp/bldexpect/tcltk-8.4.14/tk/unix -I/tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic -I/tmp/bldexpect/tcltk-8.4.14/tk/unix/../bitmaps -I/usr/local/lib/tcltk/generic -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DWORDS_BIGENDIAN=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DSTDC_HEADERS=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED -DUSE_TCL_STUBS /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk3d.c
In file included from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tkInt.h:21,
from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk3d.h:18,
from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk3d.c:16:
/tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk.h:83:23:


error: X11/Xlib.h: No such file or directory


In file included from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tkInt.h:21,
from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk3d.h:18,
from /tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk3d.c:16:
/tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk.h:559: error: expected declaration specifiers or '...' before 'Window'
/tmp/bldexpect/tcltk-8.4.14/tk/unix/../generic/tk.h:559: error: 'Window' declared as function returning a function



Thanks & Regards,
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: error: X11/Xlib.h: No such file or directory

This header is part of X11MotifDevKit.X11R6-PRG-COM. You must purchase the HP compiler. Or get the header from somewhere else.
Dennis Handly
Acclaimed Contributor

Re: error: X11/Xlib.h: No such file or directory

An evaluation copy of HP's compilers is available.
Rasheed Tamton
Honored Contributor

Re: error: X11/Xlib.h: No such file or directory

Hi,

It is possibly the header files.
If you have another box with an older hp-ux version just try to build it on there and see the result.

Another option is to try with the cc instead of gcc (change gcc to cc). You have to change the makefile, etc. for this. I had done it long time before on Solaris and it had worked.

# which cc
/usr/bin/cc

Regards,
Rasheed Tamton.
Steven Schweda
Honored Contributor

Re: error: X11/Xlib.h: No such file or directory

First, do you have an Xlib.h anywhere?

find /usr -name Xlib.h

If you have it, you may need only to tell the
tcltk builder where to find it. Somehow.

If you don't have it, you'll need to get it.
Somewhere.
GnanaShekar
Regular Advisor

Re: error: X11/Xlib.h: No such file or directory

Hi,

There seems to be an Xlib.h in the tk source itself. However running the configure for tk with that path does not seem to be working.

$ pwd
/tmp/bldexpect/tcltk-8.4.14/tk
$ ls -l xlib/X11
total 384
-rw------- 1 gsubrama units 18697 Aug 31 2002 X.h
-rw------- 1 gsubrama units 2518 Apr 1 1998 Xatom.h
-rw------- 1 gsubrama units 1720 Apr 1 1998 Xfuncproto.h
-rw------- 1 gsubrama units 40988 Aug 31 2002 Xlib.h
-rw------- 1 gsubrama units 20273 Aug 31 2002 Xutil.h
-rw------- 1 gsubrama units 1953 Apr 1 1998 cursorfont.h
-rw------- 1 gsubrama units 1501 Apr 1 1998 keysym.h
-rw------- 1 gsubrama units 52429 Jul 6 1998 keysymdef.h
-rw------- 1 gsubrama units 2209 Apr 1 1998 license.terms

$ cd unix
$ pwd
/tmp/bldexpect/tcltk-8.4.14/tk/unix

$ ./configure --x-includes=/tmp/bldexpect/tcltk-8.4.14/tk/xlib/X11
loading cache ./config.cache
checking for Tcl configuration... (cached) found /tmp/bldexpect/tcltk-8.4.14/tcl/unix/tclConfig.sh
checking for existence of /tmp/bldexpect/tcltk-8.4.14/tcl/unix/tclConfig.sh... loading
checking for tclsh... (cached) /usr/local/bin/tclsh
.
.
.
.
----------------------------
checking for X11 header files... checking for X11 libraries... /usr/lib/X11R4
----------------------------
checking for main in -lXbsd... (cached) no
checking for connect... (cached) yes
checking for gethostbyname... (cached) yes
checking whether char is unsigned... (cached) no
creating ./config.status
creating Makefile
creating tkConfig.sh

Please suggest,
Thanks & Regards,
Steven Schweda
Honored Contributor

Re: error: X11/Xlib.h: No such file or directory

Remember, it's looking for .
I'd try it without the last "/X11":

./configure --x-includes=/tmp/bldexpect/tcltk-8.4.14/tk/xlib

No bets, of course.
GnanaShekar
Regular Advisor

Re: error: X11/Xlib.h: No such file or directory

Hi,

I tried it. But no luck

Thanks & Regards,