Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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

Closed / Works For Meac4be65338c1684457a2284f8abcc7654fdc6274Created 11 years agoUpdated 10 years ago
Descriptionplain2016-01-05 21:05:51
TCL8.5.18 Build Completed without error.

everettt@USWEFN0L052208 ~/tk8.5.18/unix
$ make
gcc -c -O  -pipe  -Wall  -I/home/everettt/tk8.5.18/unix/../unix -I/home/everettt/tk8.5.18/unix/../generic -I/home/everettt/tk8.5.18/unix/../bitmaps -I/home/everettt/tcl8.5.18/generic -I/home/everettt/tcl8.5.18/unix  -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DTCL_THREADS=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".dll\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1     -DTCL_NO_DEPRECATED  -DUSE_TCL_STUBS /home/everettt/tk8.5.18/unix/../generic/tkStubLib.c
In file included from /home/everettt/tk8.5.18/unix/../generic/tkInt.h:19:0,
                 from /home/everettt/tk8.5.18/unix/../generic/tkStubLib.c:14:
/home/everettt/tk8.5.18/unix/../generic/tk.h:80:25: fatal error: X11/Xlib.h: No such file or directory
 #   include <X11/Xlib.h>
                         ^
compilation terminated.
Makefile:1127: recipe for target 'tkStubLib.o' failed
make: *** [tkStubLib.o] Error 1

everettt@USWEFN0L052208 ~/tk8.5.18/unix
$ make
gcc -c -O  -pipe  -Wall  -I/home/everettt/tk8.5.18/unix/../unix -I/home/everettt/tk8.5.18/unix/../generic -I/home/everettt/tk8.5.18/unix/../bitmaps -I/home/everettt/tcl8.5.18/generic -I/home/everettt/tcl8.5.18/unix  -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DTCL_THREADS=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".dll\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1     -DTCL_NO_DEPRECATED  -DUSE_TCL_STUBS /home/everettt/tk8.5.18/unix/../generic/tkStubLib.c
In file included from /home/everettt/tk8.5.18/unix/../generic/tkPort.h:30:0,
                 from /home/everettt/tk8.5.18/unix/../generic/tkInt.h:25,
                 from /home/everettt/tk8.5.18/unix/../generic/tkStubLib.c:14:
/home/everettt/tk8.5.18/unix/../unix/tkUnixPort.h:82:24: fatal error: X11/Xproto.h: No such file or directory
 #include <X11/Xproto.h>
                        ^
compilation terminated.
Makefile:1127: recipe for target 'tkStubLib.o' failed
make: *** [tkStubLib.o] Error 1

everettt@USWEFN0L052208 ~/tk8.5.18/unix
tom.everettplain2016-01-05 21:08:44
After the first failure, I found and moved a copy of the X11 folder which contained a copy of Xlib.h and then reran make. Valid or not it just resulted in the second error 
fatal error: X11/Xproto.h: No such file or directory

This file does not exist anywhere that I could identify.
anonymousplain2016-01-06 15:23:32
Found this on a Google search:
https://community.activestate.com/node/6869

With note:
first: download and install libX11-devel

I no longer get the fatal errors described above.
Where do I find a list of prerequisites?

Also now I get another error.

gcc -c -O  -pipe  -Wall  -I/home/everettt/tk8.5.18/unix/../unix -I/home/everettt/tk8.5.18/unix/../generic -I/home/everettt/tk8.5.18/unix/../bitmaps -I/home/everettt/tcl8.5.18/generic -I/home/everettt/tcl8.5.18/unix  -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DTCL_THREADS=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".dll\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DHAVE_XKBKEYCODETOKEYSYM=1     -DTCL_NO_DEPRECATED  -DUSE_TCL_STUBS /home/everettt/tk8.5.18/unix/../unix/tkUnixXId.c
rm -f libtk8.5.dll
gcc -shared -o libtk8.5.dll tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o tkColor.o tkConfig.o tkConsole.o tkCursor.o tkError.o tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o tkSelect.o tkStyle.o tkUndo.o tkUtil.o tkVisual.o tkWindow.o tkButton.o tkEntry.o tkFrame.o tkListbox.o tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkPanedWindow.o tkScale.o tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o tkTextMark.o tkTextTag.o tkTextWind.o tkStubInit.o tkStubLib.o ttkBlink.o ttkButton.o ttkCache.o ttkClamTheme.o ttkClassicTheme.o ttkDefaultTheme.o ttkElements.o ttkEntry.o ttkFrame.o ttkImage.o ttkInit.o ttkLabel.o ttkLayout.o ttkManager.o ttkNotebook.o ttkPanedwindow.o ttkProgress.o ttkScale.o ttkScrollbar.o ttkScroll.o ttkSeparator.o ttkSquare.o ttkState.o ttkTagSet.o ttkTheme.o ttkTrace.o ttkTrack.o ttkTreeview.o ttkWidget.o ttkStubInit.o tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o  tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o  -lpthread  -lX11 -ldl  -lpthread  -Wl,--out-implib,libtk8.5.dll.a -L/home/everettt/tcl8.5.18/unix -ltclstub8.5
gcc -c -O  -pipe  -Wall  -I/home/everettt/tk8.5.18/unix/../unix -I/home/everettt/tk8.5.18/unix/../generic -I/home/everettt/tk8.5.18/unix/../bitmaps -I/home/everettt/tcl8.5.18/generic -I/home/everettt/tcl8.5.18/unix  -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DTCL_THREADS=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".dll\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DHAVE_XKBKEYCODETOKEYSYM=1     -DTCL_NO_DEPRECATED   /home/everettt/tk8.5.18/unix/../unix/tkAppInit.c
gcc -O  -pipe     tkAppInit.o -L/home/everettt/tk8.5.18/unix/../win -ltk85 \
        -L/home/everettt/tcl8.5.18/unix -ltcl8.5  -lpthread  -lX11 -ldl  -lpthread    -o wish.exe
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /home/everettt/tk8.5.18/unix/../win/libtk85.a when searching for -ltk85
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /home/everettt/tk8.5.18/unix/../win/tk85.dll when searching for -ltk85
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /home/everettt/tk8.5.18/unix/../win/libtk85.a when searching for -ltk85
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /home/everettt/tk8.5.18/unix/../win/libtk85.a when searching for -ltk85
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /home/everettt/tk8.5.18/unix/../win/tk85.dll when searching for -ltk85
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -ltk85
collect2: error: ld returned 1 exit status
Makefile:590: recipe for target 'wish.exe' failed
make: *** [wish.exe] Error 1

everettt@USWEFN0L052208 ~/tk8.5.18/unix
jan.nijtmansplain2016-01-13 20:41:41
No-where in the report I can find what platform, but from the log I deduce it's Cygwin64.

Cygwin already has a Tcl/Tk 8.5 package, so I suggest:
1) If you want to build it yourself, take Tcl/Tk 8.6.4 (or 8.6.5, coming soon)
2) configure --prefix=/usr --enable-64bit

That should work better

Regards,
    Jan Nijtmans
dkf Ticket [ac4be65338]: 3 changes [History diff]2016-09-01 16:13:32
jan.nijtmansplain2016-09-02 12:19:05
Since the answers are already give (missing --enable-64bit option and missing libX11-devel dependancy), those are the causes of the problem. Therefore can be closed now.
Log in (anonymous is fine) to add a comment.